neighbors
Compute nearest neighbors distance matrices and construct neighborhood graphs for single-cell RNA sequencing data analysis. Supports customizable parameters for manifold approximation, distance metrics, and kNN search methods.
Instructions
Compute nearest neighbors distance matrix and neighborhood graph
Input Schema
Name | Required | Description | Default |
---|---|---|---|
key_added | No | Key prefix for storing neighbor results. | |
knn | No | Whether to use hard threshold for neighbor restriction. | |
method | No | Method for computing connectivities ('umap' or 'gauss'). | umap |
metric | No | Distance metric to use. | euclidean |
metric_kwds | No | Options for the distance metric. | |
n_neighbors | No | Size of local neighborhood used for manifold approximation. | |
n_pcs | No | Number of PCs to use. If None, automatically determined. | |
random_state | No | Random seed for reproducibility. | |
transformer | No | Approximate kNN search implementation ('pynndescent' or 'rapids'). | |
use_rep | No | Key for .obsm to use as representation. |