Entering edit mode
11.4 years ago
scott.goldweber
•
0
I was wondering if it was possible to get the gene symbol using a gene identifier( or perhaps a taxid?) from the eutils
I was wondering if it was possible to get the gene symbol using a gene identifier( or perhaps a taxid?) from the eutils
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";
}
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.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
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?