build_knn_graph_nn2: Build kNN graph using RANN::nn2 (used in '"build_knn_graph"')

View source: R/build_knn_graph.R

build_knn_graph_nn2R Documentation

Build kNN graph using RANN::nn2 (used in "build_knn_graph")

Description

Build kNN graph using RANN::nn2 (used in "build_knn_graph")

Usage

build_knn_graph_nn2(
  X,
  k = min(5, ncol(X)),
  mode = "all",
  DoSNN = FALSE,
  which.snn = c("bluster", "dbscan"),
  pruning = NULL,
  kmin = 0,
  ...
)

Arguments

X

matrix of coordinates (rows are samples and cols are coordinates)

k

kNN parameter

mode

mode of graph_from_adj_list ('all' – undirected graph, 'out' – directed graph)

DoSNN

whether to apply shared nearest neighbors (default is FALSE)

which.snn

whether to use neighborsToSNNGraph or sNN for sNN graph construction

pruning

quantile to perform edge pruning (default is NULL - no pruning applied) based on PCA distance distribution

kmin

keep at least kmin edges in single-cell graph when pruning applied (idnored if is.null(pruning))

...

other parameters of neighborsToSNNGraph or sNN

Value

a list with components

  • graph.knn - igraph object


SuperCell documentation built on Oct. 25, 2024, 5:07 p.m.