GetCid: Match CID according to other identifiers

View source: R/api_pubchem.R

GetCidR Documentation

Match CID according to other identifiers

Description

GetCid matches CID of drugs according to user-provided identifiers.

Usage

GetCid(ids, type, quiet = TRUE)

Arguments

ids

A vector of characters contains the identifiers of drugs for searching.

type

A character indicates the type of identifiers passed to id argument. Available types are:

  • smiles Identifiers of drugs in the simplified molecular-input line-entry system (SMILES).

  • inchikey Standard InChIKey of the drugs.

  • name Name for drugs. This type could be used for searching synonyms, NCGC IDs, Chembl IDs, CAS or any other kind of identifiers.

quiet

A logical value. If it is TRUE, the error message during retrieving data will not show in console.

Details

GetCid queries PubChem database via PUG REST to search matched CIDs of drugs according to other identifiers. Available identifiers are: name, SMILES, InChIKey.

Following is the "API USAGE POLICY": Please note that PUG REST is not designed for very large volumes (millions) of requests. We ask that any script or application not make more than 5 requests per second, in order to avoid overloading the PubChem servers. If you have a large data set that you need to compute with, please contact us for help on optimizing your task, as there are likely more efficient ways to approach such bulk queries.

Value

A data frame contains two columns:

  • input_id The identifiers input by user.

  • cid The matched CID.

Author(s)

Jing Tang jing.tang@helsinki.fi Shuyu Zheng shuyu.zheng@helsinki.fi

Examples

GetCid("aspirin", "name", quiet = TRUE)

DrugComb/TidyComb documentation built on June 22, 2022, 2:49 a.m.