[Bioperl-l] Bug in Bio::SeqIO::fastq - seq length of 1 with quality of 0 (zero)

Chris Fields cjfields at illinois.edu
Wed Jul 27 16:25:56 EDT 2011


Huh, thought that one was fixed a while ago but apparently not completely.  Just committed a fix and pushed to github, along with a test.  Thanks for pointing this one out!

chris

On Jul 26, 2011, at 7:37 PM, Nath wrote:

> It's been a while since I was involved with Perl/BioPerl.....
> 
> I installed the latest version of BioPerl (1.6.901) through CPAN and
> used it to parse some fastq files. I get an exception thrown when a
> sequence has length = 1 and a quality of 0 (zero).
> 
> -- start test.pl --
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Bio::SeqIO;
> 
> my $seq_io = Bio::SeqIO->new(-file => 'test.fastq', -format =>
> 'fastq');
> while (my $seq = $seq_io->next_seq){ }
> -- end test.pl --
> 
> -- start test.fastq --
> @someID1.f
> G
> +
> 0
> -- end test.fastq --
> 
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Missing sequence and/or quality data; line: 4
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /usr/lib/perl5/site_perl/5.8.8/Bio/Root/
> Root.pm:472
> STACK: Bio::SeqIO::fastq::next_dataset /usr/lib/perl5/site_perl/5.8.8/
> Bio/SeqIO/fastq.pm:97
> STACK: Bio::SeqIO::fastq::next_seq /usr/lib/perl5/site_perl/5.8.8/Bio/
> SeqIO/fastq.pm:29
> STACK: test.pl:7
> -----------------------------------------------------------
> 
> -- start test.fastq --
> @someID1.f
> G
> +
> 0
> @someID2
> AG
> +
> DD
> -- end test.fastq --
> 
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Quality string [0 at someID2] of length [9]
> doesn't match length of sequence G
> [1], line: 6
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /usr/lib/perl5/site_perl/5.8.8/Bio/Root/
> Root.pm:472
> STACK: Bio::SeqIO::fastq::next_dataset /usr/lib/perl5/site_perl/5.8.8/
> Bio/SeqIO/fastq.pm:102
> STACK: Bio::SeqIO::fastq::next_seq /usr/lib/perl5/site_perl/5.8.8/Bio/
> SeqIO/fastq.pm:29
> STACK: test.pl:7
> -----------------------------------------------------------
> 
> Note that the quality string parsed from the file for someID1.f also
> includes the @someID2 sequence ID line. This may be related to Bug
> #3068 that was apparently fixed about 1yr ago.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list