tcplPrepOtpt: Map assay/chemcial ID values to annotation information

Description Usage Arguments Details Value Examples

View source: R/tcplPrepOtpt.R

Description

tcplPrepOtpt queries the chemical and assay information from the tcpl database, and maps the annotation information to the given data.

Usage

1
tcplPrepOtpt(dat, ids = NULL)

Arguments

dat

data.table, output from tcplLoadData

ids

Character, (optional) a subset of ID fields to map

Details

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.'

Value

The given data.table with chemical and assay information mapped

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Store the current config settings, so they can be reloaded at the end 
## of the examples
conf_store <- tcplConfList()
tcplConfDefault()

## Load some example data
d1 <- tcplLoadData(1)

## Check for chemical name in 'dat'
"chnm" %in% names(d1) ## FALSE

## Map chemical annotation only
d2 <- tcplPrepOtpt(d1, ids = "spid")
"chnm" %in% names(d2) ## TRUE
"acnm" %in% names(d2) ## FALSE

## Map all annotations 
d3 <- tcplPrepOtpt(d1) ## Also works if function is given d2
"chnm" %in% names(d2) ## TRUE
"acnm" %in% names(d2) ## TRUE

## Reset configuration
options(conf_store)

daynefiler/tcpl documentation built on Nov. 12, 2018, 12:43 a.m.