[Bioperl-l] How to check the validity of an accession number ?
Damien Marsic
damien at rael.org
Sat Nov 8 00:02:52 EST 2003
Hello,
I hope someone will be able to help. I wrote a program that does the
following:
- opens a file containing sequences named with their Genbank accession
number if it exists (and an arbitrary name if the sequence is not in
Genbank)
- reads each sequence name, looks in Genbank if it is an accession number,
and if it is, retrieves the organism name and other information. If the name
is not recognized as an accession number, the program says it and proposes
to continue with the next sequences.
My programs worked perfectly during the last 2 years or so. But for the last
few months it does not work anymore, although I did not make any change to
it. What is happening now is that when there is a sequence name that is not
an accession number, the program crashes.
The problem lies with this line:
$seq = $stream -> get_Seq_by_acc($an);
When $an was an invalid accession number, $seq used to be "undefined" and
the program could go on (the program checks whether &seq in defined or
undefined and then goes to the appropriate step).
But now, when $an is an invalid accession number, the program just crashes
with the following message:
------------- EXCEPTION -------------
MSG: acc does not exist
STACK Bio::DB::WebDBSeqI::get_Seq_by_acc
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/WebDBSeqI.pm:177
STACK Bio::DB::GenBank::get_Seq_by_acc
/usr/lib/perl5/site_perl/5.6.1/Bio/DB/GenBank.pm:216
STACK toplevel phylplus.pl:90
--------------------------------------
Can someone helps me understand what is happening ? Were there some changes
at Genbank that could explain why my program behaves differently ? Is there
anything I can do to make it behave like it did before ?
Is there any other way than "get_Seq_by_acc" to check if an accession number
exists or not ?
Thanks in advance for the replies.
Damien
More information about the Bioperl-l
mailing list