fastqparser
v1.0.0
Published
A simple fastq stream parser
Downloads
3
Readme
README
fastqparser is a Fastq stream parser
Usage
Parse a fastq.gz filestream. Omit the zlib pipe if the file is uncompressed.
var zlib = require('zlib');
var fs = require('fs');
var fastq = require('fastq'); // require('./index');
fs.createReadStream('path/to/example.fastq.gz')
.pipe(zlib.createUnzip())
.pipe(fastq.obj())
.pipe(do_something())
.on('finish', function(){
console.log("Done");
});
Parse a fastq.gz S3 object
var s3 = require('aws-sdk/clients/s3');
s3.getObject({bucket: 'bucketname', path: 'path/to/file.fastq.gz'}).createReadStream()
.pipe(zlib.createUnzip())
.pipe(fastq.obj())
.pipe(do_something())
.on('finish', function(){
console.log("Done");
});
Alternatives
I've been needing a streamable fastq file parser, and didn't like the development state of bionode-fastq, which implements a different file-only base API compared to the stellar bionode-fasta. My philosophy is similar to fastqstream.
License
GPL-3.0