[Bioperl-l] BioPerl Fastq Parser Error?

René Malenfant rene.malenfant at gmail.com
Thu Feb 10 14:11:39 EST 2011


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.

I've attached the error message below:


Thanks,

Rene Malenfant



Error message:
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Quality string [!!) 
WZ`cii~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
{uuooWWTWWWW>WWWQWWWWW]QKHHHHHHHHHHHHHHEEEEEEEEEEEEBEEEEBBBBBBBBBBBB]  
of length [120]
doesn't match length of sequence  
nnAGACTTTGTATTTATGTTCCTTTTTGGTGGATTCTTAATGACTATATCGTTACTGTCGAATGCTAGAAGA 
AGGCTCTTTCCGAGGTCGGACAGCAGACTTTGTATTtatgttccttttt
[121], line: 322124
STACK: Error::throw
STACK: Bio::Root::Root::throw /home/rene/perl5/lib/perl5/Bio/Root/ 
Root.pm:368
STACK: Bio::SeqIO::fastq::next_dataset /home/rene/perl5/lib/perl5/Bio/ 
SeqIO/fastq.pm:102
STACK: Bio::SeqIO::fastq::next_seq /home/rene/perl5/lib/perl5/Bio/ 
SeqIO/fastq.pm:29
STACK: ./foo.pl:12
-----------------------------------------------------------


Program I'm trying to use:
====
#! /usr/bin/perl -w
use strict;
use Bio::SeqIO;

my $inputfilename = shift;
my $in  = Bio::SeqIO->new(-file => "$inputfilename",
                           -format => 'Fastq');
my $out = Bio::SeqIO->new(-file => ">outputfilename",
                           -format => 'Fasta');

while ( my $seq = $in->next_seq() ) {
     $out->write_seq($seq);
}

exit;
====


Sequence that appears to be messing things up.  It looks fine to me:
====
@21_NODE_24053-0.94|PREMKED.FA|PREDICTED:
nnAGACTTTGTATTTATGTTCCTTTTTGGTGGATTCTTAATGACTATATCGTTACTGTCG
AATGCTAGAAGAAGGCTCTTTCCGAGGTCGGACAGCAGACTTTGTATTtatgttcctttt
t
+
!!)WZ`cii~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{uuooWWT
W0WW>WWWQWWWWW]QKHHHHHHHHHHHHHHEEEEEEEEEEEEBEEEEBBBBBBBBBBBB
0
====



More information about the Bioperl-l mailing list