runKNN: Simplified runKNN in SnapATAC

View source: R/Clustering.R

runKNNR Documentation

Simplified runKNN in SnapATAC

Description

We have checked this function: it returns the same KNN mat as SnapATAC does.

Usage

runKNN(smat, k = 20, treetype = "kd", searchtype = "standard", nn_eps = 0)

Arguments

smat

dense matrix or matrix, cell by feature

k

integer, max number of nearest neighbours, should be between 10 to 50.

treetype

string, "kd" or "bd", "bd" is usuful for larger point sets and local clusters in the dataset, which could reduce the depth of the tree. Default is "kd". NOTE: "bd" may have bugs on Linux (Ubuntu) but not on MacOS. When I use bd, my task is always be killed no mater how big memory I use (I even use 200GB for a small dataset: < 60,000 points). This does not happen on MacOS. But "kd" works on Linux

searchtype

string, "standard", "priority", or "radius". Default is "standard"

nn_eps

Error bound when performing nearest neighbor seach using RANN. default of 0.0 implies exact nearest neighbor search

Value

sparseMatrix, KNN matrix, ncell by ncell, value is 1 (unweighted), including the diagnal part.


beyondpie/smmtools documentation built on July 1, 2022, 4:33 a.m.