conn_knn_graph: Construct a k-nearest neighbor graph that is fully connected

Description Usage Arguments Value Examples

View source: R/SLICER.R

Description

This function constructs a k-nearest neighbor graph using an LLE embedding, then adds the minimum number of edges needed to make the graph fully connected.

Usage

1
conn_knn_graph(embedding, k)

Arguments

embedding

Low-dimensional LLE embedding of cells

k

Number of nearest neighbors

Value

An igraph object corresponding to the k-NN graph

Examples

1
2
3
4
5
genes=1:200
cells=sample(1:500,30)
k=10
traj_lle = lle::lle(traj[cells,genes],m=2,k)$Y
traj_graph = conn_knn_graph(traj_lle,5)

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