getMatrixFromExpressionSet: Obtain the expression matrix from an ExpressionSet object

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

View source: R/fct_SpeCond_2.R

Description

getMatrixFromExpressionSet method returns an matrix of expression values from an ExpressionSet object. It takes into consideration the need of summarizing the samples values by conditions to perform the SpeCond analysis

Usage

1
2
getMatrixFromExpressionSet(expSet, condition.factor = NULL, 
                       condition.method = c("mean", "median","max"))

Arguments

expSet

an ExpressionSet object

condition.factor

a factor object of length equal to the number of columns (samples) of the ExpressionSet object specifying which sample(s) belong to which condition (condition.factor levels); can be extracted from the phenoData

condition.method

the method (mean, median or max) to summarise the samples by conditions (defined by the condition.factor vector)

Details

For each level of the condition.factor, the expression values of the ExpressionSet object are computed using the condition.method method. If there is only one sample for a condition the expression value is not changed if condition.factor is NULL, the expression matrix of the ExpressionSet object will simply be extracted using exprs()

Value

A matrix of expression values of size (number of row in the ExpressionSet * number of level of the condition.factor)

Author(s)

Florence Cavalli, florence@ebi.ac.uk

References

Biobase

See Also

SpeCond

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(SpeCond)
data(expSetSpeCondExample)
expSetSpeCondExample
f_Tissues=factor(paste("Tissue_",rep(1:32,each=2),sep=""))
f_Tissues
Mexp=getMatrixFromExpressionSet(expSetSpeCondExample,
  condition.factor=f_Tissues,condition.method="mean")
## or
Mexp=getMatrixFromExpressionSet(expSetSpeCondExample,
  condition.factor=expSetSpeCondExample$Tissue,condition.method="mean")

SpeCond documentation built on Nov. 8, 2020, 4:57 p.m.