splitModule: Split celda feature module

splitModuleR Documentation

Split celda feature module

Description

Manually select a celda feature module to split into 2 or more modules. Useful for splitting up modules that show divergent expression of features in multiple cell clusters.

Usage

splitModule(
  x,
  module,
  useAssay = "counts",
  altExpName = "featureSubset",
  n = 2,
  seed = 12345
)

## S4 method for signature 'SingleCellExperiment'
splitModule(
  x,
  module,
  useAssay = "counts",
  altExpName = "featureSubset",
  n = 2,
  seed = 12345
)

Arguments

x

A SingleCellExperiment object with the matrix located in the assay slot under useAssay. Rows represent features and columns represent cells.

module

Integer. The module to be split.

useAssay

A string specifying which assay slot to use for x. Default "counts".

altExpName

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

n

Integer. How many modules should module be split into. Default 2.

seed

Integer. Passed to with_seed. For reproducibility, a default value of 12345 is used. If NULL, no calls to with_seed are made.

Value

A updated SingleCellExperiment object with new feature modules stored in column celda_feature_module in rowData(x).

Examples

data(sceCeldaCG)
# Split module 5 into 2 new modules.
sce <- splitModule(sceCeldaCG, module = 5)

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