bionode-bwa
Advanced tools
Comparing version 0.0.5 to 0.0.6
26
cli.js
@@ -16,4 +16,24 @@ #!/usr/bin/env node | ||
var operation = bwa(operationArgs) | ||
operation(filenames) | ||
.on('data', console.log) | ||
.on('error', console.log) | ||
if (!process.stdin.isTTY) { | ||
process.stdin.on('data', function(data) { | ||
var data = data.trim().replace(/['"]/g, '') | ||
if (data === '') { return } | ||
filenames.push(data) | ||
operation(filenames).pipe(JSONstringify()).pipe(process.stdout) | ||
}) | ||
} | ||
else { | ||
operation(filenames).pipe(JSONstringify()).pipe(process.stdout) | ||
} | ||
function JSONstringify() { | ||
var stream = through.obj(transform) | ||
return stream | ||
function transform(obj, enc, next) { | ||
var data = JSON.stringify(obj).trim() | ||
if (data === '') { return next() } | ||
this.push(data + '\n') | ||
next() | ||
} | ||
} |
@@ -117,3 +117,3 @@ // # bionode-bwa | ||
var filenameLC = filename.toLowerCase() | ||
if (filenameLC.match(/\.(fasta|fa$|fa.gz$)/)) { reference = filename } | ||
if (filenameLC.match(/\.(fasta|fa$|fa.gz$|fna$|fna.gz$)/)) { reference = filename } | ||
else if (filenameLC.match(/\.(fastq|fq$|fq.gz$)/)) { sequences.push(filename) } | ||
@@ -120,0 +120,0 @@ else if (filenameLC.match(/\.(sam)/)) { sam = filename } |
{ | ||
"name": "bionode-bwa", | ||
"description": "A Node.js wrapper for the Burrow-Wheeler Aligner (BWA).", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"homepage": "http://github.com/bionode/bionode-bwa", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1163584
83
1681
3
70