fastqstream

0.1.0 • Public • Published

fastqstream

fastqstream is a Stream transform for parsing FASTQ files into records.

npm Travis Test coverage

Usage

var fs = require('fs')
 
var reader = fs.createReadStream('file.fq')
 
reader.pipe(new FASTQStream())
      .on('data', function (data) {
        console.log(data)
      })

Available transforms

There are two transforms available:

  • FASTQStream takes a String or Buffer and convert into Records (as objects). It does some basic validation on the syntax, but doesn't try to verify if quality scores are valid, for example.
  • FASTQValidator implements more strict validation, such as checking that no sequence in the original FASTQ has the same id as other sequences.

Alternatives

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.

License

BSD 3-clause

Readme

Keywords

none

Package Sidebar

Install

npm i fastqstream

Weekly Downloads

3

Version

0.1.0

License

BSD-3-Clause

Last publish

Collaborators

  • luizirber