[Bioperl-l] here's a cool bug!
Jason Stajich
jason at cgt.duhs.duke.edu
Thu Dec 11 21:01:43 EST 2003
[jason at ascona jason]$ perl -mBio::SeqIO -e 'print
$sio=Bio::SeqIO->new(-file => "blah.gb")->next_seq->primary_id,"\n";'
Bio::Seq::RichSeq=HASH(0x8518394)
So there is no VERSION for the sequence...
VERSION GI:230940
Is that valid Genbank...
Need to make this loop here a little tighter then I guess
in genbank.pm
#Version number
elsif( /^VERSION\s+(.+)$/ ) {
my ($acc,$gi) = split(' ',$1);
if($acc =~ /^\w+\.(\d+)/) {
$params{'-version'} = $1;
$params{'-seq_version'} = $1;
}
if($gi && (index($gi,"GI:") == 0)) {
$params{'-primary_id'} = substr($gi,3);
}
}
Any takers...? Make that regexp a little more greedy for GI: perhaps?
-jason
On Thu, 11 Dec 2003, Mark Wilkinson wrote:
> This bug is an interesting one! It doesn't happen in all cases, only on
> certain genbank records, like the one attached. Try this out:
>
> perl -MBio::SeqIO -e '$sio=Bio::SeqIO->new(-file => "blah.gb");
> $s=$sio->next_seq; print $s->primary_id;'
>
> that should lead to some raised eyebrows :-)
>
> M
>
>
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list