Learn R Programming

webchem (version 0.1.0.0)

pc_prop: Retrieve compound properties from a pubchem CID

Description

Retrieve compound information from pubchem CID, see https://pubchem.ncbi.nlm.nih.gov/

Usage

pc_prop(cid, properties = NULL, verbose = TRUE, ...)

Arguments

cid
character; Pubchem ID (CID).
properties
character vector; properties to retrieve, e.g. c('MolecularFormula', 'MolecularWeight'). If NULL (default) all available properties are retrieved.
verbose
logical; should a verbose output be printed on the console?
...
currently not used.

Value

a data.frame

References

Wang, Y., J. Xiao, T. O. Suzek, et al. 2009 PubChem: A Public Information System for Analyzing Bioactivities of Small Molecules. Nucleic Acids Research 37: 623–633.

Kim, Sunghwan, Paul A. Thiessen, Evan E. Bolton, et al. 2016 PubChem Substance and Compound Databases. Nucleic Acids Research 44(D1): D1202–D1213.

Kim, S., Thiessen, P. A., Bolton, E. E., & Bryant, S. H. (2015). PUG-SOAP and PUG-REST: web services for programmatic access to chemical information in PubChem. Nucleic acids research, gkv396.

See Also

get_cid to retrieve Pubchem IDs.

Examples

Run this code

# might fail if API is not available
pc_prop(5564)

###
# multiple CIDS
comp <- c('Triclosan', 'Aspirin')
cids <- unlist(get_cid(comp))
pc_prop(cids, properties = c('MolecularFormula', 'MolecularWeight', 'CanonicalSMILES'))

Run the code above in your browser using DataLab