[Bioperl-l] get sequences over pubmed

jochen kohl at uni-duesseldorf.de
Thu Aug 7 05:34:15 EDT 2003


 Hallo,

I try to  get the sequences related to pubmed entry with bioperl. Just 
like to use the "display : Nukleotide links"
on the pubmed web site.  My first try was  generated Query with 
Bio::DB::Query::GenBanK->new(-db=>
pubmed, ..) but I don't find a way to get the sequence for the 
refference. So I try this :


    my $query_string = 'Vigilant [AUTH]  AND 1503-1507 AND 1991 [PDAT]';
    my $query = Bio::DB::Query::GenBank->new(-db=>'pubmed',
                                                                        
          -query=>$query_string);

    my $count = $query->count;

     if ($count == 1) {
        my $q = $query->query();
         $query = Bio::DB::Query::GenBank->new(-db=>'nucleotide',
                                                                        
          -query=>$q);
        }

    $db = new Bio::DB::GenBank(-delay=>'10s');
    my $stream = $db->get_Stream_by_query($query);
    while (my $seq = $stream->next_seq) {
            print " Seq : " . $seq->display_id() . "\n";
    }
       

But I'm not sure if the same query string find the only the sequences 
for the refference and same
query-string (like the example) don't work for the 'nucleotide' db.

I also looked by  *Bio::Biblio* to find the solution but I'm to blind.

Thanks for Help



More information about the Bioperl-l mailing list