ExpressionSet
Class to Contain and Describe High-Throughput Expression Level Assays.
Container for high-throughput assays and experimental
metadata. ExpressionSet
class is derived from
eSet
, and requires a matrix named exprs
as
assayData member.
- Keywords
- classes
Usage
## Instance creation
ExpressionSet(assayData, phenoData=annotatedDataFrameFrom(assayData, byrow=FALSE), featureData=annotatedDataFrameFrom(assayData, byrow=TRUE), experimentData=MIAME(), annotation=character(), protocolData=annotatedDataFrameFrom(assayData, byrow=FALSE), ...)
## Additional methods documented below
Arguments
- assayData
- A
matrix
of expression values, or anenvironment
.When
assayData
is amatrix
, the rows represent probe sets (features inExpressionSet
parlance). Columns represent samples. When present, row names identify features and column names identify samples. Row and column names must be unique, and consistent with row names offeatureData
andphenoData
, respectively. The assay data can be retrieved withexprs()
.When
assayData
is an environment, it contains identically dimensioned matrices like that described in the previous paragraph. One of the elements of the environment must be named exprs; this element is returned withexprs()
. - phenoData
- An optional
AnnotatedDataFrame
containing information about each sample. The number of rows inphenoData
must match the number of columns inassayData
. Row names ofphenoData
must match column names of the matrix / matricies inassayData
. - featureData
- An optional
AnnotatedDataFrame
containing information about each feature. The number of rows infeatureData
must match the number of rows inassayData
. Row names offeatureData
must match row names of the matrix / matricies inassayData
. - experimentData
- An optional
MIAME
instance with meta-data (e.g., the lab and resulting publications from the analysis) about the experiment. - annotation
- A
character
describing the platform on which the samples were assayed. This is often the name of a Bioconductor chip annotation package, which facilitated down-stream analysis. - protocolData
- An optional
AnnotatedDataFrame
containing equipment-generated information about protocols. The number of rows and row names ofprotocolData
must agree with the dimension and column names ofassayData
. - ...
- Additional arguments, passed to
new("ExpressionSet", ...)
and available for classes that extendExpressionSet
.
Extends
Directly extends class eSet
.
Creating Objects
ExpressionSet
instances are usually created through
ExpressionSet()
.
Slots
Inherited from eSet
:
assayData
:- Contains matrices with equal
dimensions, and with column number equal to
nrow(phenoData)
.assayData
must contain a matrixexprs
with rows representing features (e.g., probe sets) and columns representing samples. Additional matrices of identical size (e.g., representing measurement errors) may also be included inassayData
. Class:AssayData-class
phenoData
:- See
eSet
featureData
:- See
eSet
experimentData
:- See
eSet
annotation
:- See
eSet
protocolData
:- See
eSet
Methods
Class-specific methods.
as(exprSet,"ExpressionSet")
- Coerce objects of
exprSet-class
toExpressionSet
as(object,"data.frame")
- Coerce objects of
ExpressionSet-class
todata.frame
by transposing the expression matrix and concatenatingphenoData
exprs(ExpressionSet)
,exprs(ExpressionSet,matrix)<-
- Access and
set elements named
exprs
in theAssayData-class
slot. esApply(ExpressionSet, MARGIN, FUN, ...)
- 'apply'-like function to conveniently operate on
ExpressionSet
objects. SeeesApply
. write.exprs(ExpressionSet)
- Write expression values to
a text file. It takes the same arguments as
write.table
eSet
:
updateObject(object, ..., verbose=FALSE)
- Update instance to current version, if necessary. See
updateObject
andeSet
isCurrent(object)
- Determine whether version of object is current. See
isCurrent
isVersioned(object)
- Determine whether object contains a 'version' string describing its structure . See
isVersioned
assayData(ExpressionSet)
:- See
eSet
sampleNames(ExpressionSet)
andsampleNames(ExpressionSet)<-
:- See
eSet
featureNames(ExpressionSet)
,featureNames(ExpressionSet, value)<-
:- See
eSet
dims(ExpressionSet)
:- See
eSet
phenoData(ExpressionSet)
,phenoData(ExpressionSet,value)<-
:- See
eSet
varLabels(ExpressionSet)
,varLabels(ExpressionSet, value)<-
:- See
eSet
varMetadata(ExpressionSet)
,varMetadata(ExpressionSet,value)<-
:- See
eSet
pData(ExpressionSet)
,pData(ExpressionSet,value)<-
:- See
eSet
varMetadata(ExpressionSet)
,varMetadata(ExpressionSet,value)
- See
eSet
experimentData(ExpressionSet)
,experimentData(ExpressionSet,value)<-
:- See
eSet
pubMedIds(ExpressionSet)
,pubMedIds(ExpressionSet,value)
- See
eSet
abstract(ExpressionSet)
:- See
eSet
annotation(ExpressionSet)
,annotation(ExpressionSet,value)<-
- See
eSet
protocolData(ExpressionSet)
,protocolData(ExpressionSet,value)<-
- See
eSet
combine(ExpressionSet,ExpressionSet)
:- See
eSet
storageMode(ExpressionSet)
,storageMode(ExpressionSet,character)<-
:- See
eSet
initialize(ExpressionSet)
:- Object instantiation, used
by
new
; not to be called directly by the user. updateObject(ExpressionSet)
:- Update outdated versions
of
ExpressionSet
to their current definition. SeeupdateObject
,Versions-class
. validObject(ExpressionSet)
:- Validity-checking method, ensuring
that
exprs
is a member ofassayData
.checkValidity(ExpressionSet)
imposes this validity check, and the validity checks ofeSet
. makeDataPackage(object, author, email, packageName, packageVersion, license, biocViews, filePath, description=paste(abstract(object), collapse="\n\n"), ...)
-
Create a data package based on an ExpressionSet object. See
makeDataPackage
. as(exprSet,ExpressionSet)
:- Coerce
exprSet
toExpressionSet
. as(eSet,ExpressionSet)
:- Coerce the
eSet
portion of an object toExpressionSet
. show(ExpressionSet)
- See
eSet
dim(ExpressionSet)
,ncol
- See
eSet
ExpressionSet[(index)
:- See
eSet
ExpressionSet$
,ExpressionSet$<-
- See
eSet
ExpressionSet[[i]]
,ExpressionSet[[i]]<-
- See
eSet
See Also
Examples
# create an instance of ExpressionSet
ExpressionSet()
ExpressionSet(assayData=matrix(runif(1000), nrow=100, ncol=10))
# update an existing ExpressionSet
data(sample.ExpressionSet)
updateObject(sample.ExpressionSet)
# information about assay and sample data
featureNames(sample.ExpressionSet)[1:10]
sampleNames(sample.ExpressionSet)[1:5]
experimentData(sample.ExpressionSet)
# subset: first 10 genes, samples 2, 4, and 10
expressionSet <- sample.ExpressionSet[1:10,c(2,4,10)]
# named features and their expression levels
subset <- expressionSet[c("AFFX-BioC-3_at","AFFX-BioDn-5_at"),]
exprs(subset)
# samples with above-average 'score' in phenoData
highScores <- expressionSet$score > mean(expressionSet$score)
expressionSet[,highScores]
# (automatically) coerce to data.frame
lm(score~AFFX.BioDn.5_at + AFFX.BioC.3_at, data=subset)
Community examples
ExpressionSet, ExpressionSet, ExpressionSet-class, ExpressionSet,missing-method, ExpressionSet,environment-method, ExpressionSet,matrix-method, exprs,ExpressionSet-method, exprs<-,ExpressionSet,matrix-method, initialize,ExpressionSet-method, coerce,exprSet,ExpressionSet-method, coerce,eSet,ExpressionSet-method, coerce,ExpressionSet,data.frame-method, esApply,ExpressionSet-method, updateObject,ExpressionSet-method, makeDataPackage,ExpressionSet-method, as.data.frame.ExpressionSet, write.exprs or write.exprs,ExpressionSet-method in your example