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).
- Host: GitHub
- URL: https://github.com/bionode/bionode-bwa
- Owner: bionode
- License: mit
- Created: 2014-05-19T15:19:41.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T22:53:08.000Z (about 9 years ago)
- Last Synced: 2025-03-25T19:53:19.215Z (about 1 year ago)
- Topics: bioinformatics, bionode, nodejs, tool, wrapper
- Language: JavaScript
- Homepage: bionode.io
- Size: 344 KB
- Stars: 7
- Watchers: 24
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# bionode-bwa
> A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).
[](http://npmjs.org/package/bionode-bwa)[![Build Status][travis-image]][travis-url]
[](https://travis-ci.org/bionode/bionode-bwa)
[](http://coveralls.io/r/bionode/bionode-bwa)
[](http://david-dm.org/bionode/bionode-bwa)
[](https://www.npmjs.com/package/bionode-bwa)
[](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)