node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »



fqreader reads FASTQ files.


$ npm install fqreader


call it like this

var fqreader = require("fqreader");, function(data) {
  process.stdout.write(data.qual + "\n"); // to avoid %% -> %. or use consolog ( 

or like this

var fqreader = require("fqreader");, 
  data: function(data) {
    console.log("on data", data);
  end: function() {
    console.log("on end");
});, params)

Reads file with its name fastqfile as fastq format.

fastqfile is a filename or a readable stream like process.stdin.

if fastqfile is "-", then it reads from processs.stdin.

params is required, must be an object or a function. is called for each fastq unit with data.

  • : sequence id
  • data.seq : sequence
  • data.qual : quality values

params.end is called after the file is read through.

other values in params is used for fs.createReadStream(fastqfile, params)

for example, highWaterMark can be useful for performancd tuning.

this.pause() and this.resume()

are callable in "data" function

var fqreader = require("fqreader");, 
  data: function(data) {
    var _this = this
    setTimeout(function() {
    }, 10);