Get Gene Symbol From A Gene Identifier Eutils Help
1
0
Entering edit mode
11.4 years ago

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 • 3.0k views
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode
11.4 years ago
ewre ▴ 250

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";
}
ADD COMMENT
0
Entering edit mode

The URL to to fetch this from the command line is, for example:

curl -g 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=1636,351'

Then you can extract the 'Name' Item in the language of your choice.

ADD REPLY

Login before adding your answer.

Traffic: 2729 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6