assignCellClusterNearestNode: Assign cells to a reference cell subtype

View source: R/functions-core.R

assignCellClusterNearestNodeR Documentation

Assign cells to a reference cell subtype

Description

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

Usage

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

## 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)

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