assignCellClusterNearestNode: Assign cells to a reference cell subtype

Description Usage Arguments Details Value Examples

View source: R/functions-core.R

Description

Assigns each cell in cur_cells to a cluster based on nearest cell in Monocle 2 tree

Usage

1
2
3
4
5
6
assignCellClusterNearestNode(
  cur_cells,
  ref_cells,
  ref_cell_labels,
  cell_model = c("monocle2", "seurat", "phate")
)

Arguments

cur_cells

Matrix of cells to be assigned to clusters (Dim: num_cells x num_markers)

ref_cells

Matrix of cells used to build reference Monocle 2 tree (Dim: num_monocle_cells x num_markers)

ref_cell_labels

Vector of length num_monocle_cells containing Monocle 2 cell branch assignments

cell_model

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

Details

Private method (not exported in namespace). Uses RANN package for fast knn search

Value

Vector of length num_cells representing cluster assignments for each cell in cur_cells

Examples

1
2
3
4
5
## Not run: 
cur_cells_cluster_labels <- assignCellClusterNearestNode(cur_cells_expn_data,
clustered_cells_expn_data, clustered_cells_cluster_labels, cell_model='monocle2')

## End(Not run)

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