"build_knn_graph"
)Build kNN graph using RANN::nn2
(used in "build_knn_graph"
)
build_knn_graph_nn2(
X,
k = min(5, ncol(X)),
mode = "all",
DoSNN = FALSE,
which.snn = c("bluster", "dbscan"),
pruning = NULL,
kmin = 0,
...
)
a list with components
graph.knn - igraph object
matrix of coordinates (rows are samples and cols are coordinates)
kNN parameter
mode of graph_from_adj_list ('all' -- undirected graph, 'out' -- directed graph)
whether to apply shared nearest neighbors (default is FALSE
)
whether to use neighborsToSNNGraph or sNN for sNN graph construction
quantile to perform edge pruning (default is NULL
- no pruning applied) based on PCA distance distribution
keep at least kmin
edges in single-cell graph when pruning applied (idnored if is.null(pruning)
)
other parameters of neighborsToSNNGraph or sNN