├── .editorconfig ├── .github ├── .codecov.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── deployment.yml │ ├── lint.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .pre-commit-config.yaml ├── .readthedocs.yaml ├── CONTRIBUTING.rst ├── LICENSE ├── MANIFEST.in ├── README.rst ├── docs ├── Makefile ├── _ext │ └── typed_returns.py ├── _static │ ├── css │ │ └── override.css │ └── img │ │ ├── dark_mode_logo.png │ │ ├── dark_mode_overview.png │ │ ├── light_mode_logo.png │ │ └── light_mode_overview.png ├── _templates │ └── autosummary │ │ └── class.rst ├── about │ ├── cite.rst │ ├── index.rst │ ├── team.rst │ └── version2.rst ├── api │ ├── datasets.rst │ ├── developer.rst │ ├── estimators.rst │ ├── index.rst │ ├── kernels.rst │ ├── models.rst │ └── plotting.rst ├── conf.py ├── contributing.rst ├── index.rst ├── installation.rst ├── make.bat ├── references.bib ├── references.rst ├── release │ ├── changelog │ │ ├── 1007.bugfix.rst │ │ ├── 1008.misc.rst │ │ ├── 1019.bugfix.rst │ │ ├── 1020.bugfix.rst │ │ ├── 1029.bugfix.rst │ │ ├── 1034.bugfix.rst │ │ ├── 1035.bugfix.rst │ │ ├── 1040.misc.rst │ │ ├── 1043.bugfix.rst │ │ ├── 748.bugfix.rst │ │ ├── 750.bugfix.rst │ │ ├── 761.feature.rst │ │ ├── 764.feature.rst │ │ ├── 779.feature.rst │ │ ├── 784.bugfix.rst │ │ ├── 791.feature.rst │ │ ├── 798.misc.rst │ │ ├── 828.feature.rst │ │ ├── 835.bugfix.rst │ │ ├── 842.bugfix.rst │ │ ├── 850.misc.rst │ │ ├── 861.bugfix.rst │ │ ├── 880.doc.rst │ │ ├── 883.doc.rst │ │ ├── 885.doc.rst │ │ ├── 886.feature.rst │ │ ├── 887.bugfix.rst │ │ ├── 890.feature.rst │ │ ├── 894.misc.rst │ │ ├── 896.feature.rst │ │ ├── 901.doc.rst │ │ ├── 913.misc.rst │ │ ├── 914.misc.rst │ │ ├── 923.bugfix.rst │ │ ├── 929.bugfix.rst │ │ ├── 930.feature.rst │ │ ├── 936.bugfix.rst │ │ ├── 937.bugfix.rst │ │ ├── 938.bugfix.rst │ │ ├── 943.bugfix.rst │ │ ├── 949.bugfix.rst │ │ ├── 951.bugfix.rst │ │ ├── 954.misc.rst │ │ ├── 975.doc.rst │ │ ├── 976.doc.rst │ │ ├── 978.bugfix.rst │ │ ├── 989.bugfix.rst │ │ └── template.rst │ ├── notes-1.0.0.rst │ ├── notes-1.1.0.rst │ ├── notes-1.2.0.rst │ ├── notes-1.3.0.rst │ ├── notes-1.3.1.rst │ ├── notes-1.4.0.rst │ ├── notes-1.5.0.rst │ ├── notes-1.5.1.rst │ └── notes-dev.rst ├── release_notes.rst ├── spelling │ ├── autosummary.txt │ └── general.txt └── utils.py ├── pyproject.toml ├── src └── cellrank │ ├── __init__.py │ ├── _utils │ ├── __init__.py │ ├── _colors.py │ ├── _docs.py │ ├── _enum.py │ ├── _key.py │ ├── _lineage.py │ ├── _linear_solver.py │ ├── _parallelize.py │ └── _utils.py │ ├── datasets.py │ ├── estimators │ ├── __init__.py │ ├── _base_estimator.py │ ├── mixins │ │ ├── __init__.py │ │ ├── _fate_probabilities.py │ │ ├── _kernel.py │ │ ├── _lineage_drivers.py │ │ ├── _utils.py │ │ └── decomposition │ │ │ ├── __init__.py │ │ │ ├── _eigen.py │ │ │ └── _schur.py │ └── terminal_states │ │ ├── __init__.py │ │ ├── _cflare.py │ │ ├── _gpcca.py │ │ └── _term_states_estimator.py │ ├── kernels │ ├── __init__.py │ ├── _base_kernel.py │ ├── _connectivity_kernel.py │ ├── _cytotrace_kernel.py │ ├── _experimental_time_kernel.py │ ├── _precomputed_kernel.py │ ├── _pseudotime_kernel.py │ ├── _real_time_kernel.py │ ├── _utils.py │ ├── _velocity_kernel.py │ ├── mixins │ │ ├── __init__.py │ │ ├── _anndata.py │ │ ├── _io.py │ │ └── _kernel.py │ └── utils │ │ ├── __init__.py │ │ ├── _projection.py │ │ ├── _pseudotime_scheme.py │ │ ├── _random_walk.py │ │ ├── _similarity.py │ │ ├── _tmat_flow.py │ │ └── _velocity_model.py │ ├── logging │ ├── __init__.py │ └── _logging.py │ ├── models │ ├── __init__.py │ ├── _base_model.py │ ├── _gamr_model.py │ ├── _pygam_model.py │ ├── _sklearn_model.py │ └── _utils.py │ ├── pl │ ├── __init__.py │ ├── _aggregate_fate_probs.py │ ├── _circular_projection.py │ ├── _cluster_trends.py │ ├── _gene_trend.py │ ├── _heatmap.py │ ├── _log_odds.py │ └── _utils.py │ └── settings │ ├── __init__.py │ └── _settings.py └── tests ├── _ground_truth_adatas ├── adata_100.h5ad ├── adata_200.h5ad └── adata_50.h5ad ├── _ground_truth_figures ├── all_models_for_1_gene_failed.png ├── all_models_for_1_gene_failed_same_plot.png ├── all_models_for_1_lineage_failed.png ├── bar.png ├── bar_bwd.png ├── bar_cluster_subset.png ├── bar_cluster_subset_violin.png ├── bar_lineage_subset.png ├── cluster_lineage.png ├── cluster_lineage_2_failed_genes.png ├── cluster_lineage_bwd.png ├── cluster_lineage_covariates.png ├── cluster_lineage_covariates_cmap.png ├── cluster_lineage_covariates_ratio.png ├── cluster_lineage_data_key.png ├── cluster_lineage_gene_symbols.png ├── cluster_lineage_leiden.png ├── cluster_lineage_no_norm.png ├── cluster_lineage_random_state.png ├── cluster_lineage_raw.png ├── composition.png ├── composition_kwargs_autopct.png ├── driver_corr.png ├── driver_corr_adjust_text.png ├── driver_corr_cmap.png ├── driver_corr_color.png ├── driver_corr_fontsize.png ├── driver_corr_gene_sets.png ├── driver_corr_gene_sets_colors.png ├── driver_corr_legend_loc.png ├── driver_corr_return_ax.png ├── driver_corr_use_raw.png ├── drivers_ascending.png ├── drivers_backward.png ├── drivers_cmap.png ├── drivers_n_genes.png ├── drivers_title_fmt.png ├── failed_only_main_diagonal.png ├── failed_only_off_diagonal.png ├── fitted_cluster_fates.png ├── fitted_empty_model.png ├── fitted_gene_trends.png ├── fitted_heatmap │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── fitted_ignore_plot_smoothed_lineage.png ├── fitted_model_cells_with_weights.png ├── fitted_model_conf_int.png ├── fitted_model_conf_int_no_conf_int_computed.png ├── fitted_model_weights.png ├── flow_alpha.png ├── flow_cluster_ascending.png ├── flow_cluster_descending.png ├── flow_clusters_subset.png ├── flow_explicit_cluster_order.png ├── flow_legend_loc.png ├── flow_min_flow_keep_empty_clusters.png ├── flow_min_flow_remove_empty_clusters.png ├── flow_no_xticks.png ├── flow_return_ax.png ├── flow_source_clusters.png ├── flow_time_categories_too_close.png ├── gamr_ci_50.png ├── gamr_default.png ├── gamr_lineage_prob.png ├── gamr_no_cbar.png ├── gamr_no_ci.png ├── gpcca_coarse_T.png ├── gpcca_coarse_T_cmap.png ├── gpcca_coarse_T_init_dist.png ├── gpcca_coarse_T_no_annot.png ├── gpcca_coarse_T_no_cbar.png ├── gpcca_coarse_T_no_order.png ├── gpcca_coarse_T_stat_dist.png ├── gpcca_coarse_T_stat_init_dist.png ├── gpcca_coarse_T_xtick_rot.png ├── gpcca_complex_spectrum.png ├── gpcca_real_spectrum.png ├── gpcca_real_spectrum_hide_eigengap.png ├── gpcca_schur_matrix.png ├── gpcca_schur_matrix_cmap.png ├── gpcca_schur_matrix_title.png ├── gpcca_spectrum_evals.png ├── gpcca_spectrum_evals_complex.png ├── gpcca_spectrum_title.png ├── heatmap_cluster_genes.png ├── heatmap_cluster_key_fate_probs │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_cluster_key_no_fate_probs │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_cluster_no_scale.png ├── heatmap_cmap.png ├── heatmap_fate_probs_genes.png ├── heatmap_fate_probs_lineages │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_gene_symbols │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_genes.png ├── heatmap_genes_1_gene_failed.png ├── heatmap_keep_gene_order │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_lineage_height │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_lineages │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_lineages_1_lineage_failed │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_lineages_bwd │ ├── lineage_0.png │ └── lineage_1.png ├── heatmap_lineages_raw │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_multiple_cluster_keys │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_multiple_cluster_keys_show_all_genes │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_no_cbar_genes.png ├── heatmap_no_cbar_lineages │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_no_cluster │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_no_cluster_genes │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_no_convolve │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_no_scale_genes.png ├── heatmap_no_scale_lineages │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── heatmap_show_dendrogram.png ├── heatmap_time_range │ ├── lineage_0.png │ ├── lineage_1.png │ └── lineage_2.png ├── kernel_random_walk_basis.png ├── kernel_random_walk_cmap.png ├── kernel_random_walk_ixs_legend_loc.png ├── kernel_random_walk_kwargs.png ├── kernel_random_walk_line_alpha.png ├── kernel_random_walk_line_width.png ├── kernel_random_walk_params.png ├── kernel_random_walk_start_ixs_range.png ├── log_odds.png ├── log_odds_alpha.png ├── log_odds_bwd.png ├── log_odds_categorical_keys.png ├── log_odds_cmap.png ├── log_odds_continuous_keys.png ├── log_odds_fontsize.png ├── log_odds_jitter.png ├── log_odds_kwargs.png ├── log_odds_kwargs_return_ax.png ├── log_odds_kwargs_return_axes.png ├── log_odds_layer.png ├── log_odds_legend_loc.png ├── log_odds_multiple_threshold.png ├── log_odds_ncols.png ├── log_odds_rest.png ├── log_odds_size.png ├── log_odds_threshold.png ├── log_odds_threshold_color.png ├── log_odds_use_raw.png ├── log_odds_xticks_steps_size.png ├── mc_complex_spectrum.png ├── mc_kwargs_linewidths.png ├── mc_marker.png ├── mc_real_spectrum.png ├── mc_real_spectrum_hide_eigengap.png ├── mc_real_spectrum_hide_xticks.png ├── mc_spectrum.png ├── mc_spectrum_evals.png ├── mc_spectrum_evals_complex.png ├── mc_spectrum_title.png ├── mode_clustermap.png ├── mode_clustermap_format.png ├── mode_heatmap.png ├── mode_heatmap_clusters.png ├── mode_heatmap_cmap.png ├── mode_heatmap_format.png ├── mode_heatmap_lineages.png ├── mode_heatmap_title.png ├── mode_heatmap_xticks_rotation.png ├── model_1_lineage.png ├── model_default.png ├── model_default_bwd.png ├── model_no_legend.png ├── model_no_lineage.png ├── model_no_lineage_show_lin_probs.png ├── model_obs_data_key.png ├── model_show_lin_prob_cells_ci.png ├── model_show_lin_prob_cells_lineage_ci.png ├── msc_default.png ├── msc_labelrot.png ├── msc_legend_loc.png ├── msc_title.png ├── msc_width.png ├── paga.png ├── paga_lineage_subset.png ├── paga_pie.png ├── paga_pie_embedding.png ├── paga_pie_legend_position.png ├── paga_pie_legend_position_out.png ├── paga_pie_legend_simple.png ├── paga_pie_no_legend.png ├── paga_pie_only_clusters.png ├── paga_pie_only_fate_prob.png ├── paga_pie_title.png ├── pie.png ├── pie_autopct_none.png ├── pie_legend_kwargs.png ├── pie_legend_loc.png ├── pie_legend_loc_one.png ├── pie_reduction.png ├── pie_t.png ├── pie_title.png ├── plot_tsi.png ├── proj_default_ordering.png ├── proj_dont_normalize_by_mean.png ├── proj_duplicate_keys.png ├── proj_extra_keys.png ├── proj_hide_edges.png ├── proj_key_added.png ├── proj_labeldistance.png ├── proj_labelrot.png ├── proj_ncols.png ├── proj_no_cbar.png ├── proj_scvelo_kwargs.png ├── proj_text_kwargs.png ├── proj_use_raw.png ├── scvelo_connectivity_kernel_emb_stream.png ├── scvelo_final_states.png ├── scvelo_final_states_clusters.png ├── scvelo_gpcca_fate_probs_cont_not_same.png ├── scvelo_gpcca_fate_probs_cont_same_clusters.png ├── scvelo_gpcca_fate_probs_cont_same_no_clusters.png ├── scvelo_gpcca_final_states.png ├── scvelo_gpcca_final_states_cluster_key.png ├── scvelo_gpcca_final_states_cmap.png ├── scvelo_gpcca_final_states_discrete.png ├── scvelo_gpcca_final_states_lineages.png ├── scvelo_gpcca_final_states_no_same_plot.png ├── scvelo_gpcca_final_states_time.png ├── scvelo_gpcca_final_states_title.png ├── scvelo_gpcca_meta_states.png ├── scvelo_gpcca_meta_states_cluster_key.png ├── scvelo_gpcca_meta_states_cmap.png ├── scvelo_gpcca_meta_states_discrete.png ├── scvelo_gpcca_meta_states_lineages.png ├── scvelo_gpcca_meta_states_no_same_plot.png ├── scvelo_gpcca_meta_states_time.png ├── scvelo_gpcca_meta_states_title.png ├── scvelo_lin_probs.png ├── scvelo_lin_probs_clusters.png ├── scvelo_lin_probs_cmap.png ├── scvelo_lin_probs_lineages.png ├── scvelo_lin_probs_time.png ├── scvelo_pseudotime_kernel_hard_threshold_emb_stream.png ├── scvelo_pseudotime_kernel_soft_threshold_emb_stream.png ├── scvelo_transition_matrix_projection.png ├── scvelo_velocity_kernel_emb_stream.png ├── transpose.png ├── transpose_all_models_for_1_gene_failed.png ├── transpose_all_models_for_1_lineage_failed.png ├── transpose_all_models_for_1_lineage_failed_same_plot.png ├── transpose_failed_only_off_diagonal.png ├── transpose_same_plot.png ├── trends.png ├── trends_bwd.png ├── trends_cell_alpha.png ├── trends_conf_int.png ├── trends_fate_prob_cmap.png ├── trends_gam_ci_100.png ├── trends_gam_ci_20.png ├── trends_gene_as_title.png ├── trends_gene_legend_out.png ├── trends_gene_no_legend.png ├── trends_gene_symbols.png ├── trends_hide_cells.png ├── trends_lineage_alpha.png ├── trends_lineage_cell_color.png ├── trends_lineage_cell_color_clusters.png ├── trends_lineage_cell_color_clusters_obs_legend_loc.png ├── trends_lineage_cell_color_gene.png ├── trends_lineage_cmap.png ├── trends_lw.png ├── trends_margins.png ├── trends_no_cbar.png ├── trends_perc.png ├── trends_perc_per_lineage.png ├── trends_raw.png ├── trends_same_plot.png ├── trends_sharex.png ├── trends_sharey.png ├── trends_show_lineage_ci.png ├── trends_show_lineage_diff_plot.png ├── trends_show_lineage_ignores_no_transpose.png ├── trends_show_lineage_same_plot.png ├── trends_size.png ├── trends_suptitle.png ├── trends_time_key.png ├── trends_time_key_del_latent_time.png ├── trends_time_range.png ├── violin.png ├── violin_cluster_subset.png ├── violin_lineage_subset.png └── violin_no_cluster_key.png ├── _helpers.py ├── conftest.py ├── test_cflare.py ├── test_colors.py ├── test_gpcca.py ├── test_kernels.py ├── test_lineage.py ├── test_lineage_drivers.py ├── test_linear_solver.py ├── test_logging.py ├── test_model.py ├── test_pipeline.py ├── test_plotting.py ├── test_random_walk.py └── test_utils.py /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | 7 | [{*py,*.rst}] 8 | indent_style = space 9 | indent_size = 4 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [{*.yml,*.yaml}] 14 | indent_size = 2 15 | 16 | [Makefile] 17 | indent_style = tab 18 | -------------------------------------------------------------------------------- /.github/.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | require_ci_to_pass: true 3 | strict_yaml_branch: main 4 | 5 | coverage: 6 | range: 80...100 7 | status: 8 | project: 9 | default: 10 | target: 75% 11 | threshold: 1% 12 | patch: off 13 | 14 | comment: 15 | layout: reach, diff, files 16 | behavior: default 17 | require_changes: true 18 | branches: [main] 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a bug report to help us improve CellRank 4 | title: '' 5 | labels: bug 6 | assignees: michalk8 7 | 8 | --- 9 | 10 | 11 | ... 12 | 13 | 14 | ```python 15 | ... 16 | ``` 17 | 18 | 19 | ```pytb 20 | ... 21 | ``` 22 | 23 | #### Versions: 24 | 25 | > ... 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Create a request for a new feature 4 | title: '' 5 | labels: enhancement 6 | assignees: michalk8 7 | 8 | --- 9 | 10 | 11 | ... 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question about CellRank 4 | title: '' 5 | labels: question 6 | assignees: Marius1311, WeilerP 7 | 8 | --- 9 | 10 | 11 | ... 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **IMPORTANT: Please search among the [Pull requests](../pulls) before creating one.** 2 | 3 | ## Description 4 | 5 | 6 | ## How has this been tested? 7 | 8 | 9 | ## Closes 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/deployment.yml: -------------------------------------------------------------------------------- 1 | name: Deployment 2 | on: 3 | push: 4 | tags: [v*] 5 | 6 | jobs: 7 | deploy: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | id-token: write 11 | environment: deployment 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Set up Python 3.10 15 | uses: actions/setup-python@v5 16 | with: 17 | python-version: '3.10' 18 | 19 | - name: Install dependencies 20 | run: | 21 | python -m pip install --upgrade pip 22 | python -m pip install tox 23 | 24 | - name: Build package 25 | run: tox -e build-package 26 | 27 | - name: Publish package 28 | uses: pypa/gh-action-pypi-publish@release/v1 29 | with: 30 | skip-existing: true 31 | verify-metadata: true 32 | verbose: true 33 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | schedule: 5 | - cron: 00 00 * * 1 6 | push: 7 | branches: [main] 8 | pull_request: 9 | branches: [main] 10 | 11 | concurrency: 12 | group: ${{ github.workflow }}-${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | jobs: 16 | lint: 17 | name: Lint ${{ matrix.lint-kind }} 18 | runs-on: ubuntu-latest 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | lint-kind: [code, docs] 23 | 24 | steps: 25 | - uses: actions/checkout@v4 26 | with: 27 | submodules: true 28 | - name: Set up Python 3.10 29 | uses: actions/setup-python@v5 30 | with: 31 | python-version: '3.10' 32 | 33 | - name: Cache pre-commit 34 | if: ${{ matrix.lint-kind == 'code' }} 35 | uses: actions/cache@v4 36 | with: 37 | path: ~/.cache/pre-commit 38 | key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }} 39 | 40 | - name: Install dependencies 41 | run: | 42 | python -m pip install --upgrade pip 43 | python -m pip install tox 44 | 45 | - name: Install PyEnchant 46 | if: ${{ matrix.lint-kind == 'docs' }} 47 | run: | 48 | sudo apt-get update -y 49 | sudo apt-get install libenchant-2-dev 50 | 51 | - name: Lint ${{ matrix.lint-kind }} 52 | run: | 53 | tox -e lint-${{ matrix.lint-kind }} 54 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | schedule: 5 | - cron: 00 00 * * 1 6 | push: 7 | branches: [main] 8 | pull_request: 9 | branches: [main] 10 | 11 | concurrency: 12 | group: ${{ github.workflow }}-${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | jobs: 16 | test: 17 | runs-on: ${{ matrix.os }} 18 | strategy: 19 | fail-fast: false 20 | matrix: 21 | os: [ubuntu-latest] 22 | python: ['3.9', '3.10', '3.11', '3.12'] 23 | slepc: [noslepc] 24 | include: 25 | - os: macos-15 26 | python: '3.10' 27 | slepc: noslepc 28 | - os: ubuntu-latest 29 | python: '3.10' 30 | slepc: slepc 31 | 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: Set up Python ${{ matrix.python }} 35 | uses: actions/setup-python@v5 36 | with: 37 | python-version: ${{ matrix.python }} 38 | 39 | - name: Install pip dependencies 40 | run: | 41 | python -m pip install --upgrade pip 42 | python -m pip install tox 43 | 44 | - name: Setup Conda 45 | if: runner.os == 'macOS' 46 | uses: conda-incubator/setup-miniconda@v3 47 | with: 48 | auto-update-conda: true 49 | 50 | - name: Test 51 | run: | 52 | tox -e py${{ matrix.python }}-${{ matrix.slepc }} -v 53 | env: 54 | PYTEST_ADDOPTS: -v -n 2 55 | 56 | - name: Upload coverage 57 | uses: codecov/codecov-action@v4 58 | with: 59 | files: ./coverage.xml 60 | flags: tests-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.slepc }} 61 | name: unittests 62 | env_vars: OS,PYTHON 63 | token: ${{ secrets.CODECOV_TOKEN }} 64 | fail_ci_if_error: false 65 | verbose: true 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | *.DS_Store 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | cover/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | .pybuilder/ 77 | target/ 78 | 79 | # Jupyter Notebook 80 | .ipynb_checkpoints 81 | 82 | # IPython 83 | profile_default/ 84 | ipython_config.py 85 | 86 | # pyenv 87 | # For a library or package, you might want to ignore these files since the code is 88 | # intended to run in multiple environments; otherwise, check them in: 89 | # .python-version 90 | 91 | # pipenv 92 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 93 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 94 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 95 | # install all needed dependencies. 96 | #Pipfile.lock 97 | 98 | # poetry 99 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 100 | # This is especially recommended for binary packages to ensure reproducibility, and is more 101 | # commonly ignored for libraries. 102 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 103 | #poetry.lock 104 | 105 | # pdm 106 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 107 | #pdm.lock 108 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 109 | # in version control. 110 | # https://pdm.fming.dev/#use-with-ide 111 | .pdm.toml 112 | 113 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 114 | __pypackages__/ 115 | 116 | # Celery stuff 117 | celerybeat-schedule 118 | celerybeat.pid 119 | 120 | # SageMath parsed files 121 | *.sage.py 122 | 123 | # Environments 124 | .env 125 | .venv 126 | env/ 127 | venv/ 128 | ENV/ 129 | env.bak/ 130 | venv.bak/ 131 | 132 | # Spyder project settings 133 | .spyderproject 134 | .spyproject 135 | 136 | # Rope project settings 137 | .ropeproject 138 | 139 | # mkdocs documentation 140 | /site 141 | 142 | # mypy 143 | .mypy_cache/ 144 | .dmypy.json 145 | dmypy.json 146 | 147 | # Pyre type checker 148 | .pyre/ 149 | 150 | # pytype static type analyzer 151 | .pytype/ 152 | 153 | # Cython debug symbols 154 | cython_debug/ 155 | 156 | # PyCharm 157 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 158 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 159 | # and can be added to the global gitignore or merged into this file. For a more nuclear 160 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 161 | .idea/ 162 | 163 | # VS Code 164 | .vscode/ 165 | 166 | # documentation 167 | docs/api/_autosummary 168 | 169 | # tests 170 | tests/figures 171 | 172 | # Ruff 173 | .ruff_cache 174 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs/notebooks"] 2 | path = docs/notebooks 3 | url = https://github.com/theislab/cellrank_notebooks 4 | branch = main 5 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | fail_fast: false 2 | default_language_version: 3 | python: python3 4 | default_stages: 5 | - pre-commit 6 | - pre-push 7 | minimum_pre_commit_version: 3.0.0 8 | repos: 9 | - repo: https://github.com/psf/black 10 | rev: 24.8.0 11 | hooks: 12 | - id: black 13 | additional_dependencies: [toml] 14 | - repo: https://github.com/timothycrosley/isort 15 | rev: 5.13.2 16 | hooks: 17 | - id: isort 18 | additional_dependencies: [toml] 19 | - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks 20 | rev: v2.14.0 21 | hooks: 22 | - id: pretty-format-yaml 23 | args: [--autofix, --indent, '2'] 24 | - repo: https://github.com/pre-commit/pre-commit-hooks 25 | rev: v4.6.0 26 | hooks: 27 | - id: check-merge-conflict 28 | - id: check-ast 29 | - id: check-added-large-files 30 | - id: end-of-file-fixer 31 | - id: mixed-line-ending 32 | args: [--fix=lf] 33 | - id: file-contents-sorter 34 | files: docs/spelling/.*\.txt 35 | - id: trailing-whitespace 36 | - id: check-docstring-first 37 | - id: check-yaml 38 | - id: check-toml 39 | - repo: https://github.com/asottile/pyupgrade 40 | rev: v3.17.0 41 | hooks: 42 | - id: pyupgrade 43 | args: [--py3-plus, --py38-plus, --keep-runtime-typing] 44 | - repo: https://github.com/asottile/blacken-docs 45 | rev: 1.18.0 46 | hooks: 47 | - id: blacken-docs 48 | additional_dependencies: [black==24.8.0] 49 | - repo: https://github.com/rstcheck/rstcheck 50 | rev: v6.2.4 51 | hooks: 52 | - id: rstcheck 53 | additional_dependencies: [tomli] 54 | args: [--config=pyproject.toml] 55 | - repo: https://github.com/PyCQA/doc8 56 | rev: v1.1.2 57 | hooks: 58 | - id: doc8 59 | - repo: https://github.com/astral-sh/ruff-pre-commit 60 | rev: v0.6.5 61 | hooks: 62 | - id: ruff 63 | args: [--fix, --exit-non-zero-on-fix] 64 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: ubuntu-22.04 5 | tools: 6 | python: '3.10' 7 | 8 | sphinx: 9 | builder: html 10 | configuration: docs/conf.py 11 | fail_on_warning: false 12 | 13 | python: 14 | install: 15 | - method: pip 16 | path: . 17 | extra_requirements: [docs] 18 | 19 | submodules: 20 | include: [docs/notebooks] 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | Contributing guide 2 | ================== 3 | Under construction. 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2019, Theis Lab 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | prune tests 2 | prune docs 3 | prune .github 4 | include LICENSE 5 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | |PyPI| |Downloads| |CI| |Docs| |Codecov| |Discourse| 2 | 3 | CellRank 2: Unified fate mapping in multiview single-cell data 4 | ============================================================== 5 | .. image:: docs/_static/img/light_mode_overview.png#gh-light-mode-only 6 | :width: 600px 7 | :align: center 8 | :class: only-light 9 | 10 | .. image:: docs/_static/img/dark_mode_overview.png#gh-dark-mode-only 11 | :width: 600px 12 | :align: center 13 | 14 | **CellRank** is a modular framework to study cellular dynamics based on Markov state modeling of 15 | multi-view single-cell data. See our `documentation`_, and the `CellRank 1`_ and `CellRank 2 manuscript`_ to learn more. 16 | 17 | .. important:: 18 | Please refer to `our citation guide `_ to cite our software correctly. 19 | 20 | CellRank scales to large cell numbers, is fully compatible with the `scverse`_ ecosystem, and easy to use. 21 | In the backend, it is powered by `pyGPCCA`_ (`Reuter et al. (2018)`_). Feel 22 | free to open an `issue`_ if you encounter a bug, need our help or just want to make a comment/suggestion. 23 | 24 | CellRank's key applications 25 | --------------------------- 26 | - Estimate differentiation direction based on a varied number of biological priors, including RNA velocity 27 | (`La Manno et al. (2018)`_, `Bergen et al. (2020)`_), any pseudotime or developmental potential, 28 | experimental time points, metabolic labels, and more. 29 | - Compute initial, terminal and intermediate macrostates. 30 | - Infer fate probabilities and driver genes. 31 | - Visualize and cluster gene expression trends. 32 | - ... and much more, check out our `documentation`_. 33 | 34 | .. |PyPI| image:: https://img.shields.io/pypi/v/cellrank.svg 35 | :target: https://pypi.org/project/cellrank 36 | :alt: PyPI 37 | 38 | .. |Downloads| image:: https://static.pepy.tech/badge/cellrank 39 | :target: https://pepy.tech/project/cellrank 40 | :alt: Downloads 41 | 42 | .. |Discourse| image:: https://img.shields.io/discourse/posts?color=yellow&logo=discourse&server=https%3A%2F%2Fdiscourse.scverse.org 43 | :target: https://discourse.scverse.org/c/ecosystem/cellrank/ 44 | :alt: Discourse 45 | 46 | .. |CI| image:: https://img.shields.io/github/actions/workflow/status/theislab/cellrank/test.yml?branch=main 47 | :target: https://github.com/theislab/cellrank/actions 48 | :alt: CI 49 | 50 | .. |Docs| image:: https://img.shields.io/readthedocs/cellrank 51 | :target: https://cellrank.readthedocs.io/ 52 | :alt: Documentation 53 | 54 | .. |Codecov| image:: https://codecov.io/gh/theislab/cellrank/branch/main/graph/badge.svg 55 | :target: https://codecov.io/gh/theislab/cellrank 56 | :alt: Coverage 57 | 58 | 59 | .. _La Manno et al. (2018): https://doi.org/10.1038/s41586-018-0414-6 60 | .. _Bergen et al. (2020): https://doi.org/10.1038/s41587-020-0591-3 61 | .. _Reuter et al. (2018): https://doi.org/10.1021/acs.jctc.8b00079 62 | 63 | .. _scverse: https://scverse.org/ 64 | .. _pyGPCCA: https://github.com/msmdev/pyGPCCA 65 | 66 | .. _CellRank 1: https://www.nature.com/articles/s41592-021-01346-6 67 | .. _CellRank 2 manuscript: https://doi.org/10.1038/s41592-024-02303-9 68 | .. _documentation: https://cellrank.org 69 | 70 | .. _issue: https://github.com/theislab/cellrank/issues/new/choose 71 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile clean 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | 22 | clean: 23 | @rm -rf $(BUILDDIR)/* 24 | @rm -rf $(SOURCEDIR)/api/_autosummary 25 | -------------------------------------------------------------------------------- /docs/_ext/typed_returns.py: -------------------------------------------------------------------------------- 1 | import re 2 | from collections.abc import Iterable, Iterator 3 | 4 | from sphinx.application import Sphinx 5 | from sphinx.ext.napoleon import NumpyDocstring 6 | 7 | 8 | def process_return(lines: Iterable[str]) -> Iterator[str]: 9 | for line in lines: 10 | m = re.fullmatch(r"(?P\w+)\s+:\s+(?P[\w.]+)", line) 11 | if m: 12 | # Once this is in scanpydoc, we can use the fancy hover stuff 13 | if m["param"]: 14 | yield f'**{m["param"]}** : :class:`~{m["type"]}`' 15 | else: 16 | yield f':class:`~{m["type"]}`' 17 | else: 18 | yield line 19 | 20 | 21 | def _parse_returns_section(self: NumpyDocstring, section: str) -> list[str]: 22 | lines_raw = list(process_return(self._dedent(self._consume_to_next_section()))) 23 | lines: list[str] = self._format_block(":returns: ", lines_raw) 24 | if lines and lines[-1]: 25 | lines.append("") 26 | return lines 27 | 28 | 29 | def setup(app: Sphinx) -> None: 30 | NumpyDocstring._parse_returns_section = _parse_returns_section 31 | -------------------------------------------------------------------------------- /docs/_static/css/override.css: -------------------------------------------------------------------------------- 1 | .sd-card-img-top { 2 | width: 128px; 3 | height: 128px; 4 | object-fit: cover; 5 | margin: 1em auto 0em auto; 6 | border-radius: 50%; 7 | } 8 | -------------------------------------------------------------------------------- /docs/_static/img/dark_mode_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/docs/_static/img/dark_mode_logo.png -------------------------------------------------------------------------------- /docs/_static/img/dark_mode_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/docs/_static/img/dark_mode_overview.png -------------------------------------------------------------------------------- /docs/_static/img/light_mode_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/docs/_static/img/light_mode_logo.png -------------------------------------------------------------------------------- /docs/_static/img/light_mode_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/docs/_static/img/light_mode_overview.png -------------------------------------------------------------------------------- /docs/_templates/autosummary/class.rst: -------------------------------------------------------------------------------- 1 | .. taken from https://github.com/scverse/scvi-tools/blob/master/docs/_templates/autosummary/class.rst 2 | 3 | {{ fullname | escape | underline }} 4 | 5 | .. currentmodule:: {{ module }} 6 | .. autoclass:: {{ objname }} 7 | 8 | {% block attributes %} 9 | {% if attributes %} 10 | 11 | Attributes table 12 | ~~~~~~~~~~~~~~~~ 13 | .. autosummary:: 14 | 15 | {% for item in attributes %} 16 | ~{{ fullname }}.{{ item }} 17 | 18 | {% endfor %} 19 | {% endif %} 20 | {% endblock %} 21 | 22 | {% block methods %} 23 | {% if methods %} 24 | 25 | Methods table 26 | ~~~~~~~~~~~~~ 27 | .. autosummary:: 28 | 29 | {% for item in methods %} 30 | {% if item != '__init__' %} 31 | ~{{ fullname }}.{{ item }} 32 | {% endif %} 33 | 34 | {% endfor %} 35 | {% endif %} 36 | {% endblock %} 37 | 38 | {% block attributes_documentation %} 39 | {% if attributes %} 40 | 41 | Attributes 42 | ~~~~~~~~~~ 43 | {% for item in attributes %} 44 | {{ item | escape | underline(line='^') }} 45 | .. autoattribute:: {{ [objname, item] | join(".") }} 46 | {% endfor %} 47 | {% endif %} 48 | {% endblock %} 49 | 50 | {% block methods_documentation %} 51 | {% if methods %} 52 | 53 | Methods 54 | ~~~~~~~ 55 | {% for item in methods %} 56 | {% if item != '__init__' %} 57 | {{ item | escape | underline(line='^') }} 58 | .. automethod:: {{ [objname, item] | join(".") }} 59 | {% endif %} 60 | {% endfor %} 61 | 62 | {% endif %} 63 | {% endblock %} 64 | -------------------------------------------------------------------------------- /docs/about/cite.rst: -------------------------------------------------------------------------------- 1 | Citing CellRank 2 | =============== 3 | If you find CellRank useful for your research, please consider citing our work as follows: If you are using 4 | CellRank's :class:`~cellrank.kernels.VelocityKernel` with classical RNA velocity, cite :cite:`lange:22` as: 5 | 6 | .. code-block:: bibtex 7 | 8 | @article{lange:22, 9 | author = {Lange, Marius and Bergen, Volker and Klein, Michal and Setty, Manu and Reuter, Bernhard and Bakhti, Mostafa and Lickert, Heiko and Ansari, Meshal and Schniering, Janine and Schiller, Herbert B. and Pe'er, Dana and Theis, Fabian J.}, 10 | publisher = {Nature Publishing Group}, 11 | doi = {10.1038/s41592-021-01346-6}, 12 | journal = {Nat. Methods}, 13 | title = {CellRank for directed single-cell fate mapping}, 14 | year = {2022}, 15 | } 16 | 17 | If you are using the :class:`~cellrank.kernels.PseudotimeKernel`, :class:`~cellrank.kernels.CytoTRACEKernel`, :class:`~cellrank.kernels.RealTimeKernel`, or the :class:`~cellrank.kernels.VelocityKernel` with velocities inferred 18 | from metabolic labeling data using the CellRank 2 approach, cite :cite:`weiler:24` as: 19 | 20 | .. code-block:: bibtex 21 | 22 | @article{weiler:24, 23 | author = {Weiler, Philipp and Lange, Marius and Klein, Michal and Pe'er, Dana and Theis, Fabian}, 24 | publisher = {Springer Science and Business Media LLC}, 25 | url = {https://doi.org/10.1038/s41592-024-02303-9}, 26 | doi = {10.1038/s41592-024-02303-9}, 27 | issn = {1548-7105}, 28 | journal = {Nature Methods}, 29 | month = jun, 30 | number = {7}, 31 | pages = {1196--1205}, 32 | title = {CellRank 2: unified fate mapping in multiview single-cell data}, 33 | volume = {21}, 34 | year = {2024}, 35 | } 36 | 37 | In addition, if you use the :class:`~cellrank.estimators.GPCCA` estimator to compute initial, terminal or intermediate 38 | states, you are using the `pyGPCCA package `_ :cite:`reuter:22` under the hood, 39 | which implements the Generalized Perron Cluster Cluster Analysis (GPCCA) algorithm. Thus, additionally to CellRank, 40 | please cite GPCCA :cite:`reuter:19` as: 41 | 42 | .. code-block:: bibtex 43 | 44 | @article{reuter:19, 45 | author = {Reuter, Bernhard and Fackeldey, Konstantin and Weber, Marcus}, 46 | doi = {10.1063/1.5064530}, 47 | journal = {The Journal of Chemical Physics}, 48 | number = {17}, 49 | pages = {174103}, 50 | title = {Generalized Markov modeling of nonreversible molecular kinetics}, 51 | volume = {150}, 52 | year = {2019}, 53 | } 54 | -------------------------------------------------------------------------------- /docs/about/team.rst: -------------------------------------------------------------------------------- 1 | Team 2 | ==== 3 | .. 4 | TODO(michalk8): Could you format this so it looks like the scVI tools page? See https://scvi-tools.org/team#former-development-team-members 5 | 6 | CellRank was started as a collaboration between the Theislab at Helmholtz Munich and the Pe'er lab at Memorial Sloan 7 | Kettering Cancer Center (MSKCC). We are happy about every code contribution we received so far, check out the 8 | `contributions `_ section on GitHub for an overview. 9 | 10 | Principal Investigators 11 | ----------------------- 12 | .. grid:: auto 13 | 14 | .. grid-item-card:: :fab:`twitter` `Fabian Theis `_ 15 | :img-top: https://scholar.googleusercontent.com/citations?view_op=medium_photo&user=sqWpn2AAAAAJ 16 | 17 | - :fas:`building-columns` `Helmholtz Munich `_ 18 | - :fas:`graduation-cap` `Google Scholar `__ 19 | - :fab:`github` `theislab `_ 20 | 21 | .. grid-item-card:: :fab:`twitter` `Dana Pe'er `_ 22 | :img-top: https://scholar.googleusercontent.com/citations?view_op=medium_photo&user=aJOeGRoAAAAJ 23 | 24 | - :fas:`building-columns` `MSKCC `_ 25 | - :fas:`graduation-cap` `Google Scholar `_ 26 | - :fab:`github` `dpeerlab `_ 27 | 28 | Core Development Team 29 | --------------------- 30 | .. grid:: auto 31 | 32 | .. grid-item-card:: :fab:`twitter` `Philipp Weiler `_ 33 | :img-top: https://avatars.githubusercontent.com/u/28675704 34 | 35 | - :fas:`graduation-cap` `Google Scholar `__ 36 | - :fab:`github` `WeilerP `_ 37 | 38 | .. grid-item-card:: Michal Klein 39 | :img-top: https://avatars.githubusercontent.com/u/46717574 40 | 41 | - :fas:`graduation-cap` `Google Scholar `__ 42 | - :fab:`github` `michalk8 `_ 43 | 44 | .. grid-item-card:: :fab:`twitter` `Marius Lange `_ 45 | :img-top: https://mariuslange.com/author/marius-lange/avatar_huc2ea0f123de6d091882f094508aad23f_1614639_270x270_fill_q75_lanczos_center.jpg 46 | 47 | - :fas:`house` `mariuslange.com `_ 48 | - :fas:`graduation-cap` `Google Scholar `__ 49 | - :fab:`github` `Marius1311 `_ 50 | 51 | ``pyGPCCA`` Development 52 | ----------------------- 53 | CellRank's GPCCA estimator is based on `pyGPCCA `_ for coarse-graining of 54 | non-reversible Markov chains :cite:`reuter:19`; check out `their documentation `_ 55 | to learn about contributions. 56 | -------------------------------------------------------------------------------- /docs/about/version2.rst: -------------------------------------------------------------------------------- 1 | Moving to CellRank 2 2 | ==================== 3 | The original CellRank version (v1) :cite:`lange:22` was a framework to analyze cellular dynamics based on RNA velocity 4 | :cite:`manno:18,bergen:20` and gene expression similarity. Based on a 5 | `Markov chain `_ formulation, it combined these two data modalities 6 | in a high-dimensional space and used the :class:`GPCCA algorithm ` :cite:`reuter:18,reuter:22` 7 | to compute initial and terminal states, fate probabilities, and driver genes. 8 | 9 | With version 2, we are generalizing CellRank beyond RNA velocity data and turn it into a general framework for 10 | single-cell fate mapping based on various data modalities (see :doc:`index`). This required us to make substantial 11 | changes to CellRank's API, many of which are **backward-compatibility breaking**. CellRank 2 can do everything that 12 | version 1 could do (and much more); however, it does it differently. 13 | 14 | .. important:: 15 | We outline the most important changes here. For a more detailed account, please refer to the 16 | :doc:`../release_notes`. 17 | 18 | Important changes in version 2 19 | ------------------------------ 20 | * Deprecation of high level ``cellrank.tl`` functions, including ``cellrank.tl.terminal_states`` and 21 | ``cellrank.tl.lineages``: we realized that this mode of interacting with CellRank is not flexible enough to 22 | accommodate various data modalities and analysis paradigms. Thus, we switched to a more modular structure: 23 | :mod:`cellrank.kernels` to compute cell-cell transition matrices, and :mod:`cellrank.estimators` to compute initial 24 | and terminal states, fate probabilities, and more. See :doc:`../notebooks/tutorials/general/100_getting_started`. 25 | * Introduction of a :meth:`~cellrank.estimators.GPCCA.fit`/:meth:`~cellrank.estimators.GPCCA.predict` workflow for 26 | estimators: given that we removed the old ``cellrank.tl`` high-level functions, we wanted to make it easier to 27 | interact with estimators. Thus, every :mod:`estimator ` now has a ``.fit`` method, which computes 28 | macrostates, and a ``.predict`` method, which classifies some of these as terminal states. 29 | The new :meth:`~cellrank.estimators.GPCCA.fit`/:meth:`~cellrank.estimators.GPCCA.predict` workflow complements our 30 | fully-flexible low-level mode of interacting with estimators. 31 | See :doc:`../notebooks/tutorials/estimators/600_initial_terminal`. 32 | * Renaming of ``absorption_probabilities`` to :attr:`~cellrank.estimators.GPCCA.fate_probabilities` everywhere, 33 | for example in :meth:`~cellrank.estimators.GPCCA.compute_fate_probabilities`: while we still compute 34 | `absorption probabilities `_ on the Markov chain under the hood, 35 | we realized that the term is somewhat technical and decided to replace it with the more intuitive 36 | "fate probabilities". See :doc:`../notebooks/tutorials/estimators/700_fate_probabilities`. 37 | * Removal of the ``cellrank.external``: anyone wishing to contribute to CellRank can do this now directly via 38 | :mod:`cellrank.kernels` and :mod:`cellrank.estimators`. We welcome any contribution to CellRank, 39 | see our :doc:`contribution guide <../contributing>`, and feel free to get in touch via an 40 | `issue `_ or `email `_. 41 | * Replacement of the old ``cellrank.external.WOTKernel`` with a new :class:`cellrank.kernels.RealTimeKernel`: this is 42 | CellRank's interface with :mod:`moscot`, enabling us to analyze large-scale time-course studies with additional 43 | spatial or lineage readout :cite:`klein:23,lange:23`. In addition, the :class:`~cellrank.kernels.RealTimeKernel` 44 | interfaces with `Waddington-OT `_ :cite:`schiebinger:19`. 45 | 46 | There are many more changes and improvements in CellRank 2. For example, the computation of fate probabilities is 47 | **30x** faster compared to version 1, we fixed many bugs, and improved and extended our documentation and 48 | :doc:`tutorials <../notebooks/tutorials/index>`. 49 | -------------------------------------------------------------------------------- /docs/api/datasets.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank.datasets 2 | 3 | Datasets 4 | ======== 5 | CellRank comes with a number of datasets that make it easy for you to get started. Our dataset API enables you to 6 | automatically download these datasets; see our :doc:`tutorials <../notebooks/tutorials/index>`. 7 | 8 | .. currentmodule:: cellrank 9 | 10 | .. autosummary:: 11 | :toctree: _autosummary/datasets 12 | 13 | datasets.pancreas 14 | datasets.lung 15 | datasets.reprogramming_morris 16 | datasets.reprogramming_schiebinger 17 | datasets.zebrafish 18 | datasets.bone_marrow 19 | -------------------------------------------------------------------------------- /docs/api/developer.rst: -------------------------------------------------------------------------------- 1 | Developer API 2 | ============= 3 | 4 | Kernels 5 | ------- 6 | .. autoclass:: cellrank.kernels.Kernel 7 | :members: 8 | :inherited-members: 9 | 10 | .. autoclass:: cellrank.kernels.UnidirectionalKernel 11 | :members: 12 | :inherited-members: 13 | 14 | .. autoclass:: cellrank.kernels.BidirectionalKernel 15 | :members: 16 | :inherited-members: 17 | 18 | Similarity 19 | ~~~~~~~~~~ 20 | .. autoclass:: cellrank.kernels.utils.SimilarityABC 21 | :members: 22 | :special-members: __call__ 23 | :inherited-members: 24 | 25 | .. autoclass:: cellrank.kernels.utils.Cosine 26 | :members: __call__, hessian 27 | 28 | .. autoclass:: cellrank.kernels.utils.Correlation 29 | :members: __call__, hessian 30 | 31 | .. autoclass:: cellrank.kernels.utils.DotProduct 32 | :members: __call__, hessian 33 | 34 | Threshold Scheme 35 | ~~~~~~~~~~~~~~~~ 36 | .. autoclass:: cellrank.kernels.utils.ThresholdSchemeABC 37 | :members: 38 | :special-members: __call__ 39 | :inherited-members: 40 | 41 | .. autoclass:: cellrank.kernels.utils.HardThresholdScheme 42 | :members: 43 | :special-members: __call__ 44 | 45 | .. autoclass:: cellrank.kernels.utils.SoftThresholdScheme 46 | :members: 47 | :special-members: __call__ 48 | 49 | .. autoclass:: cellrank.kernels.utils.CustomThresholdScheme 50 | :members: 51 | :special-members: __call__ 52 | 53 | Estimators 54 | ---------- 55 | .. autoclass:: cellrank.estimators.BaseEstimator 56 | :members: 57 | 58 | .. autoclass:: cellrank.estimators.TermStatesEstimator 59 | :members: 60 | 61 | Models 62 | ------ 63 | .. autoclass:: cellrank.models.BaseModel 64 | :members: 65 | 66 | Lineage 67 | ------- 68 | .. autoclass:: cellrank.Lineage 69 | :members: priming_degree, reduce, plot_pie, from_adata, X, T, view, names, colors 70 | -------------------------------------------------------------------------------- /docs/api/estimators.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank.estimators 2 | 3 | Estimators 4 | ========== 5 | Estimators enable quantitative analysis of Markov transition matrices computed using CellRank 6 | :doc:`kernels `, including automatic detection of initial and terminal states, and computation 7 | of fate probabilities. Our recommended estimator is the :class:`~cellrank.estimators.GPCCA` estimator. 8 | 9 | .. currentmodule:: cellrank 10 | 11 | .. autosummary:: 12 | :toctree: _autosummary/estimators 13 | 14 | estimators.GPCCA 15 | estimators.CFLARE 16 | -------------------------------------------------------------------------------- /docs/api/index.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank 2 | 3 | API 4 | === 5 | Import CellRank as:: 6 | 7 | import cellrank as cr 8 | 9 | CellRank has a modular API, organized around kernels and estimators: 10 | 11 | - :mod:`cellrank.kernels` compute cell-cell transition matrices using various input data modalities, 12 | including RNA velocity, any pseudotime, a developmental potential, experimental time points, and more. 13 | - :mod:`cellrank.estimators` use the cell-cell transition matrix to derive insights about cellular dynamics, 14 | for example, they compute initial and terminal states, fate probabilities, and driver genes. Our recommended 15 | estimator is the :class:`~cellrank.estimators.GPCCA` estimator. 16 | - In addition, there are :mod:`cellrank.models` for gene trend fitting, :mod:`cellrank.pl` 17 | for visualization, and :mod:`cellrank.datasets` that help you getting started with CellRank. 18 | 19 | .. toctree:: 20 | :caption: API 21 | :maxdepth: 1 22 | 23 | kernels 24 | estimators 25 | models 26 | plotting 27 | datasets 28 | developer 29 | -------------------------------------------------------------------------------- /docs/api/kernels.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank.kernels 2 | 3 | Kernels 4 | ======= 5 | Kernels compute cell-cell transition probabilities based on various input data modalities, including molecular 6 | similarity, RNA velocity :cite:`manno:18`, experimental time points, and many more. They come with methods 7 | for high-level, qualitative visualization, including vector field or random walk plots. For quantitative analysis of 8 | kernel-computed transition matrices, we recommend taking look at the :doc:`estimators `. 9 | 10 | We don't use the term "kernel" in the way it is used in 11 | `mathematics `_, but rather colloquially, to refer to a class that 12 | takes in multi-view single-cell data and outputs a cell-cell transition matrix. 13 | 14 | .. currentmodule:: cellrank 15 | 16 | .. autosummary:: 17 | :toctree: _autosummary/kernels 18 | 19 | kernels.VelocityKernel 20 | kernels.ConnectivityKernel 21 | kernels.PseudotimeKernel 22 | kernels.CytoTRACEKernel 23 | kernels.RealTimeKernel 24 | kernels.PrecomputedKernel 25 | -------------------------------------------------------------------------------- /docs/api/models.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank.models 2 | 3 | Models 4 | ====== 5 | Models fit gene expression trends in pseudotime; they assume some parametric form for the gene trend and estimate 6 | parameters using an objective function. Note that some models require you to have `R `_ 7 | and `rpy2 `_ installed. 8 | 9 | .. currentmodule:: cellrank 10 | 11 | .. autosummary:: 12 | :toctree: _autosummary/models 13 | 14 | models.GAM 15 | models.GAMR 16 | models.SKLearnModel 17 | -------------------------------------------------------------------------------- /docs/api/plotting.rst: -------------------------------------------------------------------------------- 1 | .. module:: cellrank.pl 2 | 3 | Plotting 4 | ======== 5 | Plotting functions visualize CellRank outputs computed using :doc:`kernels `, :doc:`estimators ` 6 | or :doc:`models `. 7 | 8 | .. currentmodule:: cellrank 9 | 10 | .. autosummary:: 11 | :toctree: _autosummary/plotting 12 | 13 | pl.circular_projection 14 | pl.gene_trends 15 | pl.log_odds 16 | pl.heatmap 17 | pl.cluster_trends 18 | pl.aggregate_fate_probabilities 19 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | Contributing Guide 2 | ================== 3 | Under reconstruction, please feel to reach out via opening a new issue_. 4 | 5 | .. _issue: https://github.com/theislab/cellrank/issues/new/choose 6 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | Installation 2 | ============ 3 | :mod:`cellrank` requires Python version >= 3.8 to run. We recommend using Mamba_ to manage Python environments. 4 | If you encounter any problems, feel free to open an issue_. 5 | 6 | Conda 7 | ----- 8 | CellRank can also be installed via `conda-forge `_ as:: 9 | 10 | conda install -c conda-forge cellrank 11 | 12 | This installation method is preferred because it also contains PETSc_ and SLEPc_, 13 | libraries for large-scale linear algebra problems CellRank relies on (e.g., when computing macrostates or 14 | fate probabilities). 15 | 16 | PyPI 17 | ---- 18 | CellRank is also available on PyPI:: 19 | 20 | pip install cellrank 21 | 22 | Development Version 23 | ------------------- 24 | To stay up-to-date with the newest version, run:: 25 | 26 | pip install git+https://github.com/theislab/cellrank.git@main 27 | 28 | .. _`Mamba`: https://mamba.readthedocs.io/en/latest/installation.html 29 | .. _`issue`: https://github.com/theislab/cellrank/issues/new 30 | .. _`SLEPc`: https://slepc.upv.es/ 31 | .. _`PETSc`: https://petsc.org/ 32 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/references.rst: -------------------------------------------------------------------------------- 1 | References 2 | ========== 3 | 4 | .. bibliography:: 5 | :cited: 6 | -------------------------------------------------------------------------------- /docs/release/changelog/1007.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix cluster subsetting in :func:`cellrank.pl.aggregate_absorption_probabilities` and ``mode = 'violin'``. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1008.misc.rst: -------------------------------------------------------------------------------- 1 | Use :mod:`rpy2`'s local converter. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1019.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix not being able to save :class:`~anndata.AnnData` after :class:`~cellrank.kernels.CytoTRACEKernel` was run. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1020.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix not passing ``allow_overlap`` in some places. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1029.bugfix.rst: -------------------------------------------------------------------------------- 1 | Very minor fix to adapt the allowed options in macrostate plotting. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1034.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix ``adjustText`` modifying data in-place. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1035.bugfix.rst: -------------------------------------------------------------------------------- 1 | Adds a reference for Hhex 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1040.misc.rst: -------------------------------------------------------------------------------- 1 | TODO. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/1043.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix lineage color map in :func:`cellrank.pl.gene_trends`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/748.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix :class:`cellrank.external.kernels.WOTKernel` saving OTModel and being unable to pickle itself. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/750.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix when associating term/macro states assignment when reference is not categorical string. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/761.feature.rst: -------------------------------------------------------------------------------- 1 | Update CytoTRACE calculation to check infinite values. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/764.feature.rst: -------------------------------------------------------------------------------- 1 | Refactor :class:`cellrank.tl.kernels.TransportMapKernel` for easier definition of extensions. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/779.feature.rst: -------------------------------------------------------------------------------- 1 | Allow plotting negatively correlated genes in :func:`cellrank.pl.lineage_drivers`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/784.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix color creating in :class:`cellrank.tl.kernels.ExperimentalTimeKernel`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/791.feature.rst: -------------------------------------------------------------------------------- 1 | Refactor kernel module. These changes include: 2 | - allow kernel element-wise multiplication 3 | - decouple CytoTRACE computation from kernel initialization, see :meth:`cellrank.tl.kernels.CytoTRACEKernel.compute_cytottrace` 4 | - change argument ``mode`` to ``model`` in :class:`cellrank.tl.kernels.VelocityKernel` 5 | - change argument ``scheme`` to ``similarity`` in :class:`cellrank.tl.kernels.VelocityKernel` 6 | - remove ``'sampling'`` option in :class:`cellrank.tl.kernels.VelocityKernel` 7 | - distinguish between unidirectional and bidirectional kernels 8 | - bidirectional kernel inversion is no longer in-place, returns a new object 9 | - add more memory efficient way of copying kernels 10 | - improve :class:`cellrank.kernels.PrecomputedKernel` 11 | - abstract kernel-related plotting functions (projection and random walks) 12 | - temporarily remove kernel tricks examples 13 | - fix various typos in docstrings 14 | - fix corner-case bug when computing absorption probabilities 15 | - fix not setting transport maps in :class:`cellrank.tl.kernels.TransportMapKernel` 16 | - fix automatic threshold removing 1 row in :class:`cellrank.tl.kernels.TransportMapKernel` 17 | -------------------------------------------------------------------------------- /docs/release/changelog/798.misc.rst: -------------------------------------------------------------------------------- 1 | Ignore :mod:`pygam` deprecation warnings. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/828.feature.rst: -------------------------------------------------------------------------------- 1 | Allow local block-diagonal connectivities in :class:`cellrank.tl.kernels.TransportMapKernel`. Rename ``last_time_point`` argument to ``self_transitions`` and add ``conn_weight``. ``self_transitions`` can also be applied to specific diagonal blocks only. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/835.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix all q-values being NaN if 1 p-value was NaN. Also warn and set to NaN instead of raise when correlations are not in ``[0, 1]]`` interval. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/842.bugfix.rst: -------------------------------------------------------------------------------- 1 | Do not save enums in :class:`anndata.AnnData`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/850.misc.rst: -------------------------------------------------------------------------------- 1 | Fix PETSc/SLEPc in CI for Linux. For now, macOS PETSc/SLEPc remains disabled. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/861.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix :class:`cellrank.tl.Lineage` subsetting (non-existent overlapping keys) and refactor the implementation. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/880.doc.rst: -------------------------------------------------------------------------------- 1 | Add *Discourse* badge for questions and discussions. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/883.doc.rst: -------------------------------------------------------------------------------- 1 | Adds references to the ``bibtex`` file. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/885.doc.rst: -------------------------------------------------------------------------------- 1 | Add ``furo`` theme based on ``scvi-tools``. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/886.feature.rst: -------------------------------------------------------------------------------- 1 | Add :func:`cellrank.datasets.bone_marrow`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/887.bugfix.rst: -------------------------------------------------------------------------------- 1 | Adds references to the docs 2 | -------------------------------------------------------------------------------- /docs/release/changelog/890.feature.rst: -------------------------------------------------------------------------------- 1 | Add argument ``subset_to_serum`` to :func:`cellrank.datasets.reprogramming_schiebinger` to allow downloading the subsetted data. This includes the transition matrix computed with the :class:`cellrank.external.WOTKernel`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/894.misc.rst: -------------------------------------------------------------------------------- 1 | Remove default real-time and pseudotime arguments from :class:`cellrank.kernels.ExperimentalTimeKernel` and :class:`cellrank.kernels.PseudotimeKernel`. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/896.feature.rst: -------------------------------------------------------------------------------- 1 | Updates kernels/estimators ``__str__/__repr__`` and allows for better method chaining. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/901.doc.rst: -------------------------------------------------------------------------------- 1 | Fix ``RTD`` build - submodules. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/913.misc.rst: -------------------------------------------------------------------------------- 1 | Fix not being able to use ``minChi`` in :meth:`cellrank.estimators.GPCCA.fit`. Also compute 20 Schur vectors by default. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/914.misc.rst: -------------------------------------------------------------------------------- 1 | Prefer plotting macrostates/terminal in a discrete way. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/923.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix computing time to absorption to aggregated terminal states. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/929.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix initial/terminal points size in random walk. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/930.feature.rst: -------------------------------------------------------------------------------- 1 | Allow passing connectivities for transition matrix projection. Useful when the kernel is not kNN-based. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/936.bugfix.rst: -------------------------------------------------------------------------------- 1 | This adapts some of our docs for the 2.0 release; it clears up the landing page and introduces some new pages, including the "teams", "how to cite us", and "about cellrank" pages. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/937.bugfix.rst: -------------------------------------------------------------------------------- 1 | This just adds a new concept figure to be used in the updated docs. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/938.bugfix.rst: -------------------------------------------------------------------------------- 1 | Update to the overview figure 2 | -------------------------------------------------------------------------------- /docs/release/changelog/943.bugfix.rst: -------------------------------------------------------------------------------- 1 | Import ``Iterable`` from ``collections.abc`` and not ``collections``. ``Iterable`` was removed from ``collections`` in 2 | Python 3.10 3 | -------------------------------------------------------------------------------- /docs/release/changelog/949.bugfix.rst: -------------------------------------------------------------------------------- 1 | Require ``Python >= 3.8`` and fix :func:`cellrank.pl.log_odds` colormap type. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/951.bugfix.rst: -------------------------------------------------------------------------------- 1 | Allow NaN values when determining foreground/background color. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/954.misc.rst: -------------------------------------------------------------------------------- 1 | Use ``", "`` instead of ``" or "`` when joining states. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/975.doc.rst: -------------------------------------------------------------------------------- 1 | Fix CI badges and tox. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/976.doc.rst: -------------------------------------------------------------------------------- 1 | Polish team page. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/978.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix sparse array conversion in ``networkx>=3.0``. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/989.bugfix.rst: -------------------------------------------------------------------------------- 1 | Removes default value for ``time_key``. 2 | -------------------------------------------------------------------------------- /docs/release/changelog/template.rst: -------------------------------------------------------------------------------- 1 | {% set title = "CellRank {} ({})".format(versiondata.version, versiondata.date) %} 2 | {{ title }} 3 | {{ "=" * title|length }} 4 | {% for section, _ in sections.items() %} 5 | {% set underline = underlines[0] %}{% if section %}{{ section }} 6 | {{ underline * section|length }}{% set underline = underlines[1] %} 7 | 8 | {% endif %} 9 | {% if sections[section] %} 10 | {% for category, val in definitions.items() if category in sections[section] %} 11 | 12 | {{ definitions[category]['name'] }} 13 | {{ underline * definitions[category]['name']|length }} 14 | 15 | {% if definitions[category]['showcontent'] %} 16 | {% for text, values in sections[section][category].items() %} 17 | - {{ text }} 18 | {{ get_indent(text) }}{{values|join(', ') }} 19 | 20 | {% endfor %} 21 | {% else %} 22 | - {{ sections[section][category]['']|join(', ') }} 23 | 24 | {% endif %} 25 | {% if sections[section][category]|length == 0 %} 26 | No significant changes. 27 | 28 | {% else %} 29 | {% endif %} 30 | {% endfor %} 31 | {% else %} 32 | No significant changes. 33 | 34 | {% endif %} 35 | {% endfor %} 36 | -------------------------------------------------------------------------------- /docs/release/notes-1.0.0.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.0.0 (2020-10-17) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix a bug when subsetting :class:`cellrank.tl.Lineage` 8 | - Remove previously deprecated functions 9 | 10 | Features 11 | -------- 12 | 13 | - Add renaming terminal states :meth:`cellrank.tl.estimators.BaseEstimator.rename_terminal_states` 14 | - Enable negative binomial distribution for :class:`cellrank.ul.models.GAMR` 15 | - Add :class:`cellrank.ul.models.FailedModel` inspired by the maybe monad 16 | - Allow returning models when doing bulk fitting 17 | - Add ``transpose`` parameter for :func:`cellrank.pl.gene_trends` 18 | -------------------------------------------------------------------------------- /docs/release/notes-1.1.0.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.1.0 (2020-11-17) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix not vendorizing correct :mod:`msmtools` which sometimes densified sparse matrix. 8 | - Bump scanpy version requirement to 1.6 to fix plotting `PR 444 `_. 9 | 10 | Features 11 | -------- 12 | 13 | - :func:`cellrank.tl.lineage_drivers` computes p-values for the identified driver genes now, using either 14 | a Fisher-transformation to approximate the distribution of the test statistic under the null hypothesis 15 | or an exact, permutation based test. Corrects for multiple-testing. 16 | - :meth:`cellrank.tl.kernels.VelocityKernel.compute_transition_matrix` now allows different metrics to be used to 17 | compare velocity vectors with expression-differences across neighboring cells. We add cosine-correlation and 18 | dot-product schemes and we allow the user to input their own scheme. It has been shown recently by :cite:`li:20` 19 | that the choice of metric can lead to slightly different results. Users can now also supply their own scheme as long 20 | as it follows the signature of :class:`cellrank.tl.kernels.SimilaritySchemeABC`. 21 | - :func:`cellrank.datasets.reprogramming` has been added to allow for easy reproducibility of the time & memory 22 | benchmarking results in our manuscript :cite:`lange:22`. This is a reprogramming dataset from :cite:`morris:18`. 23 | -------------------------------------------------------------------------------- /docs/release/notes-1.2.0.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.2.0 (2021-02-02) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix a bug when computing the Schur decomposition for reducible Markov chains 8 | (*Schur vectors appear to not be D-orthogonal*). GPCCA requires the leading Schur vectors to be orthogonal w.r.t. a 9 | symmetric, positive definite matrix :math:`D` `PR 453 `_. 10 | - Fix not falling back to ``mode='monte_carlo'`` if no :mod:`jax` is found when using ``mode='stochastic'`` in 11 | :meth:`cellrank.tl.kernels.VelocityKernel.compute_transition_matrix` 12 | `PR 472 `__. 13 | - Fix :mod:`pandas` ``v1.0.1`` indexing error in :func:`cellrank.tl.lineage_drivers` 14 | `PR 475 `_. 15 | - Fix not correctly propagating colors during aggregation in :class:`cellrank.tl.Lineage` 16 | `PR 482 `_. 17 | 18 | Features 19 | -------- 20 | 21 | - Completely **refactored the underlying code base of GPCCA** and set it up as it's own package called 22 | `pyGPCCA `_ with documentation and an example. Going forwards, this will 23 | ensure that one of the "engines" of CellRank is also easy to maintain to extend. Further, this will make CellRank's 24 | installation more convenient by not needing to vendorize additional dependencies 25 | `PR 472 `__. 26 | - Add :func:`cellrank.pl.circular_projection` visualizing computed fate probabilities as done in :cite:`velten:17`. 27 | `PR 459 `_. 28 | - Allow legends not to be plotted by passing ``legend_loc="none"``, as done in `scVelo `_ 29 | `PR 470 `_. 30 | -------------------------------------------------------------------------------- /docs/release/notes-1.3.0.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.3.0 (2021-03-29) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix various bugs when plotting multiple gene trends `PR 487 `_. 8 | - Fix gene trend smoothing not working for 1 lineage `PR 512 `_. 9 | - Fix :mod:`pandas` error when computing macrostates `PR 513 `_. 10 | - Remove malfunctioning *Edit on GitHub* from the documentation 11 | `PR 538 `_. 12 | 13 | Features 14 | -------- 15 | 16 | - Add new kernel :class:`cellrank.tl.kernels.CytoTRACEKernel` which computes cell-cell transition probabilities based 17 | on the CytoTRACE score :cite:`gulati:20`, a measure of differentiation potential, 18 | `PR 527 `_. 19 | - Add external API :mod:`cellrank.external` with a stationary optimal transport kernel 20 | :class:`cellrank.external.kernels.OTKernel` contributed from :cite:`zhang:21`, as well as a 21 | `contributing guide `_, 22 | `PR 522 `_. 23 | - Rename ``cellrank.tl.kernels.PalantirKernel`` to :class:`cellrank.tl.kernels.PseudotimeKernel` and add 24 | hard threshold scheme inspired by :cite:`setty:19`, a soft threshold scheme inspired by :cite:`stassen:21` and 25 | a custom scheme when computing the transition matrix, see e.g. :class:`cellrank.tl.kernels.SoftThresholdScheme` 26 | `PR 514 `_. 27 | - Add more flexibility to :class:`cellrank.tl.kernels.ConnectivityKernel`, allowing it to use any cell-cell similarities 28 | from :attr:`anndata.AnnData.obsp`, such as spatial similarities from :mod:`squidpy` :cite:`palla:21` 29 | `PR 501 `_. 30 | - Add 2 new tutorials: 31 | 32 | - `Beyond RNA velocity `_: shows how to use 33 | CellRank when no RNA velocity information is available. 34 | `PR 32 `_ 35 | - `Creating a new kernel `_: explains how to 36 | create your own custom kernel class that estimates cell-cell transition probabilities 37 | `PR 31 `_. 38 | 39 | - Add projection of transition matrix onto an embedding :meth:`cellrank.tl.kernels.Kernel.compute_projection` 40 | - Add random walk simulation and visualization in an embedding :meth:`cellrank.tl.kernels.Kernel.plot_random_walks` 41 | `PR 537 `_. 42 | - Add :meth:`cellrank.tl.Lineage.priming_degree` `PR 502 `_ 43 | which estimates a cell's plasticity/differentiation potential based on ideas by :cite:`setty:19` 44 | and :cite:`velten:17`. 45 | - Add checks for transition matrix irreducibility `PR 516 `_. 46 | - Add Zebrafish development dataset from :cite:`farrell:18` `PR 539 `_. 47 | - Speed-up stationary distribution calculation in :mod:`pygpcca` `PR 22 `_. 48 | -------------------------------------------------------------------------------- /docs/release/notes-1.3.1.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.3.1 (2021-04-09) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix estimator's lineages color/names mismatch when reading from :class:`anndata.AnnData` 8 | `PR 556 `_. 9 | - Remove heuristics used to determine which solver to use `PR 558 `_. 10 | -------------------------------------------------------------------------------- /docs/release/notes-1.4.0.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.4.0 (2021-06-30) 2 | =========================== 3 | 4 | Bugfixes 5 | -------- 6 | 7 | - Fix estimator's inconsistent state when reading from :class:`anndata.AnnData` 8 | `PR 563 `_. 9 | - Fix not checking whether probabilities sum to 1 in 10 | :meth:`cellrank.tl.estimators.BaseEstimator.compute_absorption_probabilities` 11 | `PR 566 `_. 12 | - Fix always forcing sparse transition matrix in :class:`cellrank.tl.kernels.Kernel` 13 | `PR 586 `_. 14 | - Fix passing custom connectivity key in :class:`cellrank.tl.kernels.Kernel` 15 | `PR 590 `_. 16 | - Fix kernels in :mod:`cellrank.external` always requiring connectivities 17 | `PR 600 `_. 18 | - Fix parallelization of sparse matrix with too many jobs `PR 633 `_. 19 | - Fix plotting coarse-grained transition matrix when no stationary distribution is found 20 | `Issue 594 `_. 21 | 22 | Features 23 | -------- 24 | 25 | - Add new external kernel based on Waddington optimal transport :cite:`schiebinger:19` 26 | :class:`cellrank.external.kernels.WOTKernel` `PR 595 `_. 27 | - Add new tutorial `Time series datasets `_ that 28 | shows how to use the external Waddington OT kernel `PR 35 `_. 29 | - Add reprogramming dataset :func:`cellrank.datasets.reprogramming_schiebinger` from :cite:`schiebinger:19` 30 | `PR 631 `_. 31 | - Add :func:`cellrank.pl.log_odds` to plot log-odds ratio between 2 lineages sorted by experimental time. 32 | `PR 642 `_. 33 | - Add :meth:`cellrank.tl.estimators.GPCCA.plot_macrostate_composition` to visualize macrostate composition over a 34 | categorical variable `PR 641 `_. 35 | - Add :meth:`cellrank.tl.estimators.BaseEstimator.plot_lineage_drivers_correlation` to plot lineage driver correlation 36 | with 2 lineages in a scatter plot `PR 640 `_. 37 | - Add :meth:`cellrank.tl.kernels.Kernel.plot_single_flow` based on :cite:`mittnenzweig:21` to visualize outgoing 38 | transition matrix flow in clusters across experimental time `PR 615 `_. 39 | - Dramatically speed-up the computation of fate probabilities (>5x) `PR 638 `_. 40 | - Remove 4 technical examples and add 2 new examples `PR 602 `_: 41 | 42 | - projection of transition matrix onto an embedding. 43 | - simulation of random walks on a Markov chain. 44 | 45 | - Add option to visualize cell-level covariates in :func:`cellrank.pl.cluster_lineage` 46 | `PR 634 `_. 47 | - Add option to force-recompute transition matrix in :func:`cellrank.tl.initial_states` and 48 | :func:`cellrank.tl.terminal_states` `PR 577 `_. 49 | - Change :class:`cellrank.tl.kernels.PseudotimeKernel` defaults and prune available parameters 50 | of soft threshold scheme `PR 583 `_. 51 | - Parallelize transition matrix computation in :class:`cellrank.tl.kernels.PseudotimeKernel` 52 | `PR 587 `_. 53 | - Prune *requirements.txt* `PR 571 `_. 54 | - Add small improvements to documentation `PR 584 `_ 55 | `PR 601 `_ `PR 605 `_ 56 | `PR 648 `_. 57 | -------------------------------------------------------------------------------- /docs/release/notes-1.5.1.rst: -------------------------------------------------------------------------------- 1 | CellRank 1.5.1 (2022-01-13) 2 | =========================== 3 | No significant changes. 4 | -------------------------------------------------------------------------------- /docs/release_notes.rst: -------------------------------------------------------------------------------- 1 | Release Notes 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 3 6 | 7 | release/notes-dev 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | :glob: 12 | :reversed: 13 | 14 | release/notes-*.*.* 15 | -------------------------------------------------------------------------------- /docs/spelling/autosummary.txt: -------------------------------------------------------------------------------- 1 | args 2 | bicgstab 3 | brands 4 | brandts 5 | clustermap 6 | cmap 7 | cytotrace 8 | dt 9 | ent 10 | eps 11 | figsize 12 | fisher 13 | fname 14 | gaussian 15 | gcrotmk 16 | gmean 17 | gmres 18 | hmean 19 | iter 20 | iters 21 | krylov 22 | kwargs 23 | leiden 24 | lgmres 25 | logit 26 | loky 27 | obsm 28 | obsp 29 | paga 30 | params 31 | perc 32 | poisson 33 | schur 34 | unbal 35 | uns 36 | varm 37 | varp 38 | -------------------------------------------------------------------------------- /docs/spelling/general.txt: -------------------------------------------------------------------------------- 1 | Benjamini 2 | Bugfixes 3 | Dataframe 4 | Expectile 5 | Galerkin 6 | GiB 7 | Hochberg 8 | Jupyter 9 | Lanczos 10 | NaN 11 | Schur 12 | Suptitle 13 | Waddington 14 | Zebrafish 15 | adata 16 | backend 17 | barcodes 18 | barplot 19 | bleomycin 20 | colorbar 21 | colormap 22 | connectivities 23 | covariate 24 | covariates 25 | dataset 26 | dendrogram 27 | densified 28 | dev 29 | docstrings 30 | eigendecomposition 31 | eigengap 32 | embryogenesis 33 | endocrinogenesis 34 | enums 35 | heatmap 36 | kNN 37 | kwargs 38 | logits 39 | macOS 40 | macrostate 41 | macrostates 42 | microstates 43 | misassign 44 | misassigned 45 | multinomial 46 | pluripotency 47 | pluripotent 48 | preconditioner 49 | pseudotemporal 50 | pseudotime 51 | scatterplot 52 | softmax 53 | subsetting 54 | thresholded 55 | transcriptomic 56 | unspliced 57 | vendorize 58 | vendorizing 59 | -------------------------------------------------------------------------------- /docs/utils.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from enchant.tokenize import Filter 4 | 5 | 6 | class ModnameFilter(Filter): 7 | """Ignore module names.""" 8 | 9 | _pat = re.compile(r"cellrank\.+") 10 | 11 | def _skip(self, word: str) -> bool: 12 | return self._pat.match(word) is not None 13 | -------------------------------------------------------------------------------- /src/cellrank/__init__.py: -------------------------------------------------------------------------------- 1 | from importlib import metadata 2 | 3 | import numpy as np 4 | import scipy.sparse as sp 5 | 6 | from cellrank import datasets, estimators, kernels, logging, models, pl 7 | from cellrank._utils._lineage import Lineage 8 | from cellrank.settings import settings 9 | 10 | __all__ = ["datasets", "estimators", "kernels", "logging", "models", "pl", "Lineage", "settings"] 11 | 12 | try: 13 | md = metadata.metadata(__name__) 14 | __version__ = md.get("version", "") 15 | __author__ = md.get("Author", "") 16 | __maintainer__ = md.get("Maintainer-email", "") 17 | except ImportError: 18 | md = None 19 | 20 | # pygam uses `.A` 21 | sp.spmatrix.A = property(lambda self: self.toarray()) 22 | # pygam/utils.py:649: in b_spline_basis 23 | np.int = int # noqa 24 | 25 | del metadata, md, sp, np 26 | -------------------------------------------------------------------------------- /src/cellrank/_utils/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank._utils._lineage import Lineage 2 | 3 | __all__ = ["Lineage"] 4 | -------------------------------------------------------------------------------- /src/cellrank/_utils/_enum.py: -------------------------------------------------------------------------------- 1 | import abc 2 | import enum 3 | import functools 4 | from typing import Any, Callable, Literal 5 | 6 | __all__ = ["ModeEnum", "DEFAULT_BACKEND"] 7 | 8 | DEFAULT_BACKEND = "loky" 9 | Backend_t = Literal["loky", "multiprocessing", "threading"] 10 | 11 | 12 | class PrettyEnum(enum.Enum): 13 | """Enum with a pretty :meth:`__str__` and :meth:`__repr__`.""" 14 | 15 | @property 16 | def v(self) -> Any: 17 | """Alias for :attr`value`.""" 18 | return self.value 19 | 20 | def __repr__(self) -> str: 21 | return f"{self.value!r}" 22 | 23 | def __str__(self) -> str: 24 | return f"{self.value!s}" 25 | 26 | 27 | def _pretty_raise_enum(cls: type["ErrorFormatterABC"], func: Callable) -> Callable: 28 | @functools.wraps(func) 29 | def wrapper(*args: Any, **kwargs: Any) -> "ErrorFormatterABC": 30 | try: 31 | return func(*args, **kwargs) 32 | except ValueError as e: 33 | _cls, value, *_ = args 34 | e.args = (cls._format(value),) 35 | raise e 36 | 37 | if not issubclass(cls, ErrorFormatterABC): 38 | raise TypeError(f"Class `{cls}` must be subtype of `ErrorFormatterABC`.") 39 | if not len(cls.__members__): 40 | # empty enum, for class hierarchy 41 | return func 42 | 43 | return wrapper 44 | 45 | 46 | class ABCEnumMeta(enum.EnumMeta, abc.ABCMeta): # noqa: D101 47 | def __call__(cls, *args, **kwargs): # noqa 48 | if getattr(cls, "__error_format__", None) is None: 49 | raise TypeError(f"Can't instantiate class `{cls.__name__}` " f"without `__error_format__` class attribute.") 50 | return super().__call__(*args, **kwargs) 51 | 52 | def __new__(cls, clsname: str, superclasses: tuple[type], attributedict: dict[str, Any]): # noqa: D102 53 | res = super().__new__(cls, clsname, superclasses, attributedict) 54 | res.__new__ = _pretty_raise_enum(res, res.__new__) 55 | return res 56 | 57 | 58 | class ErrorFormatterABC: # noqa: D101 59 | __error_format__ = "Invalid option `{!r}` for `{}`. Valid options are: `{}`." 60 | 61 | @classmethod 62 | def _format(cls, value) -> str: 63 | return cls.__error_format__.format(value, cls.__name__, [m.value for m in cls.__members__.values()]) 64 | 65 | 66 | class ModeEnum(str, ErrorFormatterABC, PrettyEnum, metaclass=ABCEnumMeta): # noqa: D101 67 | def _generate_next_value_(self, start, count, last_values): 68 | return str(self).lower() 69 | -------------------------------------------------------------------------------- /src/cellrank/_utils/_key.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Callable, Optional 2 | 3 | __all__ = ["Key"] 4 | 5 | 6 | class cprop: 7 | """Class property.""" 8 | 9 | def __init__(self, f: Callable[..., str]): 10 | self.f = f 11 | 12 | def __get__(self, obj: Any, owner: Any) -> str: 13 | return self.f(owner) 14 | 15 | 16 | class Key: 17 | """Class which manages keys in :class:`anndata.AnnData`.""" 18 | 19 | @classmethod 20 | def backward(cls, bwd: Optional[bool]) -> str: 21 | return "bwd" if bwd else "fwd" 22 | 23 | @classmethod 24 | def where(cls, bwd: Optional[bool]) -> str: 25 | return "from" if bwd else "to" 26 | 27 | @classmethod 28 | def initial(cls, bwd: Optional[bool]) -> str: 29 | return "initial" if bwd else "terminal" 30 | 31 | @classmethod 32 | def cytotrace(cls, key: str) -> str: 33 | return f"ct_{key}" 34 | 35 | class obs: 36 | @classmethod 37 | def probs(cls, key: str) -> str: 38 | return f"{key}_probs" 39 | 40 | @classmethod 41 | def macrostates(cls, bwd: Optional[bool]) -> str: 42 | return f"macrostates_{Key.backward(bwd)}" 43 | 44 | @classmethod 45 | def term_states(cls, estim_bwd: Optional[bool], *, bwd: bool = False) -> str: 46 | states = "init_states" if bwd else "term_states" 47 | return f"{states}_{Key.backward(estim_bwd)}" 48 | 49 | @classmethod 50 | def priming_degree(cls, bwd: Optional[bool]) -> str: 51 | return f"priming_degree_{Key.backward(bwd)}" 52 | 53 | class obsm: 54 | @classmethod 55 | def memberships(cls, key: str) -> str: 56 | return f"{key}_memberships" 57 | 58 | @classmethod 59 | def schur_vectors(cls, bwd: Optional[bool]) -> str: 60 | return f"schur_vectors_{Key.backward(bwd)}" 61 | 62 | @classmethod 63 | def macrostates(cls, bwd: Optional[bool]) -> str: 64 | return f"macrostates_{Key.backward(bwd)}" 65 | 66 | @classmethod 67 | def fate_probs(cls, bwd: Optional[bool]) -> str: 68 | return f"lineages_{Key.backward(bwd)}" 69 | 70 | @classmethod 71 | def abs_times(cls, bwd: Optional[bool]) -> str: 72 | return f"absorption_times_{Key.backward(bwd)}" 73 | 74 | class varm: 75 | @classmethod 76 | def lineage_drivers(cls, bwd: Optional[bool]): 77 | return Key.initial(bwd) + "_lineage_drivers" 78 | 79 | class uns: 80 | @classmethod 81 | def kernel(cls, bwd: Optional[bool], key: Optional[str] = None) -> str: 82 | return key if key is not None else f"T_{Key.backward(bwd)}" 83 | 84 | @classmethod 85 | def estimator(cls, bwd: Optional[bool], key: Optional[str] = None) -> str: 86 | return key if key is not None else f"{Key.backward(bwd)}_estimator" 87 | 88 | @classmethod 89 | def names(cls, key: str) -> str: 90 | return f"{key}_names" 91 | 92 | @classmethod 93 | def colors(cls, key: str) -> str: 94 | return f"{key}_colors" 95 | 96 | @classmethod 97 | def eigen(cls, bwd: Optional[bool]) -> str: 98 | return f"eigendecomposition_{Key.backward(bwd)}" 99 | 100 | @classmethod 101 | def schur_matrix(cls, bwd: Optional[bool]) -> str: 102 | return f"schur_matrix_{Key.backward(bwd)}" 103 | 104 | @classmethod 105 | def coarse(cls, bwd: Optional[bool]) -> str: 106 | return f"coarse_{Key.backward(bwd)}" 107 | -------------------------------------------------------------------------------- /src/cellrank/estimators/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.estimators import mixins 2 | from cellrank.estimators._base_estimator import BaseEstimator 3 | from cellrank.estimators.terminal_states import CFLARE, GPCCA, TermStatesEstimator 4 | 5 | __all__ = ["mixins", "BaseEstimator", "TermStatesEstimator", "CFLARE", "GPCCA"] 6 | -------------------------------------------------------------------------------- /src/cellrank/estimators/mixins/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.estimators.mixins._fate_probabilities import FateProbsMixin 2 | from cellrank.estimators.mixins._kernel import KernelMixin 3 | from cellrank.estimators.mixins._lineage_drivers import LinDriversMixin 4 | from cellrank.estimators.mixins.decomposition import EigenMixin, SchurMixin 5 | 6 | __all__ = ["FateProbsMixin", "KernelMixin", "LinDriversMixin", "EigenMixin", "SchurMixin"] 7 | -------------------------------------------------------------------------------- /src/cellrank/estimators/mixins/_kernel.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Optional, TypeVar, Union 2 | 3 | import numpy as np 4 | import scipy.sparse as sp 5 | 6 | from anndata import AnnData 7 | 8 | __all__ = ["KernelMixin"] 9 | 10 | KernelExpression = TypeVar("KernelExpression", bound="KernelMixin") 11 | 12 | 13 | class KernelMixin: 14 | """Mixin that exposes various properties of :class:`cellrank.kernels.KernelExpression`.""" 15 | 16 | def __init__(self, kernel: "KernelExpression", **kwargs: Any): 17 | super().__init__(**kwargs) 18 | self._kernel = kernel 19 | self._n_obs = self.kernel.adata.n_obs 20 | 21 | @property 22 | def kernel(self) -> "KernelExpression": 23 | """Underlying kernel expression.""" 24 | return self._kernel 25 | 26 | @property 27 | def adata(self) -> AnnData: 28 | """Annotated data object.""" 29 | return self.kernel.adata 30 | 31 | @property 32 | def shape(self) -> tuple[int, int]: 33 | """Shape of the kernel.""" 34 | return self.kernel.shape 35 | 36 | @adata.setter 37 | def adata(self, adata: Optional[AnnData]) -> None: 38 | self.kernel.adata = adata 39 | 40 | def __len__(self) -> int: 41 | return self._n_obs 42 | 43 | @property 44 | def transition_matrix(self) -> Union[np.ndarray, sp.spmatrix]: 45 | """Transition matrix of the :attr:`kernel`.""" 46 | return self.kernel.transition_matrix 47 | 48 | @property 49 | def backward(self) -> bool: 50 | """Direction of the :attr:`kernel`.""" 51 | return self.kernel.backward 52 | -------------------------------------------------------------------------------- /src/cellrank/estimators/mixins/decomposition/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.estimators.mixins.decomposition._eigen import EigenMixin 2 | from cellrank.estimators.mixins.decomposition._schur import SchurMixin 3 | 4 | __all__ = ["EigenMixin", "SchurMixin"] 5 | -------------------------------------------------------------------------------- /src/cellrank/estimators/terminal_states/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.estimators.terminal_states._cflare import CFLARE 2 | from cellrank.estimators.terminal_states._gpcca import GPCCA 3 | from cellrank.estimators.terminal_states._term_states_estimator import ( 4 | TermStatesEstimator, 5 | ) 6 | 7 | __all__ = ["CFLARE", "GPCCA", "TermStatesEstimator"] 8 | -------------------------------------------------------------------------------- /src/cellrank/kernels/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.kernels import utils 2 | from cellrank.kernels._base_kernel import ( 3 | BidirectionalKernel, 4 | Kernel, 5 | UnidirectionalKernel, 6 | ) 7 | from cellrank.kernels._connectivity_kernel import ConnectivityKernel 8 | from cellrank.kernels._cytotrace_kernel import CytoTRACEKernel 9 | from cellrank.kernels._experimental_time_kernel import ExperimentalTimeKernel 10 | from cellrank.kernels._precomputed_kernel import PrecomputedKernel 11 | from cellrank.kernels._pseudotime_kernel import PseudotimeKernel 12 | from cellrank.kernels._real_time_kernel import RealTimeKernel 13 | from cellrank.kernels._velocity_kernel import VelocityKernel 14 | 15 | __all__ = [ 16 | "utils", 17 | "Kernel", 18 | "UnidirectionalKernel", 19 | "BidirectionalKernel", 20 | "ConnectivityKernel", 21 | "CytoTRACEKernel", 22 | "ExperimentalTimeKernel", 23 | "PrecomputedKernel", 24 | "PseudotimeKernel", 25 | "RealTimeKernel", 26 | "VelocityKernel", 27 | ] 28 | -------------------------------------------------------------------------------- /src/cellrank/kernels/_connectivity_kernel.py: -------------------------------------------------------------------------------- 1 | from anndata import AnnData 2 | 3 | from cellrank import logging as logg 4 | from cellrank._utils._docs import d 5 | from cellrank.kernels._base_kernel import UnidirectionalKernel 6 | from cellrank.kernels.mixins import ConnectivityMixin 7 | 8 | __all__ = ["ConnectivityKernel"] 9 | 10 | 11 | @d.dedent 12 | class ConnectivityKernel(ConnectivityMixin, UnidirectionalKernel): 13 | """Kernel which computes transition probabilities based on similarities among cells. 14 | 15 | As a measure of similarity, we currently support: 16 | 17 | - transcriptomic similarities, computed using, e.g., :func:`~scanpy.pp.neighbors`, see :cite:`wolf:18`. 18 | - spatial similarities, computed using, e.g., :func:`~squidpy.gr.spatial_neighbors`, see :cite:`palla:21`. 19 | 20 | The resulting transition matrix is symmetric and thus cannot be used to learn about the direction of the biological 21 | process. To include this direction, consider combining with a velocity-derived transition matrix via 22 | :class:`~cellrank.kernels.VelocityKernel`. 23 | 24 | %(density_correction)s 25 | 26 | Parameters 27 | ---------- 28 | %(adata)s 29 | conn_key 30 | Key in :attr:`~anndata.AnnData.obsp` where connectivity matrix describing cell-cell similarity is stored. 31 | check_connectivity 32 | Check whether the underlying kNN graph is connected. 33 | """ 34 | 35 | def __init__( 36 | self, 37 | adata: AnnData, 38 | conn_key: str = "connectivities", 39 | check_connectivity: bool = False, 40 | ): 41 | super().__init__( 42 | adata, 43 | conn_key=conn_key, 44 | check_connectivity=check_connectivity, 45 | ) 46 | 47 | def compute_transition_matrix(self, density_normalize: bool = True) -> "ConnectivityKernel": 48 | """Compute transition matrix based on transcriptomic similarity. 49 | 50 | Uses symmetric, weighted kNN graph to compute symmetric transition matrix. The connectivities are computed 51 | using :func:`~scanpy.pp.neighbors`. Depending on the parameters used there, they can be UMAP connectivities or 52 | Gaussian-kernel-based connectivities with adaptive kernel width. 53 | 54 | Parameters 55 | ---------- 56 | density_normalize 57 | Whether to use the underlying kNN graph for density normalization. 58 | 59 | Returns 60 | ------- 61 | Returns self and updates :attr:`transition_matrix` and :attr:`params`. 62 | """ 63 | # fmt: off 64 | start = logg.info(f"Computing transition matrix based on `adata.obsp[{self._conn_key!r}]`") 65 | if self._reuse_cache({"dnorm": density_normalize, "key": self._conn_key}, time=start): 66 | return self 67 | 68 | conn = self.connectivities 69 | if density_normalize: 70 | conn = self._density_normalize(conn) 71 | 72 | self.transition_matrix = conn 73 | logg.info(" Finish", time=start) 74 | # fmt: on 75 | 76 | return self 77 | -------------------------------------------------------------------------------- /src/cellrank/kernels/_experimental_time_kernel.py: -------------------------------------------------------------------------------- 1 | import abc 2 | from typing import Any, Optional 3 | 4 | import numpy as np 5 | import pandas as pd 6 | 7 | from matplotlib.colors import Normalize, to_hex 8 | from matplotlib.pyplot import get_cmap 9 | 10 | from anndata import AnnData 11 | 12 | from cellrank._utils._docs import d 13 | from cellrank.kernels._base_kernel import BidirectionalKernel 14 | from cellrank.kernels._utils import _ensure_numeric_ordered, require_tmat 15 | 16 | __all__ = ["ExperimentalTimeKernel"] 17 | 18 | 19 | @d.dedent 20 | class ExperimentalTimeKernel(BidirectionalKernel, abc.ABC): 21 | """Kernel base class which computes transition probabilities based on experimental time. 22 | 23 | %(density_correction)s 24 | 25 | Parameters 26 | ---------- 27 | %(adata)s 28 | %(backward)s 29 | time_key 30 | Key in :attr:`~anndata.AnnData.obs` where experimental time is stored. 31 | The experimental time can be of either of a numeric or an ordered categorical type. 32 | kwargs 33 | Keyword arguments for the parent class. 34 | """ 35 | 36 | def __init__( 37 | self, 38 | adata: AnnData, 39 | time_key: str, 40 | backward: bool = False, 41 | **kwargs: Any, 42 | ): 43 | super().__init__( 44 | adata, 45 | backward=backward, 46 | time_key=time_key, 47 | **kwargs, 48 | ) 49 | 50 | def _read_from_adata(self, time_key: str, cmap: str = "gnuplot", **kwargs: Any) -> None: 51 | super()._read_from_adata(**kwargs) 52 | 53 | self._time_key = time_key 54 | self._exp_time = _ensure_numeric_ordered(self.adata, time_key) 55 | self.adata.obs[time_key] = self.experimental_time.values 56 | 57 | # fmt: off 58 | cmap = get_cmap(cmap) 59 | cats = self.experimental_time.cat.categories 60 | norm = Normalize(vmin=cats.min(), vmax=cats.max()) 61 | self.adata.uns[f"{time_key}_colors"] = np.array([to_hex(c) for c in cmap(norm(cats))]) 62 | # fmt: on 63 | 64 | @d.dedent 65 | @require_tmat 66 | def plot_single_flow( 67 | self, 68 | cluster: str, 69 | cluster_key: str, 70 | time_key: Optional[str] = None, 71 | *args: Any, 72 | **kwargs: Any, 73 | ) -> None: 74 | """%(plot_single_flow.full_desc)s 75 | 76 | Parameters 77 | ---------- 78 | %(plot_single_flow.parameters)s 79 | 80 | Returns 81 | ------- 82 | %(plot_single_flow.returns)s 83 | """ # noqa: D400 84 | if time_key is None: 85 | time_key = self._time_key 86 | return super().plot_single_flow(cluster, cluster_key, time_key, *args, **kwargs) 87 | 88 | @property 89 | def experimental_time(self) -> pd.Series: 90 | """Experimental time.""" 91 | return self._exp_time 92 | 93 | def __invert__(self, *args: str) -> "ExperimentalTimeKernel": 94 | etk = self._copy_ignore(*(("_transition_matrix",) + args)) 95 | minn, maxx = etk.experimental_time.min(), etk.experimental_time.max() 96 | etk._exp_time = pd.Series( 97 | pd.Categorical(maxx - np.array(etk.experimental_time) + minn, ordered=True), 98 | index=etk.experimental_time.index, 99 | ) 100 | etk._backward = not self.backward 101 | etk._params = {} 102 | return etk 103 | -------------------------------------------------------------------------------- /src/cellrank/kernels/mixins/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.kernels.mixins._anndata import AnnDataMixin 2 | from cellrank.kernels.mixins._io import IOMixin 3 | from cellrank.kernels.mixins._kernel import ( 4 | BidirectionalMixin, 5 | ConnectivityMixin, 6 | UnidirectionalMixin, 7 | ) 8 | 9 | __all__ = ["AnnDataMixin", "IOMixin", "BidirectionalMixin", "ConnectivityMixin", "UnidirectionalMixin"] 10 | -------------------------------------------------------------------------------- /src/cellrank/kernels/mixins/_anndata.py: -------------------------------------------------------------------------------- 1 | import abc 2 | from typing import Any, Optional 3 | 4 | from anndata import AnnData 5 | 6 | from cellrank._utils._docs import d 7 | 8 | __all__ = ["AnnDataMixin"] 9 | 10 | 11 | class AnnDataMixin(abc.ABC): 12 | """Mixin that allows for serialization from/to :class:`~anndata.AnnData`.""" 13 | 14 | @abc.abstractmethod 15 | @d.dedent 16 | def _read_from_adata(self, adata: AnnData, **kwargs: Any) -> bool: 17 | """Populate attributes from :class:`~anndata.AnnData`. 18 | 19 | Parameters 20 | ---------- 21 | %(adata)s 22 | kwargs 23 | Additional keyword arguments. 24 | 25 | Returns 26 | ------- 27 | :obj:`True` if the de-serialization was successful, otherwise :obj:`False`. 28 | """ 29 | return True 30 | 31 | @property 32 | @abc.abstractmethod 33 | def adata(self) -> AnnData: 34 | """Annotated data object.""" 35 | 36 | @adata.setter 37 | @abc.abstractmethod 38 | def adata(self, adata: Optional[AnnData]) -> None: ... 39 | 40 | @abc.abstractmethod 41 | def __len__(self) -> int: ... 42 | 43 | @abc.abstractmethod 44 | @d.get_full_description(base="to_adata") 45 | def to_adata(self, **kwargs: Any) -> AnnData: 46 | """Serialize self to :class:`~anndata.Anndata`.""" 47 | 48 | @classmethod 49 | @d.get_full_description(base="from_adata") 50 | @d.get_sections(base="from_adata", sections=["Returns"]) 51 | @d.dedent 52 | def from_adata(cls, adata: AnnData, **kwargs: Any) -> "AnnDataMixin": 53 | """De-serialize self from :class:`~anndata.AnnData`. 54 | 55 | Parameters 56 | ---------- 57 | %(adata)s 58 | kwargs 59 | Additional keyword arguments for initialization. 60 | 61 | Returns 62 | ------- 63 | The de-serialized object. 64 | """ 65 | obj = cls(adata, **kwargs) 66 | obj._read_from_adata(adata) 67 | 68 | return obj 69 | -------------------------------------------------------------------------------- /src/cellrank/kernels/mixins/_io.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import pathlib 3 | import pickle 4 | from typing import Optional, Protocol, Union 5 | 6 | from anndata import AnnData 7 | 8 | from cellrank import logging as logg 9 | 10 | __all__ = ["IOMixin"] 11 | 12 | 13 | class IOMixinProtocol(Protocol): 14 | @property 15 | def shape(self) -> tuple[int, ...]: ... 16 | 17 | @property 18 | def adata(self) -> AnnData: ... 19 | 20 | @adata.setter 21 | def adata(self, adata: AnnData) -> None: ... 22 | 23 | 24 | class IOMixin: 25 | """Mixin that allows for serialization from/to files using :mod:`pickle`.""" 26 | 27 | @property 28 | @contextlib.contextmanager 29 | def _remove_adata(self) -> None: 30 | """Temporarily remove :attr:`adata`, if present.""" 31 | adata = getattr(self, "adata", None) 32 | 33 | try: 34 | if adata is not None: 35 | self.adata = None 36 | yield 37 | finally: 38 | if adata is not None: 39 | self.adata = adata 40 | 41 | def write( 42 | self, 43 | fname: Union[str, pathlib.Path], 44 | write_adata: bool = True, 45 | ) -> None: 46 | """Serialize self to a file using :mod:`pickle`. 47 | 48 | Parameters 49 | ---------- 50 | fname 51 | Path where to save the object. 52 | write_adata 53 | Whether to save :attr:`adata` object. 54 | 55 | Returns 56 | ------- 57 | Nothing, just writes itself to a file. 58 | """ 59 | logg.info(f"Writing `{self}` to `{fname}`") 60 | 61 | if write_adata: 62 | with open(fname, "wb") as fout: 63 | pickle.dump(self, fout) 64 | else: 65 | with self._remove_adata, open(fname, "wb") as fout: 66 | pickle.dump(self, fout) 67 | 68 | @staticmethod 69 | def read(fname: Union[str, pathlib.Path], adata: Optional[AnnData] = None, copy: bool = False) -> "IOMixin": 70 | """De-serialize self from a file. 71 | 72 | Parameters 73 | ---------- 74 | fname 75 | Path from which to read the object. 76 | adata 77 | :class:`~anndata.AnnData` object to assign to the saved object. 78 | Only used when the saved object has :attr:`adata` and it was saved without it. 79 | copy 80 | Whether to copy ``adata`` before assigning it. If ``adata`` is a view, it is always copied. 81 | 82 | Returns 83 | ------- 84 | The de-serialized object. 85 | """ 86 | with open(fname, "rb") as fin: 87 | obj: IOMixinProtocol = pickle.load(fin) 88 | 89 | if hasattr(obj, "adata"): 90 | if isinstance(obj.adata, AnnData): 91 | if adata is not None: 92 | logg.warning("Ignoring supplied `adata` object because it is already present") 93 | return obj 94 | 95 | if not isinstance(adata, AnnData): 96 | raise TypeError( 97 | "This object was saved without its `adata` object. " "Please supply one as `adata=...`." 98 | ) 99 | 100 | if obj.shape[0] != len(adata): 101 | raise ValueError(f"Expected `adata` to be of length `{len(adata)}`, found `{obj.shape[0]}`.") 102 | if copy or adata.is_view: 103 | adata = adata.copy() 104 | 105 | obj.adata = adata 106 | return obj 107 | 108 | return obj 109 | -------------------------------------------------------------------------------- /src/cellrank/kernels/mixins/_kernel.py: -------------------------------------------------------------------------------- 1 | import abc 2 | from typing import Any, Union 3 | 4 | import numpy as np 5 | import scipy.sparse as sp 6 | 7 | from cellrank import logging as logg 8 | from cellrank._utils._utils import _connected, _get_neighs, _symmetric 9 | 10 | __all__ = ["ConnectivityMixin", "UnidirectionalMixin", "BidirectionalMixin"] 11 | 12 | 13 | class ConnectivityMixin: 14 | """Mixin class that reads kNN connectivities and allows for density normalization.""" 15 | 16 | def _read_from_adata( 17 | self, 18 | conn_key: str = "connectivities", 19 | check_connectivity: bool = False, 20 | check_symmetric: bool = True, 21 | **kwargs: Any, 22 | ) -> None: 23 | super()._read_from_adata(**kwargs) 24 | self._conn_key = conn_key 25 | conn = _get_neighs(self.adata, mode="connectivities", key=conn_key) 26 | self._conn = sp.csr_matrix(conn).astype(np.float64, copy=False) 27 | 28 | if check_connectivity and not _connected(self.connectivities): 29 | logg.warning("kNN graph is not connected") 30 | if check_symmetric and not _symmetric(self.connectivities): 31 | logg.warning("kNN graph is not symmetric") 32 | 33 | def _density_normalize(self, matrix: Union[np.ndarray, sp.spmatrix]) -> Union[np.ndarray, sp.spmatrix]: 34 | """ 35 | Density normalization by the underlying kNN graph. 36 | 37 | Parameters 38 | ---------- 39 | matrix 40 | Matrix to normalize. 41 | 42 | Returns 43 | ------- 44 | Density normalized matrix. 45 | """ 46 | logg.debug("Density normalizing the transition matrix") 47 | 48 | q = np.asarray(self.connectivities.sum(axis=0)).squeeze() 49 | Q = sp.spdiags(1.0 / q, 0, matrix.shape[0], matrix.shape[0]) 50 | 51 | return Q @ matrix @ Q 52 | 53 | @property 54 | def connectivities(self) -> sp.csr_matrix: 55 | """Underlying connectivity matrix.""" 56 | return self._conn 57 | 58 | 59 | class UnidirectionalMixin: 60 | """Mixin specifying that its kernel doesn't is directionless.""" 61 | 62 | @property 63 | def backward(self) -> None: 64 | """None.""" 65 | 66 | 67 | class BidirectionalMixin(abc.ABC): 68 | """Mixin specifying that its kernel has forward or backward directions.""" 69 | 70 | def __init__(self, *args: Any, backward: bool = False, **kwargs: Any): 71 | super().__init__(*args, **kwargs) 72 | if not isinstance(backward, (bool, np.bool_)): 73 | raise TypeError(f"Expected `backward` to be `bool`, found `{type(backward).__name__}`.") 74 | self._backward = bool(backward) 75 | self._init_kwargs["backward"] = backward 76 | 77 | @abc.abstractmethod 78 | def __invert__(self) -> "BidirectionalMixin": 79 | pass 80 | 81 | @property 82 | def backward(self) -> bool: 83 | """Direction of the process.""" 84 | return self._backward 85 | -------------------------------------------------------------------------------- /src/cellrank/kernels/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.kernels.utils._projection import TmatProjection 2 | from cellrank.kernels.utils._pseudotime_scheme import ( 3 | CustomThresholdScheme, 4 | HardThresholdScheme, 5 | SoftThresholdScheme, 6 | ThresholdSchemeABC, 7 | ) 8 | from cellrank.kernels.utils._random_walk import RandomWalk 9 | from cellrank.kernels.utils._similarity import ( 10 | Correlation, 11 | Cosine, 12 | DotProduct, 13 | SimilarityABC, 14 | ) 15 | from cellrank.kernels.utils._tmat_flow import FlowPlotter 16 | from cellrank.kernels.utils._velocity_model import Deterministic, MonteCarlo, Stochastic 17 | 18 | __all__ = [ 19 | "TmatProjection", 20 | "CustomThresholdScheme", 21 | "HardThresholdScheme", 22 | "SoftThresholdScheme", 23 | "RandomWalk", 24 | "Cosine", 25 | "Correlation", 26 | "DotProduct", 27 | "SimilarityABC", 28 | "FlowPlotter", 29 | "Deterministic", 30 | "MonteCarlo", 31 | "Stochastic", 32 | ] 33 | -------------------------------------------------------------------------------- /src/cellrank/logging/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.logging._logging import ( 2 | debug, 3 | error, 4 | hint, 5 | info, 6 | print_version_and_date, 7 | print_versions, 8 | warning, 9 | ) 10 | 11 | __all__ = [ 12 | "debug", 13 | "error", 14 | "hint", 15 | "info", 16 | "print_version_and_date", 17 | "print_versions", 18 | "warning", 19 | ] 20 | -------------------------------------------------------------------------------- /src/cellrank/models/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.models._base_model import BaseModel, FailedModel, FittedModel 2 | from cellrank.models._gamr_model import GAMR 3 | from cellrank.models._pygam_model import GAM 4 | from cellrank.models._sklearn_model import SKLearnModel 5 | 6 | __all__ = ["BaseModel", "FailedModel", "FittedModel", "GAMR", "GAM", "SKLearnModel"] 7 | -------------------------------------------------------------------------------- /src/cellrank/pl/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.pl._aggregate_fate_probs import aggregate_fate_probabilities 2 | from cellrank.pl._circular_projection import circular_projection 3 | from cellrank.pl._cluster_trends import cluster_trends 4 | from cellrank.pl._gene_trend import gene_trends 5 | from cellrank.pl._heatmap import heatmap 6 | from cellrank.pl._log_odds import log_odds 7 | 8 | __all__ = [ 9 | "aggregate_fate_probabilities", 10 | "circular_projection", 11 | "cluster_trends", 12 | "gene_trends", 13 | "heatmap", 14 | "log_odds", 15 | ] 16 | -------------------------------------------------------------------------------- /src/cellrank/settings/__init__.py: -------------------------------------------------------------------------------- 1 | from cellrank.settings._settings import settings 2 | 3 | __all__ = ["settings"] 4 | -------------------------------------------------------------------------------- /src/cellrank/settings/_settings.py: -------------------------------------------------------------------------------- 1 | import copy 2 | import logging 3 | 4 | from scanpy import settings 5 | 6 | from cellrank.logging._logging import _LogFormatter, _RootLogger 7 | 8 | __all__ = ["settings"] 9 | 10 | 11 | def _set_log_file(settings): 12 | file = settings.logfile 13 | name = settings.logpath 14 | root = settings._root_logger 15 | h = logging.StreamHandler(file) if name is None else logging.FileHandler(name) 16 | h.setFormatter(_LogFormatter()) 17 | h.setLevel(root.level) 18 | 19 | if len(root.handlers) == 1: 20 | root.removeHandler(root.handlers[0]) 21 | elif len(root.handlers) > 1: 22 | raise RuntimeError("CellRank's root logger somehow got more than one handler.") 23 | 24 | root.addHandler(h) 25 | 26 | 27 | settings = copy.copy(settings) 28 | settings._root_logger = _RootLogger(settings.verbosity) 29 | # these 2 lines are necessary to get it working (otherwise no logger is found) 30 | # this is a hacky way of modifying the logging, in the future, use our own 31 | _set_log_file(settings) 32 | settings.verbosity = settings.verbosity 33 | -------------------------------------------------------------------------------- /tests/_ground_truth_adatas/adata_100.h5ad: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_adatas/adata_100.h5ad -------------------------------------------------------------------------------- /tests/_ground_truth_adatas/adata_200.h5ad: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_adatas/adata_200.h5ad -------------------------------------------------------------------------------- /tests/_ground_truth_adatas/adata_50.h5ad: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_adatas/adata_50.h5ad -------------------------------------------------------------------------------- /tests/_ground_truth_figures/all_models_for_1_gene_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/all_models_for_1_gene_failed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/all_models_for_1_gene_failed_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/all_models_for_1_gene_failed_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/all_models_for_1_lineage_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/all_models_for_1_lineage_failed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/bar.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/bar_bwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/bar_bwd.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/bar_cluster_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/bar_cluster_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/bar_cluster_subset_violin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/bar_cluster_subset_violin.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/bar_lineage_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/bar_lineage_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_2_failed_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_2_failed_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_bwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_bwd.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_covariates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_covariates.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_covariates_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_covariates_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_covariates_ratio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_covariates_ratio.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_data_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_data_key.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_gene_symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_gene_symbols.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_leiden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_leiden.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_no_norm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_no_norm.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_random_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_random_state.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/cluster_lineage_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/cluster_lineage_raw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/composition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/composition.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/composition_kwargs_autopct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/composition_kwargs_autopct.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_adjust_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_adjust_text.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_color.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_fontsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_fontsize.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_gene_sets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_gene_sets.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_gene_sets_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_gene_sets_colors.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_return_ax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_return_ax.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/driver_corr_use_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/driver_corr_use_raw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/drivers_ascending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/drivers_ascending.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/drivers_backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/drivers_backward.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/drivers_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/drivers_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/drivers_n_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/drivers_n_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/drivers_title_fmt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/drivers_title_fmt.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/failed_only_main_diagonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/failed_only_main_diagonal.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/failed_only_off_diagonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/failed_only_off_diagonal.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_cluster_fates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_cluster_fates.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_empty_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_empty_model.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_gene_trends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_gene_trends.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_heatmap/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_heatmap/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_heatmap/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_heatmap/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_heatmap/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_heatmap/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_ignore_plot_smoothed_lineage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_ignore_plot_smoothed_lineage.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_model_cells_with_weights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_model_cells_with_weights.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_model_conf_int.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_model_conf_int.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_model_conf_int_no_conf_int_computed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_model_conf_int_no_conf_int_computed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/fitted_model_weights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/fitted_model_weights.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_alpha.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_cluster_ascending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_cluster_ascending.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_cluster_descending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_cluster_descending.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_clusters_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_clusters_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_explicit_cluster_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_explicit_cluster_order.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_min_flow_keep_empty_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_min_flow_keep_empty_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_min_flow_remove_empty_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_min_flow_remove_empty_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_no_xticks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_no_xticks.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_return_ax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_return_ax.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_source_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_source_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/flow_time_categories_too_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/flow_time_categories_too_close.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gamr_ci_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gamr_ci_50.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gamr_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gamr_default.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gamr_lineage_prob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gamr_lineage_prob.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gamr_no_cbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gamr_no_cbar.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gamr_no_ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gamr_no_ci.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_init_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_init_dist.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_no_annot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_no_annot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_no_cbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_no_cbar.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_no_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_no_order.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_stat_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_stat_dist.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_stat_init_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_stat_init_dist.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_coarse_T_xtick_rot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_coarse_T_xtick_rot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_complex_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_complex_spectrum.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_real_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_real_spectrum.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_real_spectrum_hide_eigengap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_real_spectrum_hide_eigengap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_schur_matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_schur_matrix.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_schur_matrix_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_schur_matrix_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_schur_matrix_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_schur_matrix_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_spectrum_evals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_spectrum_evals.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_spectrum_evals_complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_spectrum_evals_complex.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/gpcca_spectrum_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/gpcca_spectrum_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_fate_probs/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_key_no_fate_probs/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cluster_no_scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cluster_no_scale.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_fate_probs_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_fate_probs_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_fate_probs_lineages/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_gene_symbols/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_gene_symbols/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_gene_symbols/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_gene_symbols/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_gene_symbols/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_gene_symbols/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_genes_1_gene_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_genes_1_gene_failed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_keep_gene_order/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineage_height/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineage_height/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineage_height/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineage_height/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineage_height/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineage_height/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_1_lineage_failed/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_1_lineage_failed/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_1_lineage_failed/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_1_lineage_failed/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_bwd/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_bwd/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_bwd/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_bwd/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_raw/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_raw/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_raw/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_raw/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_lineages_raw/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_lineages_raw/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_multiple_cluster_keys_show_all_genes/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cbar_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cbar_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cbar_lineages/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_cluster_genes/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_convolve/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_convolve/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_convolve/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_convolve/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_convolve/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_convolve/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_scale_genes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_scale_genes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_no_scale_lineages/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_show_dendrogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_show_dendrogram.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_time_range/lineage_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_time_range/lineage_0.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_time_range/lineage_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_time_range/lineage_1.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/heatmap_time_range/lineage_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/heatmap_time_range/lineage_2.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_basis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_basis.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_ixs_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_ixs_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_kwargs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_kwargs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_line_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_line_alpha.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_line_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_line_width.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_params.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/kernel_random_walk_start_ixs_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/kernel_random_walk_start_ixs_range.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_alpha.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_bwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_bwd.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_categorical_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_categorical_keys.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_continuous_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_continuous_keys.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_fontsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_fontsize.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_jitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_jitter.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_kwargs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_kwargs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_kwargs_return_ax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_kwargs_return_ax.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_kwargs_return_axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_kwargs_return_axes.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_layer.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_multiple_threshold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_multiple_threshold.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_ncols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_ncols.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_rest.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_size.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_threshold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_threshold.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_threshold_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_threshold_color.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_use_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_use_raw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/log_odds_xticks_steps_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/log_odds_xticks_steps_size.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_complex_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_complex_spectrum.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_kwargs_linewidths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_kwargs_linewidths.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_marker.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_real_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_real_spectrum.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_real_spectrum_hide_eigengap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_real_spectrum_hide_eigengap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_real_spectrum_hide_xticks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_real_spectrum_hide_xticks.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_spectrum.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_spectrum_evals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_spectrum_evals.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_spectrum_evals_complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_spectrum_evals_complex.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mc_spectrum_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mc_spectrum_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_clustermap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_clustermap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_clustermap_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_clustermap_format.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_format.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_lineages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_lineages.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/mode_heatmap_xticks_rotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/mode_heatmap_xticks_rotation.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_1_lineage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_1_lineage.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_default.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_default_bwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_default_bwd.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_no_legend.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_no_lineage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_no_lineage.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_no_lineage_show_lin_probs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_no_lineage_show_lin_probs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_obs_data_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_obs_data_key.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_show_lin_prob_cells_ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_show_lin_prob_cells_ci.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/model_show_lin_prob_cells_lineage_ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/model_show_lin_prob_cells_lineage_ci.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/msc_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/msc_default.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/msc_labelrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/msc_labelrot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/msc_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/msc_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/msc_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/msc_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/msc_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/msc_width.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_lineage_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_lineage_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_embedding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_embedding.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_legend_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_legend_position.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_legend_position_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_legend_position_out.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_legend_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_legend_simple.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_no_legend.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_only_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_only_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_only_fate_prob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_only_fate_prob.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/paga_pie_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/paga_pie_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_autopct_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_autopct_none.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_legend_kwargs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_legend_kwargs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_legend_loc_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_legend_loc_one.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_reduction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_reduction.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_t.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/pie_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/pie_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/plot_tsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/plot_tsi.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_default_ordering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_default_ordering.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_dont_normalize_by_mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_dont_normalize_by_mean.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_duplicate_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_duplicate_keys.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_extra_keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_extra_keys.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_hide_edges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_hide_edges.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_key_added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_key_added.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_labeldistance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_labeldistance.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_labelrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_labelrot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_ncols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_ncols.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_no_cbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_no_cbar.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_scvelo_kwargs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_scvelo_kwargs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_text_kwargs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_text_kwargs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/proj_use_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/proj_use_raw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_connectivity_kernel_emb_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_connectivity_kernel_emb_stream.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_final_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_final_states.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_final_states_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_final_states_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_not_same.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_not_same.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_same_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_same_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_same_no_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_fate_probs_cont_same_no_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_cluster_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_cluster_key.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_discrete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_discrete.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_lineages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_lineages.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_no_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_no_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_time.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_final_states_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_final_states_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_cluster_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_cluster_key.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_discrete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_discrete.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_lineages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_lineages.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_no_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_no_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_time.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_gpcca_meta_states_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_gpcca_meta_states_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_lin_probs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_lin_probs.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_lin_probs_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_lin_probs_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_lin_probs_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_lin_probs_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_lin_probs_lineages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_lin_probs_lineages.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_lin_probs_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_lin_probs_time.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_pseudotime_kernel_hard_threshold_emb_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_pseudotime_kernel_hard_threshold_emb_stream.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_pseudotime_kernel_soft_threshold_emb_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_pseudotime_kernel_soft_threshold_emb_stream.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_transition_matrix_projection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_transition_matrix_projection.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/scvelo_velocity_kernel_emb_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/scvelo_velocity_kernel_emb_stream.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose_all_models_for_1_gene_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose_all_models_for_1_gene_failed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose_all_models_for_1_lineage_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose_all_models_for_1_lineage_failed.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose_all_models_for_1_lineage_failed_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose_all_models_for_1_lineage_failed_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose_failed_only_off_diagonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose_failed_only_off_diagonal.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/transpose_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/transpose_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_bwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_bwd.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_cell_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_cell_alpha.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_conf_int.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_conf_int.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_fate_prob_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_fate_prob_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gam_ci_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gam_ci_100.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gam_ci_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gam_ci_20.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gene_as_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gene_as_title.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gene_legend_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gene_legend_out.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gene_no_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gene_no_legend.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_gene_symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_gene_symbols.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_hide_cells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_hide_cells.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_alpha.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_cell_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_cell_color.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_cell_color_clusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_cell_color_clusters.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_cell_color_clusters_obs_legend_loc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_cell_color_clusters_obs_legend_loc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_cell_color_gene.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_cell_color_gene.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lineage_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lineage_cmap.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_lw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_lw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_margins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_margins.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_no_cbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_no_cbar.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_perc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_perc.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_perc_per_lineage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_perc_per_lineage.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_raw.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_sharex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_sharex.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_sharey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_sharey.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_show_lineage_ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_show_lineage_ci.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_show_lineage_diff_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_show_lineage_diff_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_show_lineage_ignores_no_transpose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_show_lineage_ignores_no_transpose.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_show_lineage_same_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_show_lineage_same_plot.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_size.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_suptitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_suptitle.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_time_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_time_key.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_time_key_del_latent_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_time_key_del_latent_time.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/trends_time_range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/trends_time_range.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/violin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/violin.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/violin_cluster_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/violin_cluster_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/violin_lineage_subset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/violin_lineage_subset.png -------------------------------------------------------------------------------- /tests/_ground_truth_figures/violin_no_cluster_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theislab/cellrank/ce69c5f5c637c838193a11160c22fdd3cd0007db/tests/_ground_truth_figures/violin_no_cluster_key.png -------------------------------------------------------------------------------- /tests/test_lineage_drivers.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | import numpy as np 4 | import pandas as pd 5 | 6 | from cellrank._utils._key import Key 7 | from cellrank.estimators import GPCCA 8 | 9 | 10 | class TestLineageDrivers: 11 | @pytest.mark.parametrize("use_raw", [False, True]) 12 | def test_normal_run(self, g: GPCCA, use_raw: bool): 13 | key = Key.varm.lineage_drivers(False) 14 | names = g.fate_probabilities.names 15 | if use_raw: 16 | g.adata.raw = g.adata.copy() 17 | 18 | g.compute_lineage_drivers(use_raw=use_raw) 19 | 20 | adata = g.adata.raw if use_raw else g.adata 21 | 22 | assert isinstance(adata.varm[key], pd.DataFrame) 23 | for name in names: 24 | assert np.all(adata.varm[key][f"{name}_corr"] >= -1.0) 25 | assert np.all(adata.varm[key][f"{name}_corr"] <= 1.0) 26 | 27 | assert np.all(adata.varm[key][f"{name}_qval"] >= 0) 28 | assert np.all(adata.varm[key][f"{name}_qval"] <= 1.0) 29 | 30 | def test_invalid_method(self, g: GPCCA): 31 | with pytest.raises(ValueError, match=r".*foobar.*"): 32 | g.compute_lineage_drivers(method="foobar") 33 | 34 | def test_invalid_n_perms_value(self, g: GPCCA): 35 | with pytest.raises(ValueError, match=r".*n_perms.*"): 36 | g.compute_lineage_drivers(n_perms=0, method="perm_test") 37 | 38 | def test_seed_reproducible(self, g: GPCCA): 39 | res_a = g.compute_lineage_drivers( 40 | n_perms=10, 41 | n_jobs=1, 42 | seed=0, 43 | method="perm_test", 44 | ) 45 | res_b = g.compute_lineage_drivers( 46 | n_perms=10, 47 | n_jobs=1, 48 | seed=0, 49 | method="perm_test", 50 | ) 51 | res_diff_seed = g.compute_lineage_drivers( 52 | n_perms=10, 53 | n_jobs=1, 54 | seed=1, 55 | method="perm_test", 56 | ) 57 | 58 | assert res_a is not res_b 59 | np.testing.assert_array_equal(res_a.index, res_b.index) 60 | np.testing.assert_array_equal(res_a.columns, res_b.columns) 61 | np.testing.assert_allclose(res_a.values, res_b.values) 62 | 63 | assert not np.allclose(res_a.values, res_diff_seed.values) 64 | 65 | def test_seed_reproducible_parallel(self, g: GPCCA): 66 | res_a = g.compute_lineage_drivers( 67 | n_perms=10, 68 | n_jobs=2, 69 | backend="threading", 70 | seed=42, 71 | method="perm_test", 72 | ) 73 | res_b = g.compute_lineage_drivers( 74 | n_perms=10, 75 | n_jobs=2, 76 | backend="threading", 77 | seed=42, 78 | method="perm_test", 79 | ) 80 | 81 | assert res_a is not res_b 82 | np.testing.assert_array_equal(res_a.index, res_b.index) 83 | np.testing.assert_array_equal(res_a.columns, res_b.columns) 84 | np.testing.assert_allclose(res_a.values, res_b.values) 85 | 86 | def test_confidence_level(self, g: GPCCA): 87 | res_narrow = g.compute_lineage_drivers(confidence_level=0.95) 88 | res_wide = g.compute_lineage_drivers(confidence_level=0.99) 89 | 90 | for name in ["0", "1"]: 91 | assert np.all(res_narrow[f"{name}_ci_low"] >= res_wide[f"{name}_ci_low"]) 92 | assert np.all(res_narrow[f"{name}_ci_high"] <= res_wide[f"{name}_ci_high"]) 93 | -------------------------------------------------------------------------------- /tests/test_logging.py: -------------------------------------------------------------------------------- 1 | # modified from: https://github.com/theislab/scanpy/blob/master/scanpy/tests/test_logging.py 2 | import datetime 3 | import io 4 | import sys 5 | 6 | import pytest 7 | 8 | from scanpy import Verbosity 9 | 10 | from cellrank import logging as logg 11 | from cellrank import settings 12 | 13 | 14 | @pytest.fixture 15 | def logging_state(): # noqa: PT004 16 | verbosity_orig = settings.verbosity 17 | yield 18 | settings.logfile = sys.stderr 19 | settings.verbosity = verbosity_orig 20 | 21 | 22 | class TestLogging: 23 | def test_formats(self, capsys, logging_state): 24 | settings.logfile = sys.stderr 25 | settings.verbosity = Verbosity.debug 26 | logg.error("0") 27 | assert capsys.readouterr().err == "ERROR: 0\n" 28 | logg.warning("1") 29 | assert capsys.readouterr().err == "WARNING: 1\n" 30 | logg.info("2") 31 | assert capsys.readouterr().err == "2\n" 32 | logg.hint("3") 33 | assert capsys.readouterr().err == "--> 3\n" 34 | # TODO: this still uses scanpy's logger, but in e.g. notebooks it's fine 35 | # logg.debug("4") 36 | # assert capsys.readouterr().err == "DEBUG: 4\n" 37 | 38 | def test_deep(self, capsys, logging_state): 39 | settings.logfile = sys.stderr 40 | settings.verbosity = Verbosity.hint 41 | logg.hint("0") 42 | assert capsys.readouterr().err == "--> 0\n" 43 | logg.hint("1", deep="1!") 44 | assert capsys.readouterr().err == "--> 1\n" 45 | settings.verbosity = Verbosity.debug 46 | logg.hint("2") 47 | assert capsys.readouterr().err == "--> 2\n" 48 | logg.hint("3", deep="3!") 49 | assert capsys.readouterr().err == "--> 3: 3!\n" 50 | 51 | def test_logfile(self, tmp_path, logging_state): 52 | settings.verbosity = Verbosity.hint 53 | 54 | buffer = io.StringIO() 55 | settings.logfile = buffer 56 | assert settings.logfile is buffer 57 | assert settings.logpath is None 58 | logg.error("test!") 59 | assert buffer.getvalue() == "ERROR: test!\n" 60 | 61 | p = tmp_path / "test.log" 62 | settings.logpath = p 63 | assert settings.logpath == p 64 | assert settings.logfile.name == str(p) 65 | logg.hint("test2") 66 | logg.debug("invisible") 67 | assert settings.logpath.read_text() == "--> test2\n" 68 | 69 | def test_timing(self, monkeypatch, capsys, logging_state): 70 | import cellrank.logging._logging as logg 71 | 72 | class IncTime: 73 | def __init__(self): 74 | self.counter = 0 75 | 76 | def now(self, tz): 77 | self.counter += 1 78 | return datetime.datetime(2000, 1, 1, second=self.counter, microsecond=self.counter, tzinfo=tz) 79 | 80 | @property 81 | def datetime(self) -> "IncTime": 82 | return self 83 | 84 | @property 85 | def timezone(self): 86 | return datetime.timezone 87 | 88 | settings.logfile = sys.stderr 89 | t = IncTime() 90 | monkeypatch.setattr(logg, "datetime", t) 91 | settings.verbosity = Verbosity.debug 92 | 93 | logg.hint("1") 94 | assert t.counter == 1 95 | assert capsys.readouterr().err == "--> 1\n" 96 | start = logg.info("2") 97 | assert t.counter == 2 98 | assert capsys.readouterr().err == "2\n" 99 | logg.hint("3") 100 | assert t.counter == 3 101 | assert capsys.readouterr().err == "--> 3\n" 102 | logg.info("4", time=start) 103 | assert t.counter == 4 104 | assert capsys.readouterr().err == "4 (0:00:02)\n" 105 | logg.info("5 {time_passed}", time=start) 106 | assert t.counter == 5 107 | assert capsys.readouterr().err == "5 0:00:03\n" 108 | -------------------------------------------------------------------------------- /tests/test_random_walk.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | import numpy as np 4 | 5 | from anndata import AnnData 6 | 7 | from cellrank.kernels.utils import RandomWalk 8 | 9 | 10 | class TestRandomWalk: 11 | def test_matrix_not_row_stochastic(self, test_matrix_4: np.ndarray): 12 | with pytest.raises(ValueError, match=r"Transition matrix is not row-stochastic."): 13 | _ = RandomWalk(AnnData(test_matrix_4), test_matrix_4) 14 | 15 | def test_starting_dist_does_not_sum_to_1(self, test_matrix_1: np.ndarray): 16 | adata = AnnData(test_matrix_1) 17 | with pytest.raises(IndexError, match=r"1000"): 18 | _ = RandomWalk(adata, test_matrix_1, start_ixs=[1000]) 19 | 20 | @pytest.mark.parametrize("kind", ["simulations", "iterations", "hits"]) 21 | def test_invalid_numbers(self, test_matrix_1: np.ndarray, kind: str): 22 | rw = RandomWalk(AnnData(test_matrix_1), test_matrix_1) 23 | with pytest.raises(ValueError, match=kind): # noqa: PT012 24 | if kind == "simulations": 25 | rw.simulate_many(n_sims=0) 26 | elif kind == "iterations": 27 | rw.simulate_one(max_iter=1) 28 | elif kind == "hits": 29 | rw.simulate_one(successive_hits=-1) 30 | else: 31 | raise NotImplementedError(kind) 32 | 33 | @pytest.mark.parametrize("n_sims", [1, 10]) 34 | def test_reproducibility(self, test_matrix_1: np.ndarray, n_sims: int): 35 | rw1 = RandomWalk(AnnData(test_matrix_1), test_matrix_1) 36 | rw2 = RandomWalk(AnnData(test_matrix_1), test_matrix_1) 37 | 38 | if n_sims == 1: 39 | r1, r2 = rw1.simulate_one(seed=42), rw2.simulate_one(seed=42) 40 | else: 41 | r1, r2 = rw1.simulate_many(10, seed=42), rw2.simulate_many(10, seed=42) 42 | 43 | np.testing.assert_array_equal(r1, r2) 44 | 45 | def test_simulate_one(self, test_matrix_1: np.ndarray): 46 | res = RandomWalk(AnnData(test_matrix_1), test_matrix_1).simulate_one(max_iter=10) 47 | 48 | assert isinstance(res, np.ndarray) 49 | assert np.issubdtype(res.dtype, np.integer) 50 | np.testing.assert_array_equal(res.shape, (11,)) 51 | 52 | def test_start_ixs(self, test_matrix_1: np.ndarray): 53 | adata = AnnData(test_matrix_1) 54 | res = RandomWalk(adata, test_matrix_1, start_ixs=[1]).simulate_one(max_iter=10) 55 | 56 | assert res[0] == 1 57 | 58 | def test_stop_ixs(self, test_matrix_1: np.ndarray): 59 | adata = AnnData(test_matrix_1) 60 | res = RandomWalk(adata, test_matrix_1, stop_ixs=[1]).simulate_one(max_iter=1000, seed=42) 61 | 62 | assert len(res) <= 1001 63 | assert res[-1] == 1 64 | assert res[-2] != 1 65 | 66 | def test_successive_hits(self, test_matrix_1: np.ndarray): 67 | adata = AnnData(test_matrix_1) 68 | test_matrix_1[0, 0] = 0.2 69 | test_matrix_1[0, 2] = 0.0 70 | res = RandomWalk(adata, test_matrix_1, stop_ixs=[0]).simulate_one(max_iter=1000, seed=42, successive_hits=1) 71 | 72 | assert len(res) <= 1001 73 | assert res[-1] == 0 74 | assert res[-2] == 0 75 | assert res[-3] != 0 76 | 77 | @pytest.mark.parametrize("n_jobs", [1, 2]) 78 | @pytest.mark.parametrize("backend", ["threading", "loky"]) 79 | def test_simulate_many(self, test_matrix_1: np.ndarray, backend: str, n_jobs: int): 80 | res = RandomWalk(AnnData(test_matrix_1), test_matrix_1).simulate_many( 81 | 10, max_iter=100, seed=42, backend=backend, n_jobs=n_jobs 82 | ) 83 | 84 | assert isinstance(res, list) 85 | assert len(res) == 10 86 | for i, r in enumerate(res): 87 | assert isinstance(r, np.ndarray), i 88 | assert np.issubdtype(r.dtype, np.integer), i 89 | np.testing.assert_array_equal(r.shape, (101,)) 90 | --------------------------------------------------------------------------------