getPcCand.coassoc: Retrieve Literature Co-associations via PubChem

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ChemicalCuration.R

Description

Retrieves the various types of literature co-associations from PubChem using display download. NOTE many results are truncated and functionality is preliminary. Thanks to Paul Thiessen, Leonid Zaslavsky and Evan Bolton from PubChem team for assistance.

Usage

1
getPcCand.coassoc(query, query_type, file_name="", timeout=30, test=FALSE)

Arguments

query

Input identifier, either a CID, MeSH ID or Gene symbol (as string) to search

query_type

Type of query. Accepted are currently "ChemicalNeighbor", "ChemicalGeneSymbolNeighbor", "ChemicalDiseaseNeighbor", "GeneSymbolChemicalNeighbor" or "DiseaseChemicalNeighbor".

file_name

File name for the CSV output. If empty, this is auto-created based on query_type and query and will overwrite existing files of the same name.

timeout

The timeout, in seconds.

test

Default FALSE is fine for all query types except "DiseaseChemicalNeighbor" which should be TRUE. NOTE that this comes without any guarantee of continuous functionality

Details

PubChem have a range of literature co-association data that may be useful for identification purposes, see for example https://pubchem.ncbi.nlm.nih.gov/compound/2256#section=Chemical-Co-Occurrences-in-Literature. This function enables you to retrieve identifiers, names, article counts and the co-occurrence score for several cases, leveraging the current display format. NOTE that as the display may change, this function may break without warning; in which case please post an issue to https://github.com/schymane/RChemMass/issues.

Current cases accepted are: ChemicalNeighbor, ChemicalGeneSymbolNeighbor, ChemicalDiseaseNeighbor, GeneSymbolChemicalNeighbor and DiseaseChemicalNeighbor.

Available but not yet implemented (possible upon request) are Gene-Disease, Disease-Gene, Gene-Gene and Disease-Disease co-associations, as these do not directly involve chemicals.

Functions that work off the full dataset (i.e. are not truncated) are in progress.

Value

File name of a 4-column CSV containing the coassociated identifier, name, article count and co-occurrence score. Header varies with query type.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

References

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

PubChem Knowledge Panels: https://pubchemdocs.ncbi.nlm.nih.gov/knowledge-panels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Chemical-Chemical co-associations (truncated at 25)
getPcCand.coassoc(query = '2256',query_type = 'ChemicalNeighbor')
# Chemical-Gene co-associations (truncated at 100)
getPcCand.coassoc(query = '2256',query_type = 'ChemicalGeneSymbolNeighbor')
# Chemical-Disease co-associations (truncated at 25)
getPcCand.coassoc(query = '2256',query_type = 'ChemicalDiseaseNeighbor')
# Gene-Chemical co-associations (truncated at 25)
getPcCand.coassoc(query = 'CLN3',query_type = 'GeneSymbolChemicalNeighbor')
Disease-Chemical co-associations (test=TRUE only; may break at any time)
getPcCand.coassoc(query = 'C000657245',query_type = 'DiseaseChemicalNeighbor', 
test=TRUE)

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