Socket
Book a DemoInstallSign in
Socket

fasta-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fasta-parser

Buffer Stream parser from FASTA to JSON

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
29
163.64%
Maintainers
1
Weekly downloads
 
Created
Source

fasta-parser

Buffer Stream parser from FASTA to JSON.

NPM version Build Status Coveralls Status Dependency Status Gitter chat DOI

Browser

Install

Install fasta-parser with npm:

$ npm install fasta-parser

Alternatively, just include fasta-parser.min.js via a <script/> in your page.

Usage

var fasta = require('fasta-parser')

var fastaData = new Buffer ('>sequence1\n\
ATGCACGTCACGTCAGTACTCGTCAGTAC\n\
>sequence2\n\
CAGTCCTACTGCATGCATGCATGCATGCATCGATGCATGTCGACTGCATGCATGC\n')

var parser = fasta()
parser.on('data', function(data) { console.log(JSON.parse(data.toString())) })
parser.write(fastaData)
parser.end()
//=>   { id: 'sequence1',
//       seq: 'ATGCACGTCACGTCAGTACTCGTCAGTAC' }
//     { id: 'sequence2',
//       seq: 'CAGTCCTACTGCATGCATGCATGCATGCATCGATGCATGTCGACTGCATGCATGC' }

For a more useful API, check the dependent module bionode-fasta.

Contributing

To contribute, clone this repo locally and commit your code on a separate branch.

Please write unit tests for your code, and check that everything works by running the following before opening a pull-request:

$ npm test

To test on the browser:

$ npm run test-browser
# if you get "No headless browser found" do:
$ npm install -g phantomjs
$ rm ~/.config/browser-launcher/config.json

Please also check for code coverage:

$ npm run coverage

To rebuild and minify the module for the browser:

$ npm run build-browser

To rebuild the documentation using the comments in the code:

$ npm run build-docs

Check the issues for ways to contribute.

Contacts

Bruno Vieira <mail@bmpvieira.com> @bmpvieira

License

fasta-parser is licensed under the MIT license.
Check ChooseALicense.com for details.

Keywords

bio

FAQs

Package last updated on 16 Aug 2014

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