matR (version 0.9)

transform.biom: Apply mathematical transformations to BIOM data

Description

Prepare an object of class biom for further analysis by applying selected transformations with specified parameters.

Usage

"transform"(`_data`, ...)
t_ColCenter(x, ...) t_ColScale(x, ...) t_Log(x, ...) t_NA2Zero(x, ...) t_Threshold(x, entry.min=2, row.min=2, col.min=2)

Arguments

_data
an object (biom)
x
a matrix
entry.min
minimum to retain an entry (numeric)
row.min
minimum sum to retain a row (numeric)
col.min
minimum sum to retain a column (numeric)
...
transformations to apply and arguments to them

Value

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

See Also

BIOM.utils::biom, transform

Examples

####  simple log-transform
transform (xx1, t_Log)

####  additional filters
transform (xx1, t_NA2Zero, t_Threshold, t_Log)

####  what is lost with more stringent filtering of low-abundance annotations
yy <- transform (xx2, t_NA2Zero, t_Threshold, t_Log)
zz <- transform (xx2, t_NA2Zero, t_Threshold=list(entry.min=5, row.min=10), t_Log)
setdiff (rownames (yy), rownames (zz))

####  each sample centered around zero; scaling columnwise by standard deviation
transform (xx4, t_NA2Zero, t_Threshold, t_Log, t_ColCenter, t_ColScale)

####  defining a new transformation that indicates presence / absence
t_Indicator <- function (x, ...) { ifelse (x,1,0) }
transform (xx1, t_Threshold = list(entry.min=5), t_Indicator)