center_eSet: A function to to center columns of eSet channels on either...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utility-functions.R

Description

This function works on the eSet assayDataElement specified as 'channel' and sweeps out either the 'peak', ( max of the kernel density), 'mean' or 'median' statistic from each column. A modified eSet containing the centered assayDataElement is returned, with an additional .shift column included in the pData slot recording the shift statistic for each sample.

Usage

1
center_eSet(eset, channel, center = "peak", report.center=FALSE)

Arguments

eset

An eSet object

channel

A valid channel / AssayDataElementName of 'eset'

center

One of 'peak', 'mean', 'median' or 'none', specifying the statistic to sweep from each column of 'channel' in 'eset'. If 'peak', the max of the kernel density is determined and used a statistic in sweep. If 'none', the original 'eset' is returned.

report.center

Logical, include the shift applied to 'channel' in the pData slot of the returned NChannelSet ?

Value

An eSet of the same class as 'eset' with the centered 'channel' assayData slot. The swept-out statistic is recorded in the 'channel'.shift column of the phenoData slot. In addition, the median absolute deviation around the center is returned.

Author(s)

Thomas Sandmann

See Also

sweep

Examples

1
2
3
4
5
6
7
8
data( gCMAPData )

## column means of uncentered z-scores
round( apply( assayDataElement( gCMAPData, "z"), 2, mean, na.rm=TRUE), 2)

## column means of centered z-scores
centered <- center_eSet( gCMAPData, "z", "mean")
round( apply( assayDataElement( centered, "z"), 2, mean, na.rm=TRUE), 2)

gCMAP documentation built on April 29, 2020, 3:54 a.m.