Learn R Programming

SLICER (version 0.2.0)

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

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

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

Run this code
# 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)
# }

Run the code above in your browser using DataLab