multivelo.knn_smooth_chrom
- multivelo.knn_smooth_chrom(adata_atac, nn_idx=None, nn_dist=None, conn=None, n_neighbors=None)
KNN smoothing.
This function smooth (impute) the count matrix with k nearest neighbors. The inputs can be either KNN index and distance matrices or a pre-computed connectivities matrix (for example in adata_rna object).
- Parameters:
adata_atac (
AnnData) – ATAC anndata object.nn_idx (np.darray (default: None)) – KNN index matrix of size (cells, k).
nn_dist (np.darray (default: None)) – KNN distance matrix of size (cells, k).
conn (csr_matrix (default: None)) – Pre-computed connectivities matrix.
n_neighbors (int (default: None)) – Top N neighbors to extract for each cell in the connectivities matrix.
- Returns:
.layers[‘Mc’] stores imputed values.