MultiAssayExperiment-helpers: A group of helper functions for manipulating and cleaning a...

Description Usage Arguments Details mergeReplicates longFormat wideFormat hasRowRanges

Description

A set of helper functions were created to help clean and manipulate a MultiAssayExperiment object. intersectRows also works for ExperimentList objects.

Usage

 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
53
54
55
56
57
58
59
60
## 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, ...)

## 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 = "feature", ...)

## S4 method for signature 'ANY'
wideFormat(object, ...)

hasRowRanges(x)

## S4 method for signature 'MultiAssayExperiment'
hasRowRanges(x)

## S4 method for signature 'ExperimentList'
hasRowRanges(x)

## S4 method for signature 'MultiAssayExperiment'
duplicated(x, incomparables = FALSE, ...)

Arguments

...

Additional arguments. See details.

x

A MultiAssayExperiment or ExperimentList

replicates

A list of LogicalLists indicating multiple / duplicate entries for each biological unit per assay, see replicated (default replicated(x)).

simplify

A function for merging repeat measurements in experiments as indicated by the replicated method for MultiAssayExperiment

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, see the timevar argument in reshape. If none are specified, assay, rowname, and colname will be combined and named as the "feature" column (default "feature")

incomparables

unused argument

Details

The replicated function finds replicate samples in each assay and returns a list of LogicalLists for each assay. A LogicalList is given for each assay where each element in such list corresponds to a biological unit entry in the sampleMap, (labeled as "primary"). Each element in this list of "primary" vectors is a logical vector that identifies samples for that given biological unit. Each logical vector is labeled with the "primary" identifier found in the sampleMap. The anyReplicated will test to see if any of these logical vectors has a summation value greater than one (i.e., sum(...) > 1L). These methods are not available for an ExperimentList due to the unavailability of the sampleMap structure.

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 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 wideFormat method provides a representation of MultiAssayExperiment where each row represents a particular biological unit.

The hasRowRanges method identifies assays that support a rowRanges method and return a GRanges object.

Deprecated: For the anyDuplicated and duplicated functions, the incomparables and ellipsis ... arguments are not used. Neither duplicated nor anyDuplicated is supported for ExperimentList due to an unavailable sampleMap.

mergeReplicates

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 (...).

longFormat

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 ... argument allows the user to specify the assay value for the SummarizedExperiment assay function's i argument.

wideFormat

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 ... argument allows the user to specify the assay number for SummarizedExperiment assay extractor (i.e., i argument). Additionally, the user may also specify check.names argument for the resulting DataFrame. Note. The "ANY" method returns a slightly different wide format DataFrame due to missing biological units information.

hasRowRanges

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.


vjcitn/MultiAssayExperiment documentation built on May 3, 2019, 6:13 p.m.