dynamo.vf.rank_divergence_genes

dynamo.vf.rank_divergence_genes(adata, group=None, genes=None, cell_idx=None, sampling=None, sample_ncells=1000, basis='pca', vector_field_class=None, method='analytical', **kwargs)[source]

Rank gene’s absolute, positive, negative divergence by different cell groups.

Parameters
  • adata (AnnData) – AnnData object that contains the reconstructed vector field function in the uns attribute.

  • group (str or None (default: None)) – The cell group that speed ranking will be grouped-by.

  • genes (None or list (default: None)) – The gene list that speed will be ranked. If provided, they must overlap the dynamics genes.

  • cell_idx (None or list (default: None)) – The numeric indices of the cells that you want to draw the jacobian matrix to reveal the regulatory activity.

  • sampling (None or list (default: None)) – The method to downsample cells for the purpose of efficiency.

  • basis (str or None (default: umap)) – The embedding data in which the vector field was reconstructed.

  • vector_field_class (vectorfield) – If not None, the divergene will be computed using this class instead of the vector field stored in adata.

  • method (str (default: analytical)) – The method that will be used for calculating Jacobian, either analytical or numeric. analytical method will use the analytical form of the reconstructed vector field for calculating Jacobian while numeric method will use numdifftools for calculation. analytical method is much more efficient.

  • kwargs – Additional parameters pass to jacobian.

Returns

adata – AnnData object that is updated with the speed key in the .obs.

Return type

AnnData