How To Fetch A Gene By Exact Hgnc Gene Symbol With Eutils?
1
2
Entering edit mode
9.1 years ago
Reece ▴ 310

I'd like to fetch genes solely by official HGNC gene symbol.

Eutils appears to search aliases in addition to the official symbol. Does anyone know how to restrict this search solely to gene symbol?

For example:

curl -g 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=(prx[Gene+Name])+AND+human[Organism]'

returns (edited):

<eSearchResult><Count>2</Count><RetMax>2</RetMax><RetStart>0</RetStart><IdList>
<Id>9588</Id>
<Id>57716</Id>
</IdList>

9588 is PRDX6, which has PRX as an alias.

57716 is PRX, the gene I searched for.

I've also tried adding PRX[title] to the query, but that is not sufficient.

I'm currently fetching both and filtering on the xpath expression /Entrezgene-Set/Entrezgene/Entrezgene_gene/Gene-ref/Gene-ref_locus/text(), but that seems silly.

Is there a better way?

Thanks,

Reece

eutils ncbi • 3.1k views
ADD COMMENT
3
Entering edit mode
9.1 years ago
Neilfws 49k

You can try the qualifier [PREF] which is "Preferred symbol of the gene."

Here's what I got using the BioRuby implementation of EUtils:

require 'bio'
Bio::NCBI.default_email = "me@me.com"
ncbi   = Bio::NCBI::REST.new
search = ncbi.esearch("PRX[GENE] AND Homo+sapiens[ORGN]", {"db" => "gene", "retmax" => 200})
=> ["9588", "57716"]
search = ncbi.esearch("PRX[PREF] AND Homo+sapiens[ORGN]", {"db" => "gene", "retmax" => 200})
=> ["57716"]

Try:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=gene

for a full list of qualifiers that can be supplied to query the Gene database.

ADD COMMENT
0
Entering edit mode

Yep, that solves it. Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 1114 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