- dynamo.tl.cell_wise_confidence(adata, X_data=None, V_data=None, ekey='M_s', vkey='velocity_S', neighbors_from_basis=False, method='jaccard')
Calculate the cell-wise velocity confidence metric.
AnnData) – An AnnData object.
None]) – The RNA velocity of single cells (or velocity estimates projected to reduced dimension, like pca, of single cells). Note that X, V_mat need to have the exact dimensionalities. Defaults to None.
str) – The dictionary key that corresponds to the gene expression in the layer attribute. By default, it is the smoothed expression M_s. Defaults to “M_s”.
str) – The dictionary key that corresponds to the estimated velocity values in layers attribute. Defaults to “velocity_S”.
bool) – Whether to construct nearest neighbors from low dimensional space as defined by the basis, instead of using that calculated during UMAP process. Defaults to False.
'divergence']) – Which method will be used for calculating the cell wise velocity confidence metric. Defaults to “jaccard”, which measures how well each velocity vector meets the geometric constraints defined by the local neighborhood structure. Jaccard index is calculated as the fraction of the number of the intersected set of nearest neighbors from each cell at current expression state (X) and that from the future expression state (X + V) over the number of the union of these two sets. The cosine or correlation method is similar to that used by scVelo (https://github.com/theislab/scvelo).
NotImplementedError – method is invalid.
- Return type:
An updated AnnData object with .obs.confidence as the cell-wise velocity confidence.