transform.biom: Apply mathematical transformations to BIOM data

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'biom'
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

Details

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

Value

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

Note

The function transform() is an S3 generic in base R. However, the method documented here does not apply any existing methods and offers rather different functionality.

Author(s)

Daniel T. Braithwaite and Kevin P. Keegan

See Also

BIOM.utils::biom, transform

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
####  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)

matR documentation built on May 2, 2019, 6:53 a.m.