clusterIndividualSamples: Computes cell subtype abundances for each sample

View source: R/functions-core.R

clusterIndividualSamplesR Documentation

Computes cell subtype abundances for each sample

Description

Takes as input a Phemd object with all single-cell expression data of all single-cell samples in @data slot and cell-state embedding generated by embedCells. Returns updated object with cell subtype frequencies of each sample that may be retrieved by the 'celltypeFreqs' accessor function.

Usage

clusterIndividualSamples(
  obj,
  verbose = FALSE,
  cell_model = c("monocle2", "seurat", "phate")
)

Arguments

obj

'Phemd' object containing single-cell expression data of all samples in @data slot and cell-state embedding object generated and stored using the embedCells function.

verbose

Boolean that determines whether progress (sequential processing of samples) should be printed. FALSE by default

cell_model

Either "monocle2", "seurat", or "phate" depending on method used to model cell state space

Details

embedCells (and orderCellsMonocle if using the Monocle2 embedding technique) needs to be called before calling this function.

Value

'Phemd' object with cell subtype frequencies of each sample that can be retrieved using the 'celltypeFreqs' accessor function

Examples


my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)
my_phemdObj_monocle <- embedCells(my_phemdObj_lg, data_model = 'gaussianff', sigma=0.02, maxIter=2)
my_phemdObj_monocle <- orderCellsMonocle(my_phemdObj_monocle)
my_phemdObj_final <- clusterIndividualSamples(my_phemdObj_monocle)


KrishnaswamyLab/phemd documentation built on Oct. 2, 2024, 5:10 a.m.