MultiAssayExperiment-helpers {MultiAssayExperiment} | R Documentation |
A set of helper functions were created to help clean and manipulate a MultiAssayExperiment object.
complete.cases: Returns a logical vector corresponding to 'colData' rows that have data across all experiments
duplicated: Returns a 'list' of 'LogicalList's that indicate what measurements originate from the same biological unit
intersectRows: Takes all common rows across experiments, excludes experiments with empty rownames
intersectColumns: A wrapper for complete.cases to return a MultiAssayExperiment with only those biological units that have measurements across all experiments
mergeReplicates: A function that combines duplicated / repeated measurements across all experiments and is guided by the duplicated return value
longFormat: A MultiAssayExperiment
method that
returns a small and skinny DataFrame. The colDataCols
arguments allows the user to append colData
columns to the data.
wideFormat: A function to return a wide DataFrame where
each row represents an observation. Optional colDataCols
can be
added when using a MultiAssayExperiment
.
intersectRows(x) intersectColumns(x) ## S4 method for signature 'MultiAssayExperiment' duplicated(x, incomparables = FALSE, ...) mergeReplicates(x, replicates = list(), simplify = BiocGenerics::mean, ...) ## S4 method for signature 'MultiAssayExperiment' mergeReplicates(x, replicates = list(), simplify = BiocGenerics::mean, ...) ## S4 method for signature 'ANY' mergeReplicates(x, replicates = list(), simplify = BiocGenerics::mean, ...) longFormat(object, ...) ## S4 method for signature 'ANY' longFormat(object, ...) ## S4 method for signature 'ExperimentList' longFormat(object, ...) ## S4 method for signature 'MultiAssayExperiment' longFormat(object, colDataCols = NULL, ...) wideFormat(object, ...) ## S4 method for signature 'MultiAssayExperiment' wideFormat(object, colDataCols = NULL, key = NULL, ...) ## S4 method for signature 'ExperimentList' wideFormat(object, ...) ## S4 method for signature 'ANY' wideFormat(object, ...)
x |
A MultiAssayExperiment |
incomparables |
unused argument |
... |
Additional arguments. See details. |
replicates |
A list of LogicalLists
indicating multiple / duplicate entries for each biological unit, see the
|
simplify |
A function for merging repeat measurements in experiments
as indicated by replicates for |
object |
Any supported class object |
colDataCols |
selected colData columns to include in the output |
key |
name of column whose values will used as variables in the wide dataset from spread. If none are specified, assay, rowname, and colname will be combined |
The mergeReplicates
function is a house-keeping method
for a MultiAssayExperiment
where only complete.cases
are
returned, replicate measurements are averaged (by default), and columns are
aligned by the row order in colData
. Additional arguments can be
passed on to the simplify
function.
The mergeReplicates
"ANY" method consolidates duplicate
measurements for rectangular data structures, returns object of the same
class (endomorphic)
The longFormat
"ANY" class method, works with classes such as
ExpressionSet and SummarizedExperiment as well as matrix
to provide a consistent long and skinny DataFrame.
The mergeReplicates
function makes use of the output from
duplicated
which will point out the duplicate measurements by
biological unit in the MultiAssayExperiment
. This function will return
a MultiAssayExperiment
with merged replicates.
The longFormat method takes data from the ExperimentList
in a MultiAssayExperiment
and returns a uniform
DataFrame
. The resulting DataFrame has columns indicating
primary, rowname, colname and value. This method can optionally include
colData columns with the colDataCols
argument
(MultiAssayExperiment
method only).
The wideFormat
MultiAssayExperiment
method returns standardized
wide DataFrame where each row represents an observation or biological
unit as represented in colData
. Optionally, colData
columns
can be added to the data output. The wideFormat
method for an
ExperimentList
returns a list of wideFormat DataFrames
. The
"ANY" method returns a wide format DataFrame
.