Estimate k-nearest neighbours graph from a TourExperiment object

estimate_neighbors(.data, num_neighbors, .on = NULL,
  .engine = BiocNeighbors::KmknnParam())

Arguments

.data

a TourExperiment object

num_neighbors

An integer scalar for number of neighbors

.on

a character scalar, indicating the part of .data to estimate nearest neighbors. If missing the first assay will be used.

.engine

A BiocNeighbor::BiocNeighborParam() object that reperesents the algorithm used to compute nearest neighbors.

Value

A TourExperiment object with the neighborSets slot filled.

Details

The representation of the nearest neighbors is a matrix of size ncol(.data) by num_neighbors containing the neighbor indexes for each sample in .data