Package 'ExperimentSubset'

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-11-29 07:13:27 UTC
Source: https://github.com/bioc/ExperimentSubset

Help Index


AssaySubset constructor

Description

Constructor for creating a experiment object internally by the ExperimentSubset object. Should not be used directly by the user.

Usage

AssaySubset(
  subsetName = "subset",
  rowIndices = NULL,
  colIndices = NULL,
  parentAssay = "counts",
  internalAssay = NULL
)

Arguments

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

An internal Experiment object to store additional subset data.

Value

A AssaySubset object.


An S4 class to manage subset representation.

Description

An S4 class to manage subset representation.

Slots

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.


Subset creation method for ExperimentSubset objects

Description

Create a subset from an already available assay in the input ExperimentSubset object by specifying the rows and columns to include in the subset.

Usage

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)

Arguments

x

ExperimentSubset Specify the object from which a subset should be created. Input can also be any object inherited from SummarizedExperiment for immediate conversion and subset formation. A list of slots can also be passed to directly construct an ES object from matrices similar to SE and SCE constructors.

subsetName

character(1) Specify the name of the subset to create.

rows

vector("numeric") Specify the rows to include in this subset. If missing or NULL, all rows are included in the subset. Values can be numeric or character. Default NULL.

cols

vector("numeric") Specify the columns to include in this subset. If missing or NULL, all columns are included in the subset. Values can be numeric or character. Default NULL.

parentAssay

character(1) Specify the parent assay of the subset. This parent assay must already be available in the ExperimentSubset object. If NULL, the first available main assay will be marked as parent. Default NULL.

Value

An ExperimentSubset object that now contains the newly created subset.

Examples

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

ExperimentSubset constructor

Description

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.

Usage

ExperimentSubset(
  x,
  subset = list(subsetName = NA, rows = NA, cols = NA, parentAssay = NA)
)

Arguments

x

An experiment object if direct conversion is required or a list of slots to pass onto SingleCellExperiment constructor to generate experiment object from general data.

subset

A named list if a subset should be created from within the constructor. Named parameters in this list should be subsetName, rows, cols and parentAssay.

Value

A ExperimentSubset object.

Examples

data(sce_chcl, package = "scds")
es <- ExperimentSubset(sce_chcl)
es

Get subset assay from an ExperimentSubset object.

Description

Get subset assay from an ExperimentSubset object.

Usage

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)

Arguments

x

Input ExperimentSubset object.

subsetName

Specify 'subset name' or 'subset assay name' to fetch the assay from.

Value

Subset assay

Examples

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")

reducedDimNames

Description

A wrapper to the reducedDimNames from reducedDims method with additional support for subsets.

Usage

reducedDimNames(x, ...)

## S4 method for signature 'ANY'
reducedDimNames(x, ...)

## S4 method for signature 'ANY'
reducedDimNames(x, ...)

## S4 method for signature 'ANY'
reducedDimNames(x, ...)

Arguments

x

Input ExperimentSubset object or any object supported by reducedDimNames from reducedDims method.

...

Additional arguments to pass to into the SCE method.

Value

The reducedDimNames from the specified subset or same as reducedDimNames from reducedDims when subsetName is missing.

Examples

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")

reducedDimNames<-

Description

A wrapper to the reducedDimNames<- from reducedDims method with additional support for subsets.

Usage

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

Arguments

x

Input ExperimentSubset object or any object supported by reducedDimNames<- from reducedDims method.

subsetName

Specify the name of the subset to which the reducedDimNames<- should be set to. If missing, reducedDimNames<- from reducedDims method is called on the main object.

value

Input value same as reducedDimNames<- from reducedDims method.

Value

Input object with reducedDimNames<- set.

Examples

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")

reducedDims<-

Description

A wrapper to the reducedDims<- from reducedDims method with additional support for subsets.

Usage

reducedDims(x, subsetName) <- value

Arguments

x

Input ExperimentSubset object or any object supported by reducedDims<- from reducedDims method.

subsetName

Specify the name of the subset to which the reducedDims should be set to. If missing, reducedDims<- from reducedDims method is called on the main object.

value

A list of values to set to reducedDims.

Value

Updated input object with reducedDims set.

Examples

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")

reducedDims<-

Description

A wrapper to the reducedDims<- from reducedDims method with additional support for subsets.

Usage

## S4 replacement method for signature 'ANY'
reducedDims(x, subsetName) <- value

Arguments

x

Input ExperimentSubset object or any object supported by reducedDims<- from reducedDims method.

subsetName

Specify the name of the subset to which the reducedDims should be set to. If missing, reducedDims<- from reducedDims method is called on the main object.

value

A list of values to set to reducedDims.

Value

Updated input object with reducedDims set.


Method for storing new assays inside subsets in ExperimentSubset objects

Description

Store a new subset assay inside a specified subset in the input ExperimentSubset object.

Usage

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)

Arguments

x

ExperimentSubset Specify the input object.

subsetName

character(1) Specify the name of the existing subset inside which the new subset assay should be stored.

inputMatrix

dgCMatrix The input subset assay.

subsetAssayName

character(1) Specify the name of the new assay against the inputMatrix parameter.

Value

Updated ExperimentSubset object with the new assay stored inside the specified subset.

Examples

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

Count method for subset assays in ExperimentSubset objects

Description

Get the count of the total available subsets and the subset assays inside these subsets in an ExperimentSubset object.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

Value

A numeric value representing the sum of the subset count and subset assay count.

Examples

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)

Name retrieval method for all subset assays in ExperimentSubset objects

Description

Retrieves the names of all the subsets as well as the subset assays.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

Value

A vector containing the names of the subsets and the subset assays available in the input ExperimentSubset object.

Examples

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)

Accessor method for colData from subsets in ExperimentSubset objects

Description

Get colData from a subset.

Set colData to a subset.

Usage

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

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Name of the subset to set colData to.

parentColData

logical(1) Logical value indicating if parent colData should be combined or not. Default FALSE.

value

Input DataFrame to store.

Value

The colData from input object.

Input object with colData stored.

Examples

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")

subsetColnames

Description

Get colnames from a subset in the ExperimentSubset object.

Set colnames to a subset in the ExperimentSubset object.

Usage

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

Arguments

x

Input ExperimentSubset object.

subsetName

Name of the subset to set colnames to.

value

Specify the colname values to replace.

Value

A vector of colnames.

Input object with colnames set to a subset.

Examples

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")

Subset count method for ExperimentSubset objects

Description

Get the total count of the available subsets (excluding subset assays) in an ExperimentSubset object.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

Value

A numeric value representing the total count of the subsets.

Examples

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)

Get dimensions of subsets in ExperimentSubset objects

Description

Retrieves the dimensions of the specified subset in an ExperimentSubset object.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Name of the subset to retrieve the dimensions from.

Value

A vector containing the dimensions of the specified subset i.e. the number of rows and the number of columns in the subset.

Examples

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")

Get names of only the subsets in ExperimentSubset objects

Description

Retrieves the names of the available subsets (not the subset assays) in an ExperimentSubset object.

Usage

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)

Arguments

x

ExperimentSubset Specify the input ES object.

Value

A vector of subset names.

Examples

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)

Subset parent hierarchy retrieval method for ExperimentSubset objects

Description

Retrieves a complete 'subset to parent' link from a specified subset.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Specify the name of the subset against which the 'subset to parent link' should be retrieved.

Value

A list containing the 'subset to parent' link.

Examples

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")

An S4 class for RangedSummarizedExperiment objects with added support for subsets.

Description

An S4 class for RangedSummarizedExperiment objects with added support for subsets.

Slots

subsets

A list of AssaySubset objects.


Accessor method for rowData from subsets in ExperimentSubset objects

Description

Get rowData from a subset.

Set rowData to a subset.

Usage

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

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Name of the subset to set rowData to.

parentRowData

logical(1) Logical value indicating if parent rowData should be combined or not. Default FALSE.

value

Input DataFrame to store.

Value

The rowData from input object.

Input object with rowData stored.

Examples

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")

subsetRownames

Description

Get rownames from a subset in the ExperimentSubset object.

Set colnames to a subset in the ExperimentSubset object.

Usage

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

Arguments

x

Input ExperimentSubset object.

subsetName

Name of the subset to set colnames to.

value

Specify the rownames values to replace.

Value

A vector of colnames.

Input object with rownames set to a subset.

Examples

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")

An S4 class for SingleCellExperiment objects with added support for subsets.

Description

An S4 class for SingleCellExperiment objects with added support for subsets.

Slots

subsets

A list of AssaySubset objects.


Accessor method for spatialCoords from subsets in ExperimentSubset objects

Description

Get spatialCoords from a subset.

Usage

subsetSpatialCoords(x, subsetName)

## S4 method for signature 'SubsetSpatialExperiment,character'
subsetSpatialCoords(x, subsetName)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Name of the subset to get spatialCoords from.

Value

The spatialCoords from input object.


Accessor method for spatialData from subsets in ExperimentSubset objects

Description

Get spatialData from a subset.

Set spatialData to a subset.

Usage

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

Arguments

x

ExperimentSubset Input ExperimentSubset object.

subsetName

character(1) Name of the subset to set spatialData to.

parentSpatialData

logical(1) Logical value indicating if parent spatialData should be combined or not. Default FALSE.

value

Input data.frame to store.

Value

The spatialData from input object.

Input object with spatialData stored.


An S4 class for SpatialExperiment objects with added support for subsets.

Description

An S4 class for SpatialExperiment objects with added support for subsets.

Slots

subsets

A list of AssaySubset objects.


An S4 class for SummarizedExperiment objects with added support for subsets.

Description

An S4 class for SummarizedExperiment objects with added support for subsets.

Slots

subsets

A list of AssaySubset objects.


Method for displaying 'child-parent' link structure of subsets in ExperimentSubset objects

Description

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.

Usage

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)

Arguments

x

ExperimentSubset Input ExperimentSubset object.

Value

Prints all the available subset information against the input ExperimentSubset object.

Examples

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)

An S4 class for TreeSummarizedExperiment objects with added support for subsets.

Description

An S4 class for TreeSummarizedExperiment objects with added support for subsets.

Slots

subsets

A list of AssaySubset objects.