[Bioperl-l] how to prevent forced exit?

Dave Messina David.Messina at sbc.su.se
Tue Mar 15 05:02:05 EDT 2011


Hi Ross,

Your code is incomplete and you didn't provide the output from running it,
so it's not easy to figure out where you're going wrong.

Try copying the example code directly from here


http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/DB/GenBank.html

and making sure that works first before modifying it.


More documentation and examples here:
http://www.bioperl.org/wiki/HOWTO:Beginners
http://www.bioperl.org/wiki/Bioperl_scripts


Dave




On Tue, Mar 15, 2011 at 06:54, Ross KK Leung <ross at cuhk.edu.hk> wrote:

> $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.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>


More information about the Bioperl-l mailing list