reducedDim {ExperimentSubset}R Documentation

Methods for Reduced Dimensions in ExperimentSubset objects

Description

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

Usage

reducedDim(object, type, withDimnames, subsetName)

## S4 method for signature 'ANY'
reducedDim(object, type, withDimnames, subsetName)

Arguments

object

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

type

character(1) Same as type in reducedDim from reducedDims method.

withDimnames

logical(1) Same as withDimnames in reducedDim from reducedDims method.

subsetName

character(1) Specify the name of the subset from which the reducedDim should be fetched from. If missing, reducedDim from reducedDims method is called on the main object.

Value

The reducedDim from the specified subset or same as reducedDim 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")
reducedDim(es, type = "PCA",
subsetName = "subset1") <- scater::calculatePCA(
assay(es, "subset1"))
reducedDim(es, type = "PCA", subsetName = "subset1")

[Package ExperimentSubset version 1.0.0 Index]