Skip to content
fstrozzi edited this page Apr 27, 2012 · 24 revisions

Intro

Bio::Faster is a BioRuby gem that implements a fast and simple parser for FastQ file. The new version is a complete rewrite of the old version and the C extension now checks also for formatting problems in FastQ files. RSpecs has been defined based on the test files available in the official FastQ paper.

Usage

It returns an array with the sequence header (ID + comment), the sequence itself and an array with the quality values. Default quality encoding is expected to be Sanger (Phred33).

fastq = Bio::Faster.new("sequences.fastq")
fastq.each_record do |sequence_header, sequence, quality|
     puts sequence_header, sequence, quality
end

If the quality encoding is expected to be Phred64 (i.e. Solexa) you need to specify it

fastq_solexa = Bio::Faster.new("sequences.fastq",:solexa)
Clone this wiki locally