A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).
[![Build Status][travis-image]][travis-url]
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-bwa
as a command line tool, you can install it globally with -g
.
npm install bionode-bwa -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-bwa # 'i' can be used as shorcut to 'install'
If you're using bionode-bwa with Node.js, you can require the module:
var bwa = require('bionode-bwa')
// aligment path is optional, reads name used instead with sam suffix
bwa('reference.fasta.gz', 'reads.fastq.gz', 'alignment.sam')
.on('data', console.log)
var options = {
operation: 'mem',
params: '-t 4'
}
var stream = bwa(options) // Use BWA mem algorithm with 4 threads
var obj = {
reference: 'reference.fasta.gz',
reads: ['reads.fastq.gz']
}
stream.write(obj)
Please read the documentation for the methods exposed by bionode-bwa.
Check BWA's documentation for the arguments that can be passed.
$ bionode-bwa reference.fasta.gz reads.fastq.gz --alignment out.sam
$ echo '{"reference": "ref.fasta.gz", "reads": "[p1.fq, p2.fq]"}' | bionode-bwa -
We welcome all kinds of contributions at all levels of experience, please read the CONTRIBUTING.md to get started!
Don't be shy! Come talk to us 😃
- Email [email protected]
- Chat room http://gitter.im/bionode/bionode
- IRC #bionode on Freenode
- Twitter @bionode