bbknn.matrix.bbknn

bbknn.matrix.bbknn(pca, batch_list, neighbors_within_batch=3, n_pcs=50, trim=None, computation='annoy', annoy_n_trees=10, pynndescent_n_neighbors=30, pynndescent_random_state=0, metric='euclidean', set_op_mix_ratio=1, local_connectivity=1, approx=None, use_annoy=None, use_faiss=None, scanpy_logging=False)

Scanpy-independent BBKNN variant that runs on a PCA matrix and list of per-cell batch assignments instead of an AnnData object. Non-data-entry arguments behave the same way as bbknn.bbknn(). Returns a (distances, connectivities, parameters) tuple, like what would have been stored in the AnnData object. The connectivities are the actual neighbourhood graph.

Input

pcanumpy.array

PCA (or other dimensionality reduction) coordinates for each cell, with cells as rows.

batch_listnumpy.array or list

A list of batch assignments for each cell.

scanpy_loggingbool, optional (default: False)

Whether to use scanpy logging to print updates rather than warnings.warn()