[Bioperl-l] Bio::SeqIO bug?

Mick Watson michaelwatson@paradigm-therapeutics.co.uk
Tue, 22 Oct 2002 14:04:55 +0100


Hi

I discovered a rather odd feature in Bio::SeqIO by accident.  When I run 
the following script, Bio::SeqIO parses the sequence with no problems... 
however it shouldn't really, as the sequence is not in Fasta format... 
it seems to be important that there are two trailing newlines in the string:

#!/usr/bin/perl

use Bio::SeqIO;
use IO::String;

my $seq = "ATTATGCTGCTA

";

my $stringfh = new IO::String($seq);
my $SeqIO = new Bio::SeqIO(-format => 'Fasta',
               -fh     => $stringfh);

while (my $s = $SeqIO->next_seq) {
    print "seq -> id is ", $s->id, "<br>\n";
    print "seq -> desc is ", $s->desc, "<br>\n";
    print "seq -> seq is ", $s->seq, "<br>\n";
}