- dynamo.tl.confident_cell_velocities(adata, group, lineage_dict, ekey='M_s', vkey='velocity_S', basis='umap', confidence_threshold=0.85, only_transition_genes=False)
Confidently compute transition probability and project high dimension velocity vector to existing low dimension embeddings using progenitors and mature cell groups priors.
AnnData) – an Annodata object
group (str) – The column key/name that identifies the cell state grouping information of cells. This will be used for calculating gene-wise confidence score in each cell state.
lineage_dict (dict) – A dictionary describes lineage priors. Keys correspond to the group name from group that corresponding to the state of one progenitor type while values correspond to the group names from group of one or multiple terminal cell states. The best practice for determining terminal cell states are those fully functional cells instead of intermediate cell states. Note that in python a dictionary key cannot be a list, so if you have two progenitor types converge into one terminal cell state, you need to create two records each with the same terminal cell as value but different progenitor as the key. Value can be either a string for one cell group or a list of string for multiple cell groups.
ekey (str or None (default: M_s)) – The layer that will be used to retrieve data for identifying the gene is in induction or repression phase at each cell state. If None, .X is used.
vkey (str or None (default: velocity_S)) – The layer that will be used to retrieve velocity data for calculating gene-wise confidence. If None, velocity_S is used.
basis (str (optional, default umap)) – The dictionary key that corresponds to the reduced dimension in .obsm attribute.
confidence_threshold (float (optional, default 0.85)) – The minimal threshold of the mean of the average progenitors and the average mature cells prior based gene-wise velocity confidence score. Only genes with score larger than this will be considered as confident transition genes for velocity projection.
only_transition_genes (bool (optional, default False)) – Whether only use previous identified transition genes for confident gene selection, followed by velocity projection.
adata – Returns an updated ~anndata.AnnData with only confident genes based transition_matrix and projected embedding of high dimension velocity vectors in the existing embeddings of current cell state, calculated using either the cosine kernel method from (La Manno et al. 2018) or the Itô kernel for the FP method, etc.
- Return type