dynamo.vf.rank_jacobian_genes

dynamo.vf.rank_jacobian_genes(adata, groups=None, jkey='jacobian_pca', abs=False, mode='full reg', exclude_diagonal=False, normalize=False, return_df=False, **kwargs)[source]

Rank genes or gene-gene interactions based on their Jacobian elements for each cell group.

Run .vf.jacobian and set store_in_adata=True before using this function.

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

  • groups (Optional[str]) – Cell groups used to group the Jacobians.

  • jkey (str) – The key of the stored Jacobians in .uns.

  • abs (bool) – Whether take the absolute value of the Jacobian.

  • mode (str) – {‘full reg’, ‘full eff’, ‘reg’, ‘eff’, ‘int’, ‘switch’} (default: ‘full_reg’) The mode of ranking: (1) ‘full reg’: top regulators are ranked for each effector for each cell group; (2) ‘full eff’: top effectors are ranked for each regulator for each cell group; (3) ‘reg’: top regulators in each cell group; (4) ‘eff’: top effectors in each cell group; (5) ‘int’: top effector-regulator pairs in each cell group. (6) ‘switch’: top effector-regulator pairs that show mutual inhibition pattern in each cell group.

  • exclude_diagonal (bool) – Whether to consider the self-regulation interactions (diagnoal of the jacobian matrix)

  • normalize (bool) – Whether to normalize the Jacobian across all cells before performing the ranking.

  • return_df (bool) – Whether to return the data or to save results in adata object via the key mode of adata.uns.

  • kwargs – Keyword arguments passed to ranking functions.

Returns:

different modes return different types of return values 1. full reg and full eff:

A pandas dataframe containing ranking info based on Jacobian elements

  1. reg eff int:

    A dictionary object whose keys correspond to groups, and whose values are specific rank’s pd dataframe

Return type:

rank_info