Question: Retrieve genus and species info using NCBI-EUtils
gravatar for Sej Modha
4.4 years ago by
Sej Modha4.6k
Glasgow, UK
Sej Modha4.6k wrote:

I am using following code in a perl script to retrieve ScientificName for a taxid. I would also like to retrieve other fields such as species and genus but when I used the get_contents_by_name method for any other item it gives me Can't call method "get_contents_by_name" on an undefined value error.

Any help would be appreciated.

      my $factory = Bio::DB::EUtilities->new(-eutil => 'esummary',
                                                -email => '',
                                                -db    => 'taxonomy',
                                                -id    => $taxid );
     my ($name)  = $factory->next_DocSum->get_contents_by_name('ScientificName');

    # print "$name\n";
     my ($genus) = $factory->next_DocSum->get_contents_by_name('Genus');
     print "$genus\n";


myposts eutilities ncbi • 1.2k views
ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by Sej Modha4.6k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1832 users visited in the last hour