[Bioperl-l] Eutilities Batch

Chris Fields cjfields at uiuc.edu
Thu Oct 5 13:31:33 EDT 2006


I'll look into it.  I'm busy updating the EUtilities tools now.

Chris

On Oct 5, 2006, at 9:09 AM, Bernd Web wrote:

> Hi,
>
> I am using the new EUtilities. It looks great.
> I was trying to use epost followed by elink but i get an error. The
> same error is actually given with the example on
> http://doc.bioperl.org/bioperl-live/Bio/DB/EUtilities/elink.html:
> Can't call method "get_databases" on an undefined value at EU.pl  
> line 25.
>
> For completeness, the code is shown below too.
>
> Any suggestions what is going wrong?
>
> Regards,
> Bernd
>
> # chain EUtilities for complex queries
>
>   use Bio::DB::EUtilities;
>
>   my $esearch = Bio::DB::EUtilities->new(-eutil      => 'esearch',
>                                          -db         => 'pubmed',
>                                          -term       => 'hutP',
>                                          -usehistory => 'y');
>
>   $esearch->get_response; # parse the response, fetch a cookie
>
>   my $elink = Bio::DB::EUtilities->new(-eutil        => 'elink',
>                                        -db           =>  
> 'protein,taxonomy',
>                                        -dbfrom       => 'pubmed',
>                                        -cookie       => $esearch- 
> >next_cookie,
>                                        -cmd          => 'neighbor');
>
>   # this retrieves the Bio::DB::EUtilities::ElinkData object
>
>   my ($linkset) = $elink->next_linkset;
>   my @ids;
>
>   # step through IDs for each linked database in the ElinkData object
>
>   for my $db ($linkset->get_databases) {
>     @ids = $linkset->get_LinkIds_by_db($db); #returns primary ID's
>     # do something here
>   }
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list