queryAnnotDB: Annotation Queries with ChEMBL IDs

Description Usage Arguments Details Value Examples

View source: R/query_fcts.R

Description

This function can be used to query compound annotations from the default resources as well as the custom resources stored in the SQLite annotation database. The default annotation resources are DrugAge, DrugBank, CMAP02 and LINCS. Detailed description of the SQLite database is available at the corresponding compoundCollectionData package. The customized compound annotations could be added/deleted by the customAnnot utilities.

Usage

1
queryAnnotDB(chembl_id, annot = c("DrugAge", "DrugBank", "CMAP02", "LINCS"))

Arguments

chembl_id

character vector of ChEMBL IDs.

annot

character vector of annotation resources, such as DrugAge, DrugBank, CMAP02, LINCS or names of the annotation tables added by users

Details

The input of this query function is a set of ChEMBL IDs, it returns a data.frame storing annotations of the input compounds from selected annotation resources defined by the annot argument.

Value

data.frame of annotation result

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
query_id <- c("CHEMBL1000309", "CHEMBL100014", "CHEMBL100109",
               "CHEMBL100", "CHEMBL1000", "CHEMBL10")
annot_res <- queryAnnotDB(query_id, annot=c("DrugAge", "LINCS"))

# Add a custom compound annotation table
chembl_id <- c("CHEMBL1000309", "CHEMBL100014", "CHEMBL10",
               "CHEMBL100", "CHEMBL1000", NA)
annot_tb <- data.frame(compound_name=paste0("name", 1:6),
        chembl_id=chembl_id,
        feature1=paste0("f", 1:6),
        feature2=rnorm(6))
addCustomAnnot(annot_tb, annot_name="mycustom")

# query custom annotation
annot_res2 <- queryAnnotDB(query_id, annot=c("LINCS", "mycustom"))

yduan004/compoundCollection documentation built on Sept. 20, 2020, 5:59 a.m.