getSuspectIdentifiers: Get PubChem CID, ChemSpider ID and CAS from InChIKey via...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ChemicalCuration.R

Description

A wrapper function to obtain identifiers from an InChIKey using various webservices. PubChem CIDs are obtained with getPcId from PubChem direct (https://pubchem.ncbi.nlm.nih.gov/), ChemSpider IDs directly from ChemSpider (http://www.chemspider.com/) with getCSID. CAS numbers are retrieved using getCactus from Cactus (https://cactus.nci.nih.gov/chemical/structure); if this fails the Chemical Translation Service (CTS, http://cts.fiehnlab.ucdavis.edu/ is queried. Options are given to return all CAS numbers, the "smallest" CAS number or the first entry.

Usage

1
getSuspectIdentifiers(InChIKey, allCAS=FALSE, sep=",", minCAS=TRUE)

Arguments

InChIKey

Valid InChIKey used to retrieve information.

allCAS

Default FALSE will result in only one CAS number. If TRUE, all CAS are returned in one string, separated by sep. This overrides minCAS.

sep

Determines the separator used with allCAS, default ",".

minCAS

Default TRUE returns the smallest CAS number (shortest string) if allCAS=FALSE. If FALSE, returns the first CAS number in the list.

Value

Returns a list with the resulting identifiers, with NA if the query failed.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

getCactus, getPcId, getCSID , getCtsRecord, getSuspectInChIKey.

Examples

1
2
3
4
5
benz_key <- "UHOVQNZJYSORNB-UHFFFAOYSA-N"
getSuspectIdentifiers(benz_key)
getSuspectIdentifiers(benz_key,allCAS=TRUE)
getSuspectIdentifiers(benz_key,allCAS=FALSE,minCAS=TRUE)
getSuspectIdentifiers(benz_key,allCAS=FALSE,minCAS=FALSE)

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.