scvelo.inference.get_n_neighbors¶

scvelo.inference.
get_n_neighbors
(adata, labeling_time_mask, obs_dist_argsort, n_nontrivial_counts, use_rep='X', sparse_op=False, n_jobs=None)¶ Get number of neighbors required to include
n_nontrivial_counts
counts per labeling time.See [Weiler et al., 2023].
 adata
AnnData object.
 labeling_time_mask
Dictionary with labeling times as keys and masks to subset to relevant observations as values.
 obs_dist_argsort
Dictionary with argsorted pairwise distances per labeling_time_point.
 n_nontrivial_counts
Number of nontrivial counts to consider for each labeling time point.
 use_rep
Representation to use for identifying number of neighbors.
 sparse_op
Boolean flag to run operations on sparse or dense matrix.