generateGDM: Computes ground distance matrix based on cell embedding

Description Usage Arguments Details Value Examples

View source: R/functions-core.R

Description

Takes as input a Phemd object containing cell-state embedding object. Returns updated object with ground distance matrix representing pairwise distances between distinct cell subtypes based on cell state embedding.

Usage

1
2
3
4
5
6
generateGDM(
  obj,
  cell_model = c("monocle2", "seurat", "phate"),
  expn_type = "reduced",
  ndim = 8
)

Arguments

obj

'Phemd' object containing cell-state embedding object

cell_model

Method by which cell state was modeled (either "monocle2", "seurat", or "phate")

expn_type

Data type to use to determine cell-type dissimilarities

ndim

Number of embedding dimensions to be used for computing cell-type dissimilarity (optional)

Details

embedCells and orderCellsMonocle need to be called before calling this function. Requires 'igraph' package

Value

Phemd object with ground distance matrix (to be used in EMD computation) in @data_cluster_weights slot

Examples

1
2
3
4
5
6
7
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)
my_phemdObj_final <- generateGDM(my_phemdObj_final)

phemd documentation built on Nov. 8, 2020, 8:15 p.m.