[Bioperl-l] Problems with DB::GenBANK and species()->common_name()

Hilmar Lapp hlapp@gnf.org
Tue Jan 14 11:05:13 EST 2003


The error indicates that the sequence object is undef on which you want 
to call species(). So, it's not just missing species, there just is no 
sequence object. This may happen if NCBI returns an error page instead 
of the sequence. There are restrictions on how often you can download 
sequences through the eutils interface to control bandwith. Also, the 
respective code has become a lot more robust and uses their latest 
interfaces in 1.2. as opposed to 1.0.x. Upgrade if you still run 1.0.x 
and maybe the error goes away.

Otherwise you may want to check whether get_Seq_by_id() actually 
returns a valid object to you before calling any methods on it.

	-hilmar

On Monday, January 13, 2003, at 05:31  PM, Stephen Montgomery wrote:

> Hi-
> I'm using Bio::DB::GenBank to get_Seq_by_id() where id is the 
> accession id.  I then want to report species info and seq info to 
> STDOUT. However, I get an intermittent error...
> my program will report a
>
> Can't call method "species" on an undefined value at ...
>
> I checked that the accession entries I'm using always have a species 
> in GenBank.  The troubling thing is sometimes the script runs 10 
> accession numbers sometimes 1.  So it is moreorless randomly reporting 
> this error. (These are always the same accession numbers in my test)
>
> Thanks for any help.
> Cheers,
> Stephen
>
>
> -- 
> Stephen Montgomery
> Genome Sciences Centre
> Vancouver, BC Canada
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list