Skip to content

A Stream transform for parsing FASTQ files into records.

License

Notifications You must be signed in to change notification settings

luizirber/fastqstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastqstream

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

License NPM version Build Status Coverage Status Dependencies Status devDependencies Status Code Climate NPM downloads per month GitHub issues Greenkeeper badge

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

About

A Stream transform for parsing FASTQ files into records.

Resources

License

Stars

Watchers

Forks

Packages