This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get Gene Symbol From A Gene Identifier Eutils Help

I was wondering if it was possible to get the gene symbol using a gene identifier( or perhaps a taxid?) from the eutils

ncbi eutils gene

A taxid identifies an organism. It could be linked to all genes for that organism but not "the gene symbol" (assuming you mean "for one gene"). Perhaps you could clarify the question a little?

1 answer

use esummary would do that if u want to get a symbol related with an entrez id(copied from bioperl eutils howto)

use Bio::DB::EUtilities;

my @ids     = qw(828392 790 470338);

my $factory = Bio::DB::EUtilities->new(-eutil => 'esummary',
                                       -email => 'mymail@foo.bar',
                                       -db    => 'gene',
                                       -id    => \@ids);

# iterate through the individual DocSum objects (one per ID)
while (my $ds = $factory->next_DocSum) {
    print "ID: ",$ds->get_id,"\n";
    # flattened mode, iterates through all Item objects
    while (my $item = $ds->next_Item('flattened'))  {
        # not all Items have content, so need to check...
        printf("%-20s:%s\n",$item->get_name,$item->get_content) if $item->get_content;
    }
    print "\n";
}

Log in to answer this question.