recodeClusterZ: Recode cell cluster labels

View source: R/celda_functions.R

recodeClusterZR Documentation

Recode cell cluster labels

Description

Recode cell subpopulaton clusters using a mapping in the from and to arguments.

Usage

recodeClusterZ(sce, from, to, altExpName = "featureSubset")

Arguments

sce

SingleCellExperiment object returned from celda_C or celda_CG. Must contain column celda_cell_cluster in colData(altExp(sce, altExpName)).

from

Numeric vector. Unique values in the range of seq(max(as.integer(celdaClusters(sce, altExpName = altExpName)))) that correspond to the original cluster labels in sce.

to

Numeric vector. Unique values in the range of seq(max(as.integer(celdaClusters(sce, altExpName = altExpName)))) that correspond to the new cluster labels.

altExpName

The name for the altExp slot to use. Default "featureSubset".

Value

SingleCellExperiment object with recoded cell cluster labels.

Examples

data(sceCeldaCG)
sceReorderedZ <- recodeClusterZ(sceCeldaCG, c(1, 3), c(3, 1))

campbio/celda documentation built on April 5, 2024, 11:47 a.m.