🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

bioinformatics-parser

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bioinformatics-parser

.fasta and .fastq parsers

1.1.2
latest
Source
npm
Version published
Weekly downloads
7
-50%
Maintainers
1
Weekly downloads
 
Created
Source

bioinformatics-parser

Simple package to read and write fasta and fastq inputs.

Usage:

const { fasta, fastq } = require('bioinformatics-parser')

const exampleFasta =
`>strain_1
NNNACGTACGCTAGCTACGTA
CAGCTAGCTAGCTACATNNNN
>strain_2
NNNACGTACGCTAGCTACGTA
CAGCTAGCTAGCTACATNNNN`

const { ok, error, result } = fasta.parse(exampleFasta)

console.log(result)
// => [
//   { description: 'strain_1',
//     data: 'NNNACGTACGCTAGCTACGTACAGCTAGCTAGCTACATNNNN' },
//   { ... },
// ]

const stringifiedFasta = fasta.stringify(result)
// `exampleFasta` might be different from `stringifiedFasta` because
// the line break length might be different, but the description and
// data stay the same

// NOTE: fastq only implements fastq.parse but not fastq.stringify,
//       if you need it open an issue.

Keywords

bioinformatics

FAQs

Package last updated on 11 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts