fastqstream is a Stream transform for parsing FASTQ files into records.
var fs = require('fs')
var reader = fs.createReadStream('file.fq')
reader.pipe(new FASTQStream())
.on('data', function (data) {
console.log(data)
})
There are two transforms available:
id
as
other sequences.I checked for FASTQ parsers on NPM but none had all the features that I wanted.
They are all very interesting,
but I wanted something that works on any stream and is agnostic about nodejs or browser.
Most of them implement the parser as a Readable stream (expecting a path,
which it then opens with fs
),
but I think it is better to implement it as a Transform and consume data from whatever is piping data in.
BSD 3-clause