[Bioperl-l] Sporadic Failure to retrieve Sequence Objects from	GenPept
    Warren Gallin 
    wgallin at ualberta.ca
       
    Fri Mar 17 22:48:33 UTC 2006
    
    
  
Hi,
	I am getting a sporadic error running a script.  The code fragment  
that is failing is
	foreach $gi (@ginumbers){
		$find_gi = $gi;
		$find_gi =~ s/gi(\d+)/"$1"/;
		$seq_object = $database -> get_Seq_by_id("$find_gi");
		$description = $seq_object -> desc;      #line 54
		$species_object = $seq_object -> species;
		$species_name = $species_object -> binomial;
It is returning a message like this, although the gi number that it  
fails on varies from run to run.
-------------------- WARNING ---------------------
MSG: id ("73998177") does not exist
---------------------------------------------------
Can't call method "desc" on an undefined value at gi_to_name.pl line 54.
As far as as I can tell, every once and awhile the retrieval of  
$seq_object from the database (GenPept in this case) is failing.
The gi numbers exist, and if I just run the script again it doesn't  
fail.
This leads me to believe that there may be some kind of internal wait  
cycle that returns undefined if the $seq_object retrieval has not  
completed in a certain time.
In any case, is there some way to tweak a script to prevent this kind  
of problem?
Thanks,
Warren Gallin
    
    
More information about the Bioperl-l
mailing list