Question: How To Fetch A Gene By Exact Hgnc Gene Symbol With Eutils?
2
gravatar for Reece
6.9 years ago by
Reece270
United States
Reece270 wrote:

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

ncbi eutils • 2.5k views
ADD COMMENTlink modified 6.9 years ago by Neilfws48k • written 6.9 years ago by Reece270
3
gravatar for Neilfws
6.9 years ago by
Neilfws48k
Sydney, Australia
Neilfws48k wrote:

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 COMMENTlink written 6.9 years ago by Neilfws48k

Yep, that solves it. Thanks!

ADD REPLYlink written 6.9 years ago by Reece270
Please log in to add an answer.

Help
Access

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