customAnnot: Add/Delete Custom Annotation

Description Usage Arguments Value Examples

Description

Functions could be used to add/delete user's custom compound annotations to the annotation SQLite database in the compoundCollectionData package. The added custom compound annotation table should contains a column named as chembl_id that represents the ChEMBL ids of the added compounds.

The listAnnot function lists the available annotation resources in the SQLite annotation database.

The defaultAnnot function sets the annotation SQLite database to the default one by deleting the existing one and re-downloading from AnnotationHub.

Usage

1
2
3
4
5
6
7
addCustomAnnot(annot_tb, annot_name)

deleteAnnot(annot_name)

listAnnot()

defaultAnnot()

Arguments

annot_tb

data.frame representing the custom annotation table, Note, it should contains a 'chembl_id' column representing the compound ChEMBL ids

annot_name

character(1), user defined name of the annotation table

Value

character vector of names of the annotation tables in the SQLite DB

character(1), path to the annotation SQLite database

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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")
## Not run: 
# Add another custom annotation table
chembl_id2 <- c("CHEMBL1000309", "CHEMBL100014", "CHEMBL100109",
               "CHEMBL100", "CHEMBL1000", NA)
annot_tb2 <- data.frame(cmp_name=paste0("cmp", 1:6),
        chembl_id=chembl_id2,
        feature3=paste0("c", 1:6),
        feature4=rnorm(6))
addCustomAnnot(annot_tb2, annot_name="another")

## End(Not run)
deleteAnnot("mycustom")
annot_names <- listAnnot()
# defaultAnnot()

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