An open API service indexing awesome lists of open source software.

https://github.com/bionode/bionode-bwa

A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).
https://github.com/bionode/bionode-bwa

bioinformatics bionode nodejs tool wrapper

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          



bionode logo



bionode.io

# bionode-bwa

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

[![npm](https://img.shields.io/npm/v/bionode-bwa.svg?style=flat-square)](http://npmjs.org/package/bionode-bwa)[![Build Status][travis-image]][travis-url]
[![Travis](https://img.shields.io/travis/bionode/bionode-bwa.svg?style=flat-square)](https://travis-ci.org/bionode/bionode-bwa)
[![Coveralls](https://img.shields.io/coveralls/bionode/bionode-bwa.svg?style=flat-square)](http://coveralls.io/r/bionode/bionode-bwa)
[![Dependencies](http://img.shields.io/david/bionode/bionode-bwa.svg?style=flat-square)](http://david-dm.org/bionode/bionode-bwa)
[![npm](https://img.shields.io/npm/dt/bionode-bwa.svg?style=flat-square)](https://www.npmjs.com/package/bionode-bwa)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/bionode/bionode-bwa)

## Install

You need to install the latest Node.JS first, please check [nodejs.org](http://nodejs.org) or do the following:

```bash
# 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`.

```bash
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`.

```bash
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:

```js
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)
```

```js
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](http://rawgit.com/bionode/bionode-bwa/master/docs/bionode-bwa.html) for the methods exposed by bionode-bwa.
Check [BWA's documentation](http://bio-bwa.sourceforge.net/bwa.shtml) for the arguments that can be passed.

### Command line examples

```sh
$ bionode-bwa reference.fasta.gz reads.fastq.gz --alignment out.sam
$ 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](CONTRIBUTING.md) to get started!

## Communication channels

Don't be shy! Come talk to us :smiley:

* **Email** [mail@bionode.io](mailto:mail@bionode.io)
* **Chat room** [http://gitter.im/bionode/bionode](http://gitter.im/bionode/bionode)
* **IRC** #bionode on Freenode
* **Twitter** [@bionode](http://twitter.com/@bionode)