GithubHelp home page GithubHelp logo

isabella232 / fasta-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bionode/fasta-parser

0.0 0.0 0.0 289 KB

Buffer Stream parser from FASTA to JSON.

License: MIT License

JavaScript 100.00%

fasta-parser's Introduction

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 <[email protected]> @bmpvieira

License

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

fasta-parser's People

Contributors

bmpvieira avatar drpowell avatar katrinleinweber avatar rudani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.