项目作者: bionode

项目描述 :
A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).
高级语言: JavaScript
项目地址: git://github.com/bionode/bionode-bwa.git
创建时间: 2014-05-19T15:19:41Z
项目社区:https://github.com/bionode/bionode-bwa

开源协议:MIT License

下载




bionode logo



bionode.io

bionode-bwa

A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).

npm[![Build Status][travis-image]][travis-url]
Travis
Coveralls
Dependencies
npm
Gitter

Install

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

  1. # Ubuntu
  2. sudo apt-get install npm
  3. # Mac
  4. brew install node
  5. # Both
  6. npm install -g n
  7. n stable

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

  1. 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.

  1. npm i bionode-bwa # 'i' can be used as shorcut to 'install'

Usage

If you’re using bionode-bwa with Node.js, you can require the module:

  1. var bwa = require('bionode-bwa')
  2. // aligment path is optional, reads name used instead with sam suffix
  3. bwa('reference.fasta.gz', 'reads.fastq.gz', 'alignment.sam')
  4. .on('data', console.log)
  1. var options = {
  2. operation: 'mem',
  3. params: '-t 4'
  4. }
  5. var stream = bwa(options) // Use BWA mem algorithm with 4 threads
  6. var obj = {
  7. reference: 'reference.fasta.gz',
  8. reads: ['reads.fastq.gz']
  9. }
  10. 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.

Command line examples

  1. $ bionode-bwa reference.fasta.gz reads.fastq.gz --alignment out.sam
  2. $ echo '{"reference": "ref.fasta.gz", "reads": "[p1.fq, p2.fq]"}' | bionode-bwa -

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 :smiley: