Description Usage Arguments Details Value mergeReplicates longFormat wideFormat hasRowRanges getWithColData Examples
A set of helper functions were created to help clean and
manipulate a MultiAssayExperiment object. intersectRows
also works
for ExperimentList
objects.
complete.cases: Returns a logical vector corresponding to 'colData' rows that have data across all experiments
isEmpty: Returns a logical TRUE
value for zero length
MultiAssayExperiment
objects
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
replicated: A function that identifies multiple samples that originate from a single biological unit within each assay
anyReplicated: Displays which assays have replicate measurements
mergeReplicates: A function that combines replicated / repeated measurements across all experiments and is guided by the replicated 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
.
hasRowRanges: A function that identifies ExperimentList elements that have a rowRanges method
getWithColData: A convenience function for extracting an assay and associated colData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## S4 method for signature 'MultiAssayExperiment'
complete.cases(...)
## S4 method for signature 'MultiAssayExperiment'
isEmpty(x)
intersectRows(x)
intersectColumns(x)
replicated(x)
## S4 method for signature 'MultiAssayExperiment'
replicated(x)
anyReplicated(x)
## S4 method for signature 'MultiAssayExperiment'
anyReplicated(x)
mergeReplicates(x, replicates = list(), simplify = BiocGenerics::mean, ...)
## S4 method for signature 'MultiAssayExperiment'
mergeReplicates(
x,
replicates = replicated(x),
simplify = BiocGenerics::mean,
...
)
## S4 method for signature 'ANY'
mergeReplicates(x, replicates = list(), simplify = BiocGenerics::mean, ...)
longFormat(object, colDataCols = NULL, i = 1L)
wideFormat(
object,
colDataCols = NULL,
check.names = TRUE,
collapse = "_",
i = 1L
)
hasRowRanges(x)
## S4 method for signature 'MultiAssayExperiment'
hasRowRanges(x)
## S4 method for signature 'ExperimentList'
hasRowRanges(x)
getWithColData(x, i, mode = c("append", "replace"))
|
... |
Additional arguments. See details for more information. |
x |
A MultiAssayExperiment or ExperimentList |
replicates |
A list of LogicalLists
indicating multiple / duplicate entries for each biological unit per assay,
see |
simplify |
A function for merging repeat measurements in experiments
as indicated by the |
object |
Any supported class object |
colDataCols |
A |
i |
The assay indicator for SummarizedExperiment objects. A vector input is supported in the case that the SummarizedExperiment object(s) has more than one assay (default 1L) |
check.names |
(logical default TRUE) Column names of the output
|
collapse |
(character default "_") A single string delimiter for output
column names. In |
mode |
String indicating how MultiAssayExperiment
column-level metadata should be added to the
SummarizedExperiment |
The replicated
function finds replicate measurements in each
assay and returns a list of LogicalLists.
Each element in a single LogicalList corresponds to a
biological or primary unit as in the sampleMap
. Below is a
small graphic for one particular biological unit in one assay, where the
logical vector corresponds to the number of measurements/samples in the
assay:
1 2 3 4 | > replicated(MultiAssayExperiment)
(list str) '-- $ AssayName
(LogicalList str) '-- [[ "Biological Unit" ]]
Replicated if sum(...) > 1 '-- TRUE TRUE FALSE FALSE
|
anyReplicated
determines if any of the assays have at least one
replicate. Note. These methods are not available for the
ExperimentList
class due to a missing sampleMap
structure
(by design).
The mergeReplicates
function is a house-keeping method
for a MultiAssayExperiment
where only complete.cases
are
returned. This by-assay operation averages replicate measurements
(by default) and columns are aligned by the row order in colData
.
Users can provide their own function for merging replicates with the
simplify
functional argument. Additional inputs ...
are
sent to the 'simplify' function.
The mergeReplicates
"ANY" method consolidates duplicate
measurements for rectangular data structures, returns object of the same
class (endomorphic). The ellipsis or ...
argument allows the
user to provide additional arguments to the simplify
functional
argument.
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 hasRowRanges
method identifies assays that support
a rowRanges method and
return a GRanges object.
See the itemized list in the description section for details.
The mergeReplicates
function makes use of the output from
replicated
which will point out the duplicate measurements by
biological unit in the MultiAssayExperiment
. This function will
return a MultiAssayExperiment
with merged replicates. Additional
arguments can be provided to the simplify argument via the ellipsis
(...). For example, when replicates "TCGA-B" and "TCGA-A" are found in
the assay, the name of the first appearing replicate is taken (i.e., "B").
Note that a typical use case of merging replicates occurs when there are
multiple measurements on the same sample (within the same assay)
and can therefore be averaged.
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 i
argument
allows the user to specify the assay value in a
SummarizedExperiment. It directly relates to the i
argument in the assay method.
The wideFormat
function returns standardized wide DataFrame
where each row represents a biological unit as in the colData
.
Depending on the data and setup, biological units can be patients, tumors,
specimens, etc. Optionally, colData
columns can be added to the
wide data output (see the colDataCols
argument). Metadata columns are
generated based on the names produced in the wide format
DataFrame. These can be accessed via the
mcols function. See the Arguments
and
longFormat
sections for argument descriptions.
The hasRowRanges
method identifies assays with associated ranged
row data by directly testing the method on the object. The result from the
test must be a GRanges class object to satisfy the test.
The getWithColData
function allows the user to conveniently extract
a particular assay as indicated by the i
index argument. It
will also attempt to provide the
colData
along with the
extracted object using the colData<-
replacement
method when possible. Typically, this method is available for
SummarizedExperiment and RaggedExperiment
classes.
The setting of mode
determines how the colData
is added. If mode="append"
, the MultiAssayExperiment
metadata is appended onto that of the SummarizedExperiment.
If any fields are duplicated by name, the values in the
SummarizedExperiment are retained, with a warning emitted if
the values are different. For mode="replace"
, the
MultiAssayExperiment metadata replaces that of the
SummarizedExperiment, while for mode="none"
,
no replacement or appending is performed.
1 2 3 4 5 | example(MultiAssayExperiment)
complete.cases(mae)
isEmpty(MultiAssayExperiment())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.