Yep, that solves it. Thanks!
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
1 answer
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.
Log in to answer this question.