Description Usage Arguments Details Value Author(s) References Examples
View source: R/ChemicalCuration.R
Retrieves the Isomeric SMILES via name (synonyms) from PubChem using PUG REST. Note that more than one SMILES can be returned and the "best match" is usually at the top (i.e. n=1).
1 | getPCproperty.IsoSMILES(query, from = "name", to = "isomericsmiles", n=1, timeout=30)
|
query |
string of the compound name for which you need SMILES |
from |
Type of input ID (default |
to |
Type of output desired (default |
n |
Default |
timeout |
The timeout, in seconds. |
For this function to work as expected, only one search entry should be used with the default "name" and "isomericsmiles". n should only be adjusted if you know what you are doing (i.e. trust n=1 first). The URL can accept comma separated CIDs, but this is currently ignored downstream. Thanks to Paul Thiessen and Evan Bolton from PubChem team for assistance.
A list containing the CID and the Isomeric SMILES
Emma Schymanski <emma.schymanski@uni.lu>
PubChem search: http://pubchem.ncbi.nlm.nih.gov/
PubChem PUG REST: https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest
1 2 3 4 5 6 7 | getPCproperty.IsoSMILES("aspirin")
#an example with multiple results available (up to 3)
getPCproperty.IsoSMILES("carnitine")
getPCproperty.IsoSMILES("carnitine",n=1)
getPCproperty.IsoSMILES("carnitine",n=3)
# a nonsense example
getPCproperty.IsoSMILES("blah")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.