assign_branches: Detect branches in the trajectory and assign cells to...

Description Usage Arguments Value Examples

View source: R/SLICER.R

Description

This function uses geodesic entropy to automatically determine the number and location of branches in the trajectory. Each cell is then assigned to the corresponding branch.

Usage

1
2
assign_branches(traj_graph, start, min_branch_len = 10,
  cells = V(traj_graph))

Arguments

traj_graph

Nearest neighbor graph built from LLE embedding

start

Index of start cell

min_branch_len

Minimum number of cells required to call a branch

cells

List of indices indicating which cells to assign to branches (used for recursive calls; not intended to be set by users).

Value

Vector of integers assigning each cell to a branch

Examples

1
2
3
4
5
6
7
8
## Not run: 
traj_lle = lle::lle(traj[,genes],m=2,k)$Y
traj_graph = conn_knn_graph(traj_lle,5)
start=1
branches = assign_branches(traj_graph,start)
plot(traj_lle,pch=16,col=branches)

## End(Not run)

SLICER documentation built on Aug. 23, 2017, 1:02 a.m.