CIRgetR: R interface for chemical identifier translation through the...

Description Usage Arguments Details Value Author(s) References Examples

Description

Based on ID for structure (smiles, InchI) translate to Database identifiers (PubChem, ChemSpider, etc.) and more.

Usage

1
CIRgetR(id, to = c("pubchem_sid"), return.all = TRUE, progress = TRUE)

Arguments

id

character, matrix or data.frame containing InchIKey, InchI code or smiles (see Details)

to

value to translate "to""

return.all

limit results to single (first) output for each id

progress

show progress for translations

Details

This is an interface to the Chemical Identifier Resolver (CIR, http://cactus.nci.nih.gov/chemical/structure).

Value

comp1

data.frame containing the results of the translation

Author(s)

Dmitry Grapov

References

https://github.com/dgrapov/CIRgetR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#test
id<- c("C[N+](C)(C)[O-]", "CC(=O)Oc1ccccc1C(=O)O")      
opts<-c("smiles", "names", "iupac_name", "cas", "inchi", "stdinchi", "inchikey", "stdinchikey",
        "ficts", "ficus", "uuuuu", "image", "file", "mw", "monoisotopic_mass","chemspider_id",
        "pubchem_sid", "chemnavigator_sid", "formula", "chemnavigator_sid")     

translations<-sapply(1:length(opts), function(i)
    {
        CIRgetR(id=id,to=opts[i],return.all=FALSE)
    })
colnames(translations)<-opts    

#image test
CIRgetR(id,to="image")

dgrapov/CIRgetR documentation built on May 15, 2019, 7:21 a.m.