Method List
cafe.method.function.cf_comp1.comp1(adata, repreprocess=True, basis='X_pca', recompute_basis=False, component=1)
Comp1: baseline for linear wrapper, extract an embedded component pseudotime method
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess
|
bool
|
Whether to preprocess the data. |
True
|
basis
|
str
|
The embedding name in .obsm. |
'X_pca'
|
recompute_basis
|
bool
|
Whether to recompute the embedding. |
False
|
component
|
int
|
The component number. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A trajectory dict of linear wrapper. |
Source code in cafe/method/function/cf_comp1.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
cafe.method.function.cf_state_comp.state_comp(adata, repreprocess=True, n_comps=2, basis='X_pca', recompute_basis=False, pseudotime_index=1, wrapper_type='probability', cluster_key='clusters')
State_Comp: baseline for probability and lineage wrapper, state transition probability based on embedded components
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess (bool, optional): Whether to preprocess the data.
n_comps (int, optional): The number of components.
basis (str, optional): The embedding name in .obsm.
recompute_basis (bool, optional): Whether to recompute the embedding.
pseudotime_index (int, optional): The index of the component to use for pseudotime.
wrapper_type (str, optional): The type of wrapper to use.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
A trajectory dict of probability or lineage wrapper. |
Source code in cafe/method/function/cf_state_comp.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
cafe.method.function.cf_cluster_mst.cluster_mst(adata, repreprocess=True, basis='X_pca', recluster=False, cluster='clusters', distance_metric='euclidean')
Cluster MST: baseline for cluster wrapper, creating a Minimum Spanning Tree (MST) on cluster centers.
This method first clusters the cells (or uses existing clusters), calculates the center of each cluster in a given embedding, and then constructs a Minimum Spanning Tree (MST) connecting these centers to represent the trajectory backbone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess
|
bool
|
Whether to run the preprocessing pipeline. |
True
|
basis
|
str
|
The embedding in |
'X_pca'
|
recluster
|
bool
|
If True, re-computes cell clusters using the Leiden algorithm. |
False
|
cluster
|
str
|
The key in |
'clusters'
|
distance_metric
|
str
|
The distance metric to use for calculating distances between cluster centers. |
'euclidean'
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
A trajectory dict compatible with the 'lineage' wrapper, containing the milestone network and cluster assignments. |
Source code in cafe/method/function/cf_cluster_mst.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
cafe.method.function.cf_projection_mst.projection_mst(adata, repreprocess=True, basis='X_pca', recluster=True, cluster='clusters', distance_metric='euclidean')
Projection MST: projects cells onto a Minimum Spanning Tree constructed from cluster centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess
|
bool
|
Whether to run the preprocessing pipeline. |
True
|
basis
|
str
|
description. Defaults to "X_pca". |
'X_pca'
|
recluster
|
bool
|
If True, re-computes cell clusters using the Leiden algorithm. |
True
|
cluster
|
str
|
The key in |
'clusters'
|
distance_metric
|
str
|
The distance metric to use for calculating distances between cluster centers. |
'euclidean'
|
Returns: dict: A trajectory dict compatible with the 'projection' wrapper, containing the milestone network, embeddings, and cluster assignments.
Source code in cafe/method/function/cf_projection_mst.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
cafe.method.function.cf_graph_mst.graph_mst(adata, repreprocess=True)
Source code in cafe/method/function/cf_graph_mst.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
cafe.method.function.cf_paga.paga(adata, start_cell, repreprocess=True, repreprocess_kwargs={}, cluster='clusters', n_dcs=15, connectivity_cutoff=0.5)
PAGA: partition-based graph abstraction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object |
required |
start_cell
|
str
|
Starting cell ID for pseudotime calculation. |
required |
repreprocess
|
bool
|
whether to repreprocess the anndata object. |
True
|
repreprocess_kwargs
|
dict
|
Parameters for repreprocess pipeline. |
{}
|
cluster
|
str
|
Cluster column name in adata.obs. |
'clusters'
|
n_dcs
|
int
|
Number of diffusion components. |
15
|
connectivity_cutoff
|
float
|
Cutoff for the connectivity matrix. |
0.5
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Trajectory results including branch network, branches, and progressions. |
Source code in cafe/method/function/cf_paga.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
cafe.method.function.cf_cytotrace2.cytotrace2(adata, repreprocess=True, cluster=None, cytotrace2_kwargs={})
Cytotrace2: cellular potency categories and absolute developmental potential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess
|
bool
|
Whether to preprocess the data. |
True
|
cluster
|
str
|
Cluster column in '.obs' columns. |
None
|
cytotrace2_kwargs
|
dict
|
cytotraces2 core parameter dict, refer to github source code. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A trajectory dict with keys: "wrapper_type" and "pseudotime". |
Source code in cafe/method/function/cf_cytotrace2.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
cafe.method.function.cf_sctc.sctc(adata, repreprocess=True)
SCTC: Single-Cell Transcriptional Complexity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object. |
required |
repreprocess
|
bool
|
Whether to preprocess the data. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A trajectory dict with keys: "wrapper_type" and "pseudotime". |
Source code in cafe/method/function/cf_sctc.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
cafe.method.function.cf_palantir.palantir(adata, start_cell, repreprocess=True, palantir_kwargs={}, palantir_results_kwargs={}, wrapper_type='linear', linear_type='pseudotime', cluster='clusters')
Palantir: characterization of cell fate probabilities
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
The input AnnData object |
required |
start_cell
|
str
|
The starting cell ID for palantir. |
required |
repreprocess
|
bool
|
Whether to preprocess the data. |
True
|
palantir_kwargs
|
dict
|
Palantir core parameter dict, refer to scanpy.external.tl.palantir. |
{}
|
palantir_results_kwargs
|
dict
|
Palantir result output parameter dict, refer to scanpy.external.tl.palantir_results. |
{}
|
wrapper_type
|
Literal['linear', 'probability', 'lineage']
|
Wrapper type for the output. |
'linear'
|
linear_type
|
Literal['pseudotime', 'entropy']
|
Linear type for linear wrapper. |
'pseudotime'
|
cluster
|
str
|
Cluster column in '.obs' columns for lineage wrapper. |
'clusters'
|
Returns: dict: A trajectory dict with keys: "wrapper_type" and "pseudotime".
Source code in cafe/method/function/cf_palantir.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
cafe.method.function.cf_scvelo.scvelo(adata, repreprocess=True, repreprocess_kwargs={}, velocity_kwargs={}, velocity_graph_kwargs={})
scVelo: RNA velocity generalized through dynamical modeling
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object |
required |
repreprocess
|
bool
|
Whether to repreprocess the anndata object. |
True
|
repreprocess_kwargs
|
dict
|
Parameter dict for repreprocess pipeline. |
{}
|
velocity_kwargs
|
dict
|
Parameter dict for velocity calculation, refer to scvelo.tl.velocity. |
{}
|
velocity_graph_kwargs
|
dict
|
Parameter dict for velocity graph calculation, refer to scvelo.tl.velocity_embedding. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_scvelo.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
cafe.method.function.cf_dynamo.dynamo(adata, basis, repreprocess=True, repreprocess_kwargs={}, moment=True, n_neighbors=30, dynamics_kwargs={}, cell_velocities_kwargs={})
Dynamo: Mapping Transcriptomic Vector Fields of Single Cells
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object. |
required |
repreprocess
|
bool
|
Whether to repreprocess the anndata object. |
True
|
repreprocess_kwargs
|
dict
|
Parameter dict for repreprocess pipeline with dynamo style. |
{}
|
dynamics_kwargs
|
dict
|
Parameter dict for cell dynamics high dimensional velocity calculation, refer to dyn.tl.dynamics. |
{}
|
cell_velocities_kwargs
|
dict
|
Parameter dict for cell low dimensional velocity calculation, refer to dynamo.tl.cell_velocities. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_dynamo.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
cafe.method.function.cf_velovi.velovi(adata, repreprocess=True, repreprocess_kwargs={}, velovi_model_kwargs={}, velovi_train_kwargs={}, n_sample=25)
Deep generative modeling of transcriptional dynamics for RNA velocity analysis in single cells Args: adata (ad.AnnData): AnnData object repreprocess (bool, optional): Whether to repreprocess the anndata object. repreprocess_kwargs (dict, optional): Parameter dict for repreprocess pipeline. velovi_model_kwargs (dict, optional): Parameter dict for VeloVI model initialization, refer to scvi.external.VELOVI. velovi_train_kwargs (dict, optional): Parameter dict for VeloVI model training , refer to scvi.external.VELOVI.train. n_sample (int, optional): Sample number from latent space, refer to scvi.external.VELOVI.get_latent_time.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_velovi.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
cafe.method.function.cf_veloae.veloae(adata, repreprocess=True, repreprocess_kwargs={}, veloae_args={})
VeloAE: Representation learning of RNA velocity reveals robust cell transitions
Source code in cafe/method/function/cf_veloae.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
cafe.method.function.cf_unitvelo.unitvelo(adata, cluster, configuration_kwargs={})
UniTVelo: temporally unified RNA velocity reinforces single-cell trajectory inference
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object. |
required |
cluster
|
str
|
Cluster column name in adata.obs. |
required |
configuration_kwargs
|
dict
|
Parameter dict for unitvelo pipeline, refer to config.py. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_unitvelo.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
cafe.method.function.cf_celldancer.celldancer(adata, cluster, basis, repreprocess=True, repreprocess_kwargs={}, velocity_kwargs={}, compute_cell_velocity_kwargs={})
CellDancer: Estimating Cell-dependent RNA Velocity
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object |
required |
repreprocess
|
bool
|
Whether to repreprocess the anndata object. |
True
|
repreprocess_kwargs
|
dict
|
Parameter dict for repreprocess pipeline. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity, only velocity_embedding is available |
Source code in cafe/method/function/cf_celldancer.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
cafe.method.function.cf_pyrovelocity.pyrovelocity(adata, configuration_kwargs={})
PyroVelocity: probabilistic modeling of RNA velocity
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object. |
required |
configuration_kwargs
|
dict
|
Configuration dict for pyrovelocity pipeline, refer to pancrease template. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_pyrovelocity.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
cafe.method.function.cf_stavia.stavia(adata, cluster, start_cell, repreprocess=True, data_basis='X_pca', ncomps=30, via_kwargs={}, prune_milestone=True)
StaVia: spatially and temporally aware cartography with higher-order random walks for cell atlases Returns: dict: trajectory dict with keys about cluster wrapper
Source code in cafe/method/function/cf_stavia.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
cafe.method.function.cf_cellrank.cellrank(adata, cluster, repreprocess=True, wrapper_type='probability', kernel='connectivity', kernel_params={}, initial_states=None, terminal_states=None, fit_kwargs={}, predict_terminal_states_kwargs={}, using_macrostate=True)
CellRank 2: unified fate mapping in multiview single-cell data
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adata
|
AnnData
|
AnnData object. |
required |
repreprocess
|
bool
|
Whether to repreprocess the anndata object. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
trajectory dict with keys about velocity |
Source code in cafe/method/function/cf_cellrank.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |