- CFLARE.compute_terminal_states(use=None, percentile=98, method='kmeans', 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=False, en_cutoff=0.7, p_thresh=1e-15)¶
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.
int]) – Threshold used for filtering out cells which are most likely transient states. Cells which are in the lower
percentilepercent of each eigenvector will be removed from the data matrix.
str) – Method to be used for clustering. Must be one of ‘louvain’, ‘leiden’ or ‘kmeans’.
int) – If we use ‘louvain’ or ‘leiden’ for clustering cells, we need to build a KNN graph. This is the \(K\) parameter for that, the number of neighbors for each cell.
float) – Resolution parameter for ‘louvain’ or ‘leiden’ clustering. Should be chosen relatively small.
int) – Parameter for filtering cells. Cells are filtered out if they don’t have at least
n_matches_minneighbors among their
int) – Number of embedding components to be use when
basisis not None.
bool) – Scale to z-scores. Consider using this if appending embedding to features.
float]) – If
cluster_keyis given, this parameter determines when an approximate recurrent class will be labeled as ‘Unknown’, based on the entropy of the distribution of cells over transcriptomic clusters.
float) – If cell cycle scores were provided, a Wilcoxon rank-sum test is conducted to identify cell-cycle states. If the test returns a positive statistic and a p-value smaller than
p_thresh, a warning will be issued.
Nothing, but updates the following fields:
- Return type