[Bioperl-l] how to prevent forced exit?

Ross KK Leung ross at cuhk.edu.hk
Tue Mar 15 05:54:35 UTC 2011


$gb = new Bio::DB::GenBank(-retrievaltype => 'tempfile', -format =>
'Fasta');            
$allseqobj = $gb->get_Stream_by_acc("A3ZI37");        
                l
print "HEELO";                                           
while ($seqobj = $allseqobj->next_seq) {             
                        #$seqobj = $allseqobj->next_seq;

                        $seq=$seqobj->seq;

                        }

                    print "222   HEELO";



I find that the 1st HEELO can be printed while the 2nd one can't. Google
does not return checking success/failure or null/exist of the Seq Object. As
the 1st HEELO can be executed, so no throw/exception occurs for the
get_Stream_by_acc. So what can I do? The real case is not hard-coding this
A3ZI37 but reading a file that may contain a lot of these "illegitimate"
accession numbers.




More information about the Bioperl-l mailing list