View source: R/summarizeProbesets.R
summarizeProbesets | R Documentation |
The summarizeRows
function summarizes (collapses) rows of a numeric
matrix by calculating summarizing statistics of rows that belong to the same
factor level.
summarizeProbesets(
eset,
index.name,
fun = mean,
keep.nonindex = FALSE,
keep.featureNames = FALSE,
...
)
eset |
An |
index.name |
Charcter, one column name in the |
fun |
Function or character, the function used to summarize probes,
|
keep.nonindex |
Logical, whether probesets without valid indices should be kept or not. |
keep.featureNames |
Logical, whether the featureNames of the input
object should be kept whenever possible. When multiple probesets are
summarized into one value representing, for example, one gene (by GeneID),
one arbitrary probeset is used to name the value when this option is set to
|
... |
Futher parameters passed to the function |
summarizeRows
is called internally by summarizeProbesets
to
collapse probesets that belong to one index (e.g. GeneID).
The action of this function is univariate: namely the fun
is applied
to all probesets on each sample independently. For example, if fun
is
mean
, the average value of mutliple probesets is taken for each
sample. With this function, there is no way to distinguish probesets on
their expression profiles (for instance: find the probeset with the maximum
average signal).
An ExpressionSet
, with probesets summarized by indices
specified.
Jitao David Zhang <jitao_david.zhang@roche.com>
summarizeRows
in the ribiosUtils
package.
data(ribios.ExpressionSet, package="ribiosExpression")
ribios.mean <- summarizeProbesets(ribios.ExpressionSet,
index.name="GeneID", fun=mean)
ribios.mean
data(ribios.ExpressionSet, package="ribiosExpression")
ribios.mean.keepFeatureNames <- summarizeProbesets(ribios.ExpressionSet,
index.name="GeneID", fun=mean, keep.featureNames=TRUE)
ribios.mean
ribios.inval.mean <- summarizeProbesets(ribios.ExpressionSet,
index.name="GeneID", fun=mean, keep.nonindex=TRUE)
## the underlying method
ribios.meanMat <- ribiosUtils::summarizeRows(exprs(ribios.ExpressionSet),
fData(ribios.ExpressionSet)$GeneID, mean)
stopifnot(identical(exprs(ribios.mean), ribios.meanMat))
## keep old featureNames
ribios.inval.mean.old <- summarizeProbesets(ribios.ExpressionSet,
index.name="GeneID", fun=mean, keep.nonindex=TRUE, keep.featureNames=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.