Recode feature module clusters using a mapping in the from and to arguments.

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

Arguments

sce

SingleCellExperiment object returned from celda_G or celda_CG. Must contain column celda_feature_module in rowData(altExp(sce, altExpName)).

from

Numeric vector. Unique values in the range of seq(celdaModules(sce)) that correspond to the original module labels in sce.

to

Numeric vector. Unique values in the range of seq(celdaModules(sce)) that correspond to the new module labels.

altExpName

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

Value

@return SingleCellExperiment object with recoded feature module labels.

Examples

data(sceCeldaCG) sceReorderedY <- recodeClusterY(sceCeldaCG, c(1, 3), c(3, 1))