cellrank.tl.estimators.CFLARE.predict

CFLARE.predict(use=None, percentile=98, method='leiden', cluster_key=None, n_clusters_kmeans=None, n_neighbors=20, resolution=0.1, n_matches_min=0, n_neighbors_filtering=15, basis=None, n_comps=5, scale=None)[source]

Find approximate recurrent classes of the Markov chain.

Filter to obtain recurrent states in left eigenvectors. Cluster to obtain approximate recurrent classes in right eigenvectors.

Parameters
  • use (Union[int, Sequence[int], None]) – Which or how many first eigenvectors to use as features for filtering and clustering. If None, use the eigengap statistic.

  • percentile (Optional[int]) – Threshold used for filtering out cells which are most likely transient states. Cells which are in the lower percentile percent of each eigenvector will be removed from the data matrix.

  • method (Literal[‘leiden’, ‘means’]) –

    Method to be used for clustering. Valid option are:

  • cluster_key (Optional[str]) – Key in anndata.AnnData.obs in order to associate names and colors with terminal_states.

  • n_clusters_kmeans (Optional[int]) – If None, this is set to use + 1.

  • n_neighbors (int) – Number of neighbors in a KNN graph. This is the \(K\) parameter for that, the number of neighbors for each cell. Only used when method = 'leiden'.

  • resolution (float) – Resolution parameter for scanpy.tl.leiden(). Should be chosen relatively small.

  • n_matches_min (int) – Filters out cells which don’t have at least n_matches_min neighbors from the same category. This filters out some cells which are transient but have been misassigned.

  • n_neighbors_filtering (int) – Parameter for filtering cells. Cells are filtered out if they don’t have at least n_matches_min neighbors among their n_neighbors_filtering nearest cells.

  • basis (Optional[str]) – Key from anndata.AnnData.obsm as additional features for clustering. If None, use only the right eigenvectors.

  • n_comps (int) – Number of embedding components to be use when basis != None.

  • scale (Optional[bool]) – Scale the values to z-scores. If None, scale the values if basis != None.

Return type

None

Returns

Nothing, just updates the following fields: