getPCxrefs.count: Retrieve PubMedID and PatentID Counts from PubChem

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ChemicalCuration.R

Description

Retrieves PubMedIDs and PatentIDs from PubChem and returns a total count of each, using PUG REST. Default behaviour is to retrieve by CID.

Usage

1
2
getPCxrefs.count(query, from = "cid", xrefs="PatentID,PubMedID",
timeout=30)

Arguments

query

string of the identifier (CID, InChIKey, name) to be converted

from

Type of input ID (default "cid", i.e. PubChem Compound ID, alternative "inchikey" to retrieve via InChIKey, "name" to retrieve via name (caution), "inchi" to retrieve by InChI, or others (untried)).

xrefs

The type of reference information to retrieve. Default "PatentID,PubMedID". While any other string terms recognised by PUG REST can be used, these are currently ignored.

timeout

The timeout, in seconds. For records with many entries, this may need to be increased - e.g. if only one NA is returned.

Details

For this function to work as expected, only a unique search query should be used (e.g. CID). At this stage, only counts of PubMedIDs and Patent Counts will be returned. Thanks to Paul Thiessen and Evan Bolton from PubChem team for assistance.

Value

A list containing the PCID and total counts of patent IDs and PubMed IDs

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

References

PubChem search: http://pubchem.ncbi.nlm.nih.gov/

PubChem PUG REST: https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest

Examples

1
2
3
4
5
6
getPCxrefs.count("22206")
getPCxrefs.count("FZXISNSWEXTPMF-UHFFFAOYSA-N",from="inchikey")
#a non-live record (returns NAs)
getPCxrefs.count("4644")
#a CID with many entries (tests timeout)
getPCxrefs.count("2244")

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