[Bioperl-l] BioPerl Fastq Parser Error?
Chris Fields
cjfields at illinois.edu
Mon Feb 14 20:14:44 UTC 2011
Rene,
This is a bug, now fixed in bioperl-live master on github. The parsed lines were not being checked for definedness (instead for true/false), so the very last line evaluated as false and prematurely ended the parse, should work fine now.
chris
On Feb 10, 2011, at 1:11 PM, René Malenfant 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.
>
> 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 nnAGACTTTGTATTTATGTTCCTTTTTGGTGGATTCTTAATGACTATATCGTTACTGTCGAATGCTAGAAGAAGGCTCTTTCCGAGGTCGGACAGCAGACTTTGTATTtatgttccttttt
> [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
> ====
>
> _______________________________________________
> 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