dynamo.vf.rank_cells
- dynamo.vf.rank_cells(adata, arr_key, groups=None, genes=None, abs=False, fcn_pool=<function <lambda>>, dtype=None, output_values=False)[source]
Rank cell’s absolute, positive, negative vector field metrics by different gene groups.
- Parameters:
adata (
AnnData
) – AnnData object that contains the array to be sorted in .var or .layer.arr_key (str or
ndarray
) – The key of the to-be-ranked array stored in .var or or .layer. If the array is found in .var, the groups argument will be ignored. If a numpy array is passed, it is used as the array to be ranked and must be either an 1d array of length .n_var, or a .n_obs-by-.n_var 2d array.groups (str or None (default: None)) – Gene groups used to group the array.
genes (list or None (default: None)) – The gene list that speed will be ranked. If provided, they must overlap the dynamics genes.
abs (bool (default: False)) – When pooling the values in the array (see below), whether to take the absolute values.
fcn_pool (callable (default: numpy.mean(x, axis=0))) – The function used to pool values in the to-be-ranked array if the array is 2d.
- Returns:
- ret_dict: dict
A dictionary of cells names and values based on which the genes are sorted for each gene group.