repMeans: Compute mean of replicated spots

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

View source: R/repMeans.R

Description

Compute mean of replicated spots where additionally spot flags may incorporated.

Usage

1
repMeans(x, flags, use.flags = NULL, ndups, spacing, method, ...)

Arguments

x

matrix or data.frame of expression values

flags

matrix or data.frame of spot flags; must have same dimension as x

use.flags

should flags be included and in which way; cf. section details

ndups

integer, number of replicates on chip. The number of rows of x must be divisible by ndups

spacing

the spacing between the rows of 'x' corresponding to replicated spots, spacing = 1 for consecutive spots; cf. function unwrapdups in package "limma"

method

function to aggregate the replicated spots. If missing, the mean is used.

...

optional arguments to method.

Details

The incorporation of spot flags is controlled via argument use.flags.

NULL: flags are not used; minimum flag value of replicated spots is returned

"max": only spots with flag value equal to the maximum flag value of replicated spots are used

"median": only spots with flag values larger or equal to median of replicated spots are used

"mean": only spots with flag values larger or equal to mean of replicated spots are used

Value

LIST with components

exprs

mean of expression values

flags

flags for mean expression values

Note

A first version of this function appeared in package SLmisc.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

See Also

unwrapdups

Examples

1
2
3
4
## only a dummy example
M <- matrix(rnorm(1000), ncol = 10)
FL <- matrix(rpois(1000, lambda = 10), ncol = 10) # only for this example
res <- repMeans(x = M, flags = FL, use.flags = "max", ndups = 5, spacing = 20)

MKomics documentation built on Aug. 8, 2021, 5:06 p.m.