cellrank.tl.estimators.GPCCA.compute_lineage_drivers

GPCCA.compute_lineage_drivers(lineages=None, cluster_key=None, clusters=None, layer='X', use_raw=False, return_drivers=False)

Compute driver genes per lineage.

Correlates gene expression with lineage probabilities, for a given lineage and set of clusters. Often, it makes sense to restrict this to a set of clusters which are relevant for the specified lineages.

Parameters
  • lineages (Union[str, Sequence, None]) – Either a set of lineage names from absorption_probabilities .names or None, in which case all lineages are considered.

  • cluster_key (Optional[str]) – Key from adata .obs to obtain cluster annotations. These are considered for clusters.

  • clusters (Union[str, Sequence, None]) – Restrict the correlations to these clusters.

  • layer (str) – Key from adata .layers.

  • use_raw (bool) – Whether or not to use adata .raw to correlate gene expression. If using a layer other than .X, this must be set to False.

  • return_drivers (bool) – Whether to return the lineage drivers as pandas.DataFrame.

Returns

Updates adata .var or adata .raw.var, depending on use_raw with lineage drivers saved as columns of the form {direction} {lineages}. Also updates the following fields:

If return_drivers=True, returns the lineage drivers as pandas.DataFrame.

Return type

pandas.DataFrame or None