[Bioperl-l] [Bioperl-guts-l] a question of retrieval information

jinsun at indiana.edu jinsun at indiana.edu
Tue Jul 5 10:05:15 EDT 2005

To whom it is concerned:

I try to write a perl program using bioperl and want to retrieve  
from ncbi website. The purpose of this program is to get protein's  
with a gi number. For example if given a gi number 16128448, I would  
get acrAB
operon repressor [Escherichia coli K12] gi|16128448|ref|NP_414997.1| 

I wrote bioperl like this:

use Bio::DB::GenBank;

$gb = new Bio::DB::GenBank;
$seqobj = $gb->get_Seq_by_gi('16128448');
$ann_coll = $seqobj->annotation;

for $ann ($ann_coll->get_Annotations) {
     print "Features: ",$ann->as_text if ($ann->tagname eq "features");
     print "Comment: ",$ann->as_text if ($ann->tagname eq "comment");
     print "Title: ",$ann->as_text if ($ann->tagname eq "title");
     print "Organism: ",$ann->as_text if ($ann->tagname eq "organism");
     print "Definition: ",$ann->as_text if ($ann->tagname eq  

It does not work. For some gi numbers I can not get $seqobj, for  
other gi numbers
I can get $seqobj but not any annotation.

Could you please help me how to get information from ncbi with a  
Thank you.

Jingjun Sun

----- End forwarded message -----

Bioperl-guts-l mailing list
Bioperl-guts-l at portal.open-bio.org

More information about the Bioperl-l mailing list