Is there any way to obtain PubChem CID using IUPAC name ( via eutils ncbi )
1
0
Entering edit mode
10.0 years ago
dobule ▴ 10

Hi all, I am new to ncbi entrez eutility and got stuck with a problem, whenever i am trying a search:

eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=<db_name>&term=<term_name>

I am getting a whole lot of uid's but, i want only a particular id (i.e. of <term_name>)

Is there any way to achieve that.

pubchem ncbi • 3.0k views
ADD COMMENT
0
Entering edit mode

Check Entrez Direct: http://www.ncbi.nlm.nih.gov/books/NBK179288/ It's eutils in a more usable package.

ADD REPLY
0
Entering edit mode

Would help to show an example term and output. Depending on the precise search term, getting "a whole lot of uids" is a common and expected result.

ADD REPLY
0
Entering edit mode

In my case i need to get a cid (for eg. phenol "CID:996") and then link that id programatically to other db's.

but if I do:

eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pccompound&term=phenol

I'm getting a whole lot of uid's but I only need a particular id (i.e CID:996) and not all other id's as that'll be an overhead.

So, is there any way to get id for the exact term(here:phenol) using eutils[just one id].

ADD REPLY
0
Entering edit mode

You can use qualifiers in the term. For example:

term=phenol[UPAC] 

to search by IUPAC Name. However in this case (and many others), that will still not result in a 1:1 mapping to UIDs. Looks from your comment like you found a good solution.

ADD REPLY
0
Entering edit mode

Yes, even IUPAC field provides a bunch of id's.

Wonder if it can be done via eutils.

ADD REPLY
0
Entering edit mode
10.0 years ago
wdiwdi ▴ 380

You can script this easily with the Cactvs Cheminformatics Toolkit (free academic versions at www.xemistry.com/academic)

Here an example for aspirin, Tcl version:

---snip--

echo [ens get "2-acetyloxybenzoic acid" E_CID"]

---snip--

Python version:

---snip--

print(Ens("2-acetyloxybenzoic acid").E_CID)

---snip---

Please be aware that the name resolution is not 100% reliable, and that above script retrieves the structure with most references - the case with multiple CIDs cited above is not an error, but an indication of limitations in name generation, structure standardization, etc.

ADD COMMENT
1
Entering edit mode

Thanks,

but I manage to get cid using iupac name with the help of NCBI PUG REST using:

http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/phenol/

and then parse the cid (I don't know if it is the right way to do)

but my main q is to get a particular id for the "exact" term using eutils.

ADD REPLY
0
Entering edit mode

Well, internally the toolkit uses EUtils and PUG to communicate with PubChem. But if the method is more important to you than the result, this may of course not be the right solution.

ADD REPLY

Login before adding your answer.

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