[Bioperl-l] BioPerl Fastq Parser Error?

Chris Fields cjfields at illinois.edu
Mon Feb 14 15:21:16 EST 2011


On Feb 14, 2011, at 2:14 PM, Peter Cock wrote:

> On Thu, Feb 10, 2011 at 7:11 PM, René Malenfant
> <rene.malenfant at gmail.com> wrote:
>> Hi.  I think there may be an error in BioPerl's FASTQ parser.  It fails when
>> the last character of a quality sequence is a zero and it is alone on a line
>> by itself.
> 
> Interesting example - and it does look valid to me too. It would
> probably make a good test case, since automatic conversion of
> a string to a boolean may treat "0" (zero) as false.

Right, that was the problem: here's the snippet from fastq.pm prior to my fixing it:

while ($line) { # changed to 'while (defined $line) {...}'
  ....
}

> I'm curious where the file came from, since not many tools output
> line wrapped FASTQ (it makes parsing and indexing so much easier).
> 
> Peter

Agreed, would be good to know.  I haven't come across any tools that wrap FASTQ myself.

chris


More information about the Bioperl-l mailing list