Description Usage Arguments Details Examples
A set of functions for extracting and dividing a
MultiAssayExperiment
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 | subsetByRow(x, y, ...)
subsetByColData(x, y)
subsetByColumn(x, y)
subsetByAssay(x, y)
## S4 method for signature 'ExperimentList,ANY'
subsetByRow(x, y, ...)
## S4 method for signature 'ExperimentList,list'
subsetByRow(x, y)
## S4 method for signature 'ExperimentList,List'
subsetByRow(x, y)
## S4 method for signature 'ExperimentList,logical'
subsetByRow(x, y)
## S4 method for signature 'ExperimentList,list'
subsetByColumn(x, y)
## S4 method for signature 'ExperimentList,List'
subsetByColumn(x, y)
## S4 method for signature 'ExperimentList,logical'
subsetByColumn(x, y)
## S4 method for signature 'ExperimentList'
subsetByAssay(x, y)
## S4 method for signature 'MultiAssayExperiment,ANY'
subsetByColData(x, y)
## S4 method for signature 'MultiAssayExperiment,character'
subsetByColData(x, y)
## S4 method for signature 'MultiAssayExperiment,ANY'
subsetByRow(x, y, ...)
## S4 method for signature 'MultiAssayExperiment,ANY'
subsetByColumn(x, y)
## S4 method for signature 'MultiAssayExperiment'
subsetByAssay(x, y)
## S4 method for signature 'MultiAssayExperiment,ANY,ANY,ANY'
x[i, j, k, ..., drop = TRUE]
## S4 method for signature 'MultiAssayExperiment,ANY,ANY'
x[[i, j, ...]]
## S4 replacement method for signature 'MultiAssayExperiment,ANY,ANY'
x[[i, j, ...]] <- value
|
x |
A |
y |
Any argument used for subsetting, can be a |
... |
Additional arguments passed on to lower level functions. |
i |
Either a |
j |
Either a |
k |
Either a |
drop |
logical (default TRUE) whether to drop empty assay elements
in the |
value |
An assay compatible with the MultiAssayExperiment API |
Subsetting a MultiAssayExperiment by the j index can yield a call
to either subsetByColData or subsetByColumn. For vector inputs,
the subset will be applied to the colData rows. For List-type
inputs, the List will be applied to each of the elements in the
ExperimentList.
The order of the subsetting elements in the
List must match that of the ExperimentList in the
MultiAssayExperiment.
subsetBycolData: Select biological units by vector input types
subsetByColumn: Select observations by assay or for each assay
subsetByRow: Select rows by assay or for each assay
subsetByAssay: Select experiments
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 | ## Load the example MultiAssayExperiment
example("MultiAssayExperiment")
## Using experiment names
subsetByAssay(myMultiAssayExperiment, "Affy")
## Using numeric indices
subsetByAssay(myMultiAssayExperiment, 1:2)
## Using a logical vector
subsetByAssay(myMultiAssayExperiment, c(TRUE, FALSE, TRUE))
## Subset by character vector (Jack)
subsetByColData(myMultiAssayExperiment, "Jack")
## Subset by numeric index of colData rows (Jack and Bob)
subsetByColData(myMultiAssayExperiment, c(1, 3))
## Subset by logical indicator of colData rows (Jack and Jill)
subsetByColData(myMultiAssayExperiment, c(TRUE, TRUE, FALSE, FALSE))
subsetByColumn(myMultiAssayExperiment, list(Affy = 1:2,
Methyl450k = c(3,5,2), RNASeqGene = 2:4, GISTIC = 1))
subsetWith <- S4Vectors::mendoapply(`[`, colnames(myMultiAssayExperiment),
MoreArgs = list(1:2))
subsetByColumn(myMultiAssayExperiment, subsetWith)
## Use a GRanges object to subset rows where ranged data present
egr <- GenomicRanges::GRanges(seqnames = "chr2",
IRanges::IRanges(start = 11, end = 13), strand = "-")
subsetByRow(myMultiAssayExperiment, egr)
## Use a logical vector (recycling used)
subsetByRow(myMultiAssayExperiment, c(TRUE, FALSE))
## Use a character vector
subsetByRow(myMultiAssayExperiment, "ENST00000355076")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.