perform.nn.Rd
Neighbourhood graph generator utilised. According to the assay name a different method will be used. If the assay is derived from scanpy then the scanpy algorithm will be applied. Otherwise, the seurat implementation will be applied.
perform.nn(
object,
assay,
reduction,
neighbour.name.suffix = "",
dims.use = NULL,
k.param = 20,
prune.SNN = 1/15,
nn.method = "annoy",
n.trees = 50,
nn.eps = 0,
annoy.metric = "euclidean",
n_neighbors = 15,
random_state = 0,
method = "umap",
metric = "euclidean",
generate.diffmap = FALSE,
n_comps = 15,
diffmap.name.suffix = "",
verbose = FALSE,
seed = 1234
)
IBRAP S4 class object
Character. String containing indicating which assay to use
Character. String defining which reduction to supply to the clustering algorithm.
Character. String defining the names to store the neighbourhood graph results under.
Numerical. (scanpy only) How many components of the reduction should be used, 0 means that all will be used. Default = 0
Numerical. The number of k when calcuating k-nearest neighbour. Default = 20
Numerical. Setas acceptance cutoff for jaccard index whilst computing neighbourhood overlap for SNN construction. Any edges with a value less than this parameter will be removed. 0 = no pruning and 1 = prune everything. Default = 0
Character. Nearest neighbour method, either 'rann' or 'annoy'. Default = 'annoy'
Numerical. More trees facilitates hgiher precision when using 'annoy' method. Default = 20
Numerical. Margin of error when performing nearest neighbour search whilst using rann method. 0 would imply an exact search. Default = 0.0
Character. Distance metric for annoy method. Options: 'euclidean', 'cosine', 'manhattan', 'hamming'. Default = 'euclidean'
Numerical. (scanpy only) How many neighbours should be found per cell, a higher value typically achieves more accurate results. Default = 15
Numerical. (scanpy only) The seed value to use. Default = 0
Character. (scanpy only) String indicating which methodology to use including: ‘umap’, ‘gauss’ or ‘rapids’
Character. (scanpy only) String indicating which distance metric to use, including: ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘correlation’, ‘dice’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘minkowski’, ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘yule’, ‘cityblock’, ‘cosine’, ‘euclidean’, ‘l1’, ‘l2’ or ‘manhattan’
Boolean. (scanpy only) Should diffusion maps be generated from the neighourhood graphs, these will be stored in computational_reductions and can be used for umap generation and further neighbourhood generation. Default = TRUE
Numerical. (scanpy only) How many components should be generated for the diffusion maps. Default = 15
Boolean. Should the shared nearest neighbour graph be calculated. Default = TRUE
Character. (scanpy only) What should the diffusion maps be named.