tcplPrepOtpt | R Documentation |
tcplPrepOtpt
queries the chemical and assay information from the tcpl
database, and maps the annotation information to the given data.
tcplPrepOtpt(dat, ids = NULL)
dat |
data.table, output from |
ids |
Character, (optional) a subset of ID fields to map |
tcplPrepOtpt
is used to map chemical and assay identifiers to their
respective names and annotation information to create a human-readable table
that is more suitable for an export/output.
By default the function will map sample ID (spid), assay component id (acid), and assay endpoint ID (aeid) values. However, if 'ids' is not null, the function will only attempt to map the ID fields given by 'ids.'
The given data.table with chemical and assay information mapped
## Not run:
## Load some example data
d1 <- tcplLoadData(1)
## Check for chemical name in 'dat'
"chnm" %in% names(d1) ## FALSE
#' ## Map all annotations
d2 <- tcplPrepOtpt(d1) ##
"chnm" %in% names(d2) ## TRUE
"acnm" %in% names(d2) ## TRUE
## Map chemical annotation only
d3 <- tcplPrepOtpt(d1, ids = "spid")
"chnm" %in% names(d3) ## TRUE
"acnm" %in% names(d3) ## FALSE
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.