Title: | Manages subsets of data with Bioconductor Experiment objects |
---|---|
Description: | Experiment objects such as the SummarizedExperiment or SingleCellExperiment are data containers for one or more matrix-like assays along with the associated row and column data. Often only a subset of the original data is needed for down-stream analysis. For example, filtering out poor quality samples will require excluding some columns before analysis. The ExperimentSubset object is a container to efficiently manage different subsets of the same data without having to make separate objects for each new subset. |
Authors: | Irzam Sarfraz [aut, cre] , Muhammad Asif [aut, ths] , Joshua D. Campbell [aut] |
Maintainer: | Irzam Sarfraz <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.17.0 |
Built: | 2024-10-30 07:18:43 UTC |
Source: | https://github.com/bioc/ExperimentSubset |
Constructor for creating a experiment object internally by the
ExperimentSubset
object. Should not be used directly by the user.
AssaySubset( subsetName = "subset", rowIndices = NULL, colIndices = NULL, parentAssay = "counts", internalAssay = NULL )
AssaySubset( subsetName = "subset", rowIndices = NULL, colIndices = NULL, parentAssay = "counts", internalAssay = NULL )
subsetName |
|
rowIndices |
|
colIndices |
|
parentAssay |
|
internalAssay |
An internal Experiment object to store additional subset data. |
A AssaySubset
object.
An S4 class to manage subset representation.
subsetName
character(1)
Name of the subset.
rowIndices
vector("numeric")
Indices of the rows to include in
the subset.
colIndices
vector("numeric")
Indices of the columns to include
in the subset.
parentAssay
character(1)
Name of the parent of this subset.
internalAssay
SummarizedExperiment
An internal experiment object
to store additional subset data.
Create a subset from an already available assay
in the
input ExperimentSubset
object by specifying the rows and columns to
include in the subset.
createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetRangedSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSingleCellExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSpatialExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetTreeSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL)
createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetRangedSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSingleCellExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetSpatialExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL) ## S4 method for signature 'SubsetTreeSummarizedExperiment' createSubset(x, subsetName, rows = NULL, cols = NULL, parentAssay = NULL)
x |
|
subsetName |
|
rows |
|
cols |
|
parentAssay |
|
An ExperimentSubset
object that now contains the newly created
subset.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") es
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") es
This constructor function is used to setup the ExperimentSubset
object, either through manually specifying the assays
, rowData
, colData
or directly by passing either a SingleCellExperiment
or SummarizedExperiment
objects or objects inherited by these classes. A subset can also be directly created by passing a named list
to the subset
parameter. This named list
should have parameter values named as subsetName
, rows
, cols
and parentAssay
.
ExperimentSubset( x, subset = list(subsetName = NA, rows = NA, cols = NA, parentAssay = NA) )
ExperimentSubset( x, subset = list(subsetName = NA, rows = NA, cols = NA, parentAssay = NA) )
x |
An experiment object if direct conversion is required or a list of slots to pass onto |
subset |
A named |
A ExperimentSubset
object.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es
ExperimentSubset
object.Get subset assay from an ExperimentSubset
object.
getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' getSubsetAssay(x, subsetName)
getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' getSubsetAssay(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' getSubsetAssay(x, subsetName)
x |
Input |
subsetName |
Specify 'subset name' or 'subset assay name' to fetch the assay from. |
Subset assay
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") getSubsetAssay(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") getSubsetAssay(es, "subset1")
A wrapper to the reducedDimNames
from reducedDims method with additional support for subsets.
reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...)
reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...) ## S4 method for signature 'ANY' reducedDimNames(x, ...)
x |
Input |
... |
Additional arguments to pass to into the SCE method. |
The reducedDimNames
from the specified subset or same as reducedDimNames
from reducedDims when subsetName
is missing
.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDimNames(es, subsetName = "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDimNames(es, subsetName = "subset1")
A wrapper to the reducedDimNames<-
from reducedDims method with additional support for subsets.
reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value
reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value ## S4 replacement method for signature 'ANY' reducedDimNames(x, subsetName) <- value
x |
Input |
subsetName |
Specify the name of the subset to which the |
value |
Input value same as |
Input object with reducedDimNames<-
set.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDimNames(es, subsetName = "subset1") <- c("rDim1", "rDim2")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDimNames(es, subsetName = "subset1") <- c("rDim1", "rDim2")
A wrapper to the reducedDims<-
from reducedDims method with additional support for subsets.
reducedDims(x, subsetName) <- value
reducedDims(x, subsetName) <- value
x |
Input |
subsetName |
Specify the name of the subset to which the |
value |
A |
Updated input object with reducedDims
set.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDims(es, subsetName = "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(1:1500), cols = c(1:1500), parentAssay = "counts") reducedDims(es, subsetName = "subset1") <- list( PCA_1 = scater::calculatePCA(assay(es, "subset1")), PCA_2 = scater::calculatePCA(assay(es, "subset1"))) reducedDims(es, subsetName = "subset1")
A wrapper to the reducedDims<-
from reducedDims method with additional support for subsets.
## S4 replacement method for signature 'ANY' reducedDims(x, subsetName) <- value
## S4 replacement method for signature 'ANY' reducedDims(x, subsetName) <- value
x |
Input |
subsetName |
Specify the name of the subset to which the |
value |
A |
Updated input object with reducedDims
set.
Store a new subset assay
inside a specified subset in the
input ExperimentSubset
object.
setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature ## 'SubsetRangedSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSingleCellExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSpatialExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature ## 'SubsetTreeSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName)
setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature ## 'SubsetRangedSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSingleCellExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature 'SubsetSpatialExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName) ## S4 method for signature ## 'SubsetTreeSummarizedExperiment,character,ANY,character' setSubsetAssay(x, subsetName, inputMatrix, subsetAssayName)
x |
|
subsetName |
|
inputMatrix |
|
subsetAssayName |
|
Updated ExperimentSubset
object with the new assay
stored inside the specified subset.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") counts1p <- assay(es, "subset1") counts1p[,] <- counts1p[,] + 1 es <- setSubsetAssay(es, "subset1", counts1p, "scaledSubset1") es
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") counts1p <- assay(es, "subset1") counts1p[,] <- counts1p[,] + 1 es <- setSubsetAssay(es, "subset1", counts1p, "scaledSubset1") es
Get the count of the total available subsets and the subset
assays inside these subsets in an ExperimentSubset
object.
subsetAssayCount(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetAssayCount(x)
subsetAssayCount(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetAssayCount(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetAssayCount(x)
x |
|
A numeric
value representing the sum of the subset count and
subset assay count.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetAssayCount(es)
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetAssayCount(es)
Retrieves the names of all the subsets as well as the subset assays.
subsetAssayNames(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetAssayNames(x)
subsetAssayNames(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetAssayNames(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetAssayNames(x)
x |
|
A vector
containing the names of the subsets and the subset
assays available in the input ExperimentSubset
object.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetAssayNames(es)
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetAssayNames(es)
Get colData
from a subset.
Set colData
to a subset.
subsetColData(x, subsetName, parentColData) subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature ## 'SubsetRangedSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 replacement method for signature 'SubsetSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value
subsetColData(x, subsetName, parentColData) subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature ## 'SubsetRangedSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 replacement method for signature 'SubsetSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,DataFrame' subsetColData(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColData(x, subsetName, parentColData) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character,DataFrame' subsetColData(x, subsetName) <- value
x |
|
subsetName |
|
parentColData |
|
value |
Input |
The colData
from input object.
Input object with colData
stored.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetColData(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetColData(es, "subset1")
Get colLinks
from a subset.
subsetColLinks(x, subsetName, parentColLinkData) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColLinks(x, subsetName, parentColLinkData)
subsetColLinks(x, subsetName, parentColLinkData) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColLinks(x, subsetName, parentColLinkData)
x |
|
subsetName |
|
parentColLinkData |
|
The colLinks
from input object.
Get colnames
from a subset in the ExperimentSubset
object.
Set colnames
to a subset in the ExperimentSubset
object.
subsetColnames(x, subsetName) subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetRangedSummarizedExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSummarizedExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSpatialExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character' subsetColnames(x, subsetName) <- value
subsetColnames(x, subsetName) subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetRangedSummarizedExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSummarizedExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetSpatialExperiment,character' subsetColnames(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetColnames(x, subsetName) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character' subsetColnames(x, subsetName) <- value
x |
Input |
subsetName |
Name of the subset to set |
value |
Specify the colname values to replace. |
A vector
of colnames
.
Input object with colnames set to a subset.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetColnames(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetColnames(es, "subset1")
Get the total count of the available subsets (excluding subset
assays) in an ExperimentSubset
object.
subsetCount(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetCount(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetCount(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetCount(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetCount(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetCount(x)
subsetCount(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetCount(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetCount(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetCount(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetCount(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetCount(x)
x |
|
A numeric
value representing the total count of the subsets.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetCount(es)
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetCount(es)
Retrieves the dimensions of the specified subset in an
ExperimentSubset
object.
subsetDim(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetDim(x, subsetName)
subsetDim(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetDim(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetDim(x, subsetName)
x |
|
subsetName |
|
A vector
containing the dimensions of the specified subset
i.e. the number of rows and the number of columns in the subset.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetDim(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetDim(es, "subset1")
Retrieves the names of the available subsets (not the subset
assays) in an ExperimentSubset
object.
subsetNames(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetNames(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetNames(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetNames(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetNames(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetNames(x)
subsetNames(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetNames(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetNames(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetNames(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetNames(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetNames(x)
x |
|
A vector
of subset names.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetNames(es)
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetNames(es)
Retrieves a complete 'subset to parent' link from a specified subset.
subsetParent(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetParent(x, subsetName)
subsetParent(x, subsetName) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSingleCellExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSummarizedExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment' subsetParent(x, subsetName) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetParent(x, subsetName)
x |
|
subsetName |
|
A list
containing the 'subset to parent' link.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetParent(es, "subset1pAssay")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetParent(es, "subset1pAssay")
RangedSummarizedExperiment
objects with added support for
subsets.An S4 class for RangedSummarizedExperiment
objects with added support for
subsets.
subsets
A list of AssaySubset
objects.
Get rowData
from a subset.
Set rowData
to a subset.
subsetRowData(x, subsetName, parentRowData) subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature ## 'SubsetRangedSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 replacement method for signature 'SubsetSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value
subsetRowData(x, subsetName, parentRowData) subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature ## 'SubsetRangedSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 replacement method for signature 'SubsetSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRowData(x, subsetName, parentRowData) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character,DataFrame' subsetRowData(x, subsetName) <- value
x |
|
subsetName |
|
parentRowData |
|
value |
Input |
The rowData
from input object.
Input object with rowData
stored.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetRowData(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetRowData(es, "subset1")
Get rowLinks
from a subset.
subsetRowLinks(x, subsetName, parentRowLinkData) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRowLinks(x, subsetName, parentRowLinkData)
subsetRowLinks(x, subsetName, parentRowLinkData) ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRowLinks(x, subsetName, parentRowLinkData)
x |
|
subsetName |
|
parentRowLinkData |
|
The rowLinks
from input object.
Get rownames
from a subset in the ExperimentSubset
object.
Set colnames
to a subset in the ExperimentSubset
object.
subsetRownames(x, subsetName) subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetRangedSummarizedExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSummarizedExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSpatialExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character' subsetRownames(x, subsetName) <- value
subsetRownames(x, subsetName) subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetRangedSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetRangedSummarizedExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSingleCellExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSingleCellExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSummarizedExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetSpatialExperiment,character' subsetRownames(x, subsetName) <- value ## S4 method for signature 'SubsetTreeSummarizedExperiment,character' subsetRownames(x, subsetName) ## S4 replacement method for signature 'SubsetTreeSummarizedExperiment,character' subsetRownames(x, subsetName) <- value
x |
Input |
subsetName |
Name of the subset to set |
value |
Specify the rownames values to replace. |
A vector
of colnames
.
Input object with rownames set to a subset.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetRownames(es, "subset1")
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") subsetRownames(es, "subset1")
SingleCellExperiment
objects with added support for
subsets.An S4 class for SingleCellExperiment
objects with added support for
subsets.
subsets
A list of AssaySubset
objects.
Get spatialCoords
from a subset.
subsetSpatialCoords(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetSpatialCoords(x, subsetName)
subsetSpatialCoords(x, subsetName) ## S4 method for signature 'SubsetSpatialExperiment,character' subsetSpatialCoords(x, subsetName)
x |
|
subsetName |
|
The spatialCoords
from input object.
Get spatialData
from a subset.
Set spatialData
to a subset.
subsetSpatialData(x, subsetName, parentSpatialData) subsetSpatialData(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetSpatialData(x, subsetName, parentSpatialData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,data.frame' subsetSpatialData(x, subsetName) <- value
subsetSpatialData(x, subsetName, parentSpatialData) subsetSpatialData(x, subsetName) <- value ## S4 method for signature 'SubsetSpatialExperiment,character' subsetSpatialData(x, subsetName, parentSpatialData) ## S4 replacement method for signature 'SubsetSpatialExperiment,character,data.frame' subsetSpatialData(x, subsetName) <- value
x |
|
subsetName |
|
parentSpatialData |
|
value |
Input |
The spatialData
from input object.
Input object with spatialData
stored.
SpatialExperiment
objects with added support for
subsets.An S4 class for SpatialExperiment
objects with added support for
subsets.
subsets
A list of AssaySubset
objects.
SummarizedExperiment
objects with added support for
subsets.An S4 class for SummarizedExperiment
objects with added support for
subsets.
subsets
A list of AssaySubset
objects.
The function displays the content of an ExperimentSubset
object including all available main assays, all subsets and the subset
assays inside these subsets. This function also depicts how and in what
order the subsets in the object are linked with their parents. Moreover,
all supplementary data inside the subsets such as reducedDims
and
altExps
are also displayed against each subset entry.
subsetSummary(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetSummary(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetSummary(x)
subsetSummary(x) ## S4 method for signature 'SubsetRangedSummarizedExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSingleCellExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSummarizedExperiment' subsetSummary(x) ## S4 method for signature 'SubsetSpatialExperiment' subsetSummary(x) ## S4 method for signature 'SubsetTreeSummarizedExperiment' subsetSummary(x)
x |
|
Prints all the available subset information against the input
ExperimentSubset
object.
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetSummary(es)
data(sce_chcl, package = "scds") es <- ExperimentSubset(sce_chcl) es <- createSubset(es, "subset1", rows = c(10,11,50,56,98,99,102,105,109, 200), cols = c(20,21,40,45,90,99,100,123,166,299), parentAssay = "counts") assay(es, "subset1", subsetAssayName = "subset1pAssay") <- assay(es, "subset1")[,] + 1 subsetSummary(es)
TreeSummarizedExperiment
objects with added support for
subsets.An S4 class for TreeSummarizedExperiment
objects with added support for
subsets.
subsets
A list of AssaySubset
objects.