Skip to content

bionode/bionode-gff

Repository files navigation

bionode logo
bionode.io

bionode-gff

Node.js module for parsing gff files

npm Travis Coveralls Dependencies npm Gitter

Install

You need to install the latest Node.JS first, please check nodejs.org or do the following:

# Ubuntu
sudo apt-get install npm
# Mac
brew install node
# Both
npm install -g n
n stable

To use bionode-gff as a command line tool, you can install it globally with -g.

npm install bionode-gff -g

Or, if you want to use it as a JavaScript library, you need to install it in your local project folder inside the node_modules directory by doing the same command without -g.

npm i bionode-gff # 'i' can be used as shortcut to 'install'

Usage

If you are using bionode-gff with Node.js, you can require the module:

var gff = require('bionode-gff')
 GFF.read(filePath).on('data',onFeatures).on('end', done);

 function onFeature(feature){
         console.log(feature.seqid);
         console.log(feature.source);
         console.log(feature.type);
         console.log(feature.start);
         console.log(feature.end);
         console.log(feature.score || '.');
         console.log(feature.strand || '?');
         console.log(feature.phase || '.');
         console.log(feature.attributes);
 }

 function done(){
 console.log('done');
 }

Documentation

Check our documentation at doc.bionode.io or do:

bionode-gff --help

Contributing

We welcome all kinds of contributions at all levels of experience, please read the CONTRIBUTING.md to get started!

Communication channels

Don't be shy! Come talk to us 😃