MultiAssayExperiment-class | R Documentation |
The MultiAssayExperiment
class can be used to manage results of
diverse assays on a collection of specimen. Currently, the class can handle
assays that are organized instances of
SummarizedExperiment
,
ExpressionSet
, matrix
, RaggedExperiment
(inherits from GRangesList
), and RangedVcfStack
.
Create new MultiAssayExperiment
instances with the homonymous
constructor, minimally with the argument ExperimentList
,
potentially also with the arguments colData
(see section below) and
sampleMap
.
## S4 method for signature 'MultiAssayExperiment'
show(object)
## S4 method for signature 'MultiAssayExperiment'
length(x)
## S4 method for signature 'MultiAssayExperiment'
names(x)
## S4 method for signature 'MultiAssayExperiment'
updateObject(object, ..., verbose = FALSE)
## S4 method for signature 'MultiAssayExperiment'
dimnames(x)
## S4 method for signature 'MultiAssayExperiment'
c(x, ..., sampleMap = NULL, mapFrom = NULL)
## S4 method for signature 'MultiAssayExperiment'
exportClass(
object,
dir = tempdir(),
fmt,
ext,
match = FALSE,
verbose = TRUE,
...
)
## S4 method for signature 'MultiAssayExperiment'
assays(x, withDimnames = TRUE, ...)
## S4 method for signature 'MultiAssayExperiment,missing'
assay(x, i, withDimnames = TRUE, ...)
## S4 method for signature 'MultiAssayExperiment,numeric'
assay(x, i, withDimnames = TRUE, ...)
## S4 method for signature 'MultiAssayExperiment,character'
assay(x, i, withDimnames = TRUE, ...)
object , x |
A |
... |
Additional arguments for supporting functions. See details. |
verbose |
|
sampleMap |
|
mapFrom |
Either a |
dir |
|
fmt |
|
ext |
|
match |
|
withDimnames |
logical (default TRUE) whether to return dimension names included in the object |
i |
An integer or character scalar indicating the assay to return |
The dots (...
) argument allows the user to specify additional
arguments in several instances.
subsetting [: additional arguments sent to
findOverlaps
.
mergeReplicates: used to specify arguments for the simplify
functional argument
assay: may contain withDimnames, which is forwarded to assays
combining c: compatible MultiAssayExperiment
classes
passed on to the ExperimentList
constructor,
can be a list
, List
, or a series of
named arguments. See the examples below.
A MultiAssayExperiment
object
show(MultiAssayExperiment)
: Show method for a
MultiAssayExperiment
length(MultiAssayExperiment)
: Get the length of ExperimentList
names(MultiAssayExperiment)
: Get the names of the ExperimentList
updateObject(MultiAssayExperiment)
: Update old serialized MultiAssayExperiment
objects to new API
dimnames(MultiAssayExperiment)
: Get the dimension names
for a MultiAssayExperiment
object
c(MultiAssayExperiment)
: Add a supported data class to the
ExperimentList
exportClass(MultiAssayExperiment)
: Export data from class to a series
of text files
assays(MultiAssayExperiment)
: Obtain a SimpleList
of assay
data for all available experiments in the object
assay(x = MultiAssayExperiment, i = missing)
: Convenience function for extracting the
assay of the first element (default) in the ExperimentList
. A numeric
or character
index can also be provided
ExperimentList
A ExperimentList
class object for
each assay dataset
colData
A DataFrame
of all clinical/specimen data available
across experiments
sampleMap
A DataFrame
of translatable identifiers
of samples and participants
metadata
Additional data describing the
MultiAssayExperiment
object
drops
A metadata list
of dropped information
The colData
slot is a collection of primary specimen data valid
across all experiments. This slot is strictly of class
DataFrame
but arguments for the constructor function
allow arguments to be of class data.frame
and subsequently coerced.
The ExperimentList
slot is designed to contain results from
each experiment/assay. It contains a SimpleList
.
The sampleMap
contains a DataFrame
of translatable
identifiers of samples and participants or biological units. The standard
column names of the sampleMap
are "assay", "primary", and "colname".
Note that the "assay" column is a factor corresponding to the names of each
experiment in the ExperimentList
. In the case where these names do
not match between the sampleMap
and the experiments, the documented
experiments in the sampleMap
take precedence and experiments are
dropped by the harmonization procedure. The constructor function will
generate a sampleMap
in the case where it is not provided and this
method may be a 'safer' alternative for creating the MultiAssayExperiment
(so long as the rownames are identical in the colData
, if provided).
An empty sampleMap
may produce empty experiments if the levels of the
"assay" factor in the sampleMap
do not match the names in the
ExperimentList
.
Convert a list
or S4 List
to a MultiAssayExperiment object using the
methods::as function.
In the following example, x
is either a list
or List
:
as(x, "MultiAssayExperiment")
Convert a MultiAssayExperiment
to MAF
class object using the
methods::as function.
In the following example, x
is a MultiAssayExperiment
:
MultiAssayExperimentToMAF(x)
MultiAssayExperiment-methods for slot modifying methods, MultiAssayExperiment API
example("MultiAssayExperiment")
## Subsetting
# Rows (i) Rows/Features in each experiment
mae[1, , ]
mae[c(TRUE, FALSE), , ]
# Columns (j) Rows in colData
mae[, rownames(colData(mae))[3:2], ]
# Assays (k)
mae[, , "Affy"]
## Complete cases (returns logical vector)
completes <- complete.cases(mae)
compMAE <- mae[, completes, ]
compMAE
colData(compMAE)
example("MultiAssayExperiment")
## Add an experiment
test1 <- mae[[1L]]
colnames(test1) <- rownames(colData(mae))
## Combine current MultiAssayExperiment with additional experiment
## (no sampleMap)
c(mae, newExperiment = test1)
test2 <- mae[[3L]]
c(mae, newExp = test2, mapFrom = 3L)
## Add experiment using experiment name in mapFrom
c(mae, RNASeqGeneV2 = test2, mapFrom = "RNASeqGene")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.