← Về thư mục
tests/scvelo/test_scripts.py
- synthetic · function · L65-L85 — def synthetic(n_obs: int = N_OBS, n_vars: int = N_VARS, seed: int = 0)
- FigureRecorder · class · L88-L123 — class FigureRecorder
- init · method · L91-L92 — def init(self) -> None
- stub · method · L94-L98 — def stub(self, name: str)
- record · function · L95-L96 — def record(adata=None, args, *kwargs)
- install · method · L100-L109 — def install(self, test: unittest.TestCase) -> None
- names · method · L112-L113 — def names(self) -> list[str]
- saved · method · L116-L117 — def saved(self) -> list[str]
- kwargs_for · method · L119-L123 — def kwargs_for(self, name: str) -> dict
- LayerRequirementTests · class · L126-L154 — class LayerRequirementTests(unittest.TestCase)
- setUp · method · L129-L132 — def setUp(self) -> None
- run_on · method · L134-L136 — def run_on(self, adata)
- test_a_missing_spliced_layer_is_refused_before_any_work · method · L138-L142 — def test_a_missing_spliced_layer_is_refused_before_any_work(self) -> None
- test_a_missing_unspliced_layer_is_refused · method · L144-L148 — def test_a_missing_unspliced_layer_is_refused(self) -> None
- test_the_message_names_the_tool_that_produces_the_layers · method · L150-L154 — def test_the_message_names_the_tool_that_produces_the_layers(self) -> None
- VelocityRunTests · class · L157-L270 — class VelocityRunTests(unittest.TestCase)
- setUpClass · method · L163-L196 — def setUpClass(cls) -> None
- test_the_input_object_is_annotated_in_place · method · L198-L199 — def test_the_input_object_is_annotated_in_place(self) -> None
- test_the_gene_set_is_narrowed_to_the_requested_top_genes · method · L201-L205 — def test_the_gene_set_is_narrowed_to_the_requested_top_genes(self) -> None: # 40 genes in, 15 requested: the count is decided by the HVG step, which # is exactly what the scVelo 0.3 preprocessing change moved to Scanpy.
- test_the_moments_and_velocity_layers_are_added · method · L207-L210 — def test_the_moments_and_velocity_layers_are_added(self) -> None
- test_at_least_one_gene_has_a_usable_velocity · method · L212-L216 — def test_at_least_one_gene_has_a_usable_velocity(self) -> None: # Genes scVelo rejects are left as NaN; an all-NaN layer would mean the # run produced nothing to plot or rank.
- test_the_downstream_per_cell_annotations_are_present · method · L218-L221 — def test_the_downstream_per_cell_annotations_are_present(self) -> None
- test_the_confidences_stay_inside_their_definition · method · L223-L227 — def test_the_confidences_stay_inside_their_definition(self) -> None: # velocity_confidence is a cosine correlation, so it cannot leave [-1, 1].
- test_driver_genes_are_ranked_because_the_grouping_column_exists · method · L229-L230 — def test_driver_genes_are_ranked_because_the_grouping_column_exists(self) -> None
- test_a_non_dynamical_run_skips_the_dynamical_only_results · method · L232-L234 — def test_a_non_dynamical_run_skips_the_dynamical_only_results(self) -> None
- test_the_annotated_object_round_trips_through_the_saved_h5ad · method · L236-L242 — def test_the_annotated_object_round_trips_through_the_saved_h5ad(self) -> None
- test_the_four_always_on_figures_are_requested · method · L244-L254 — def test_the_four_always_on_figures_are_requested(self) -> None: # Stream plot, arrow plot, pseudotime, and the speed/coherence pair.
- test_the_embedding_figures_use_the_umap_basis_and_the_grouping · method · L256-L259 — def test_the_embedding_figures_use_the_umap_basis_and_the_grouping(self) -> None
- test_every_figure_is_written_inside_the_output_directory · method · L261-L265 — def test_every_figure_is_written_inside_the_output_directory(self) -> None
- test_the_summary_reports_the_cell_and_gene_counts_it_finished_with · method · L267-L270 — def test_the_summary_reports_the_cell_and_gene_counts_it_finished_with(self) -> None
- StepOrderTests · class · L273-L382 — class StepOrderTests(unittest.TestCase)
- setUp · method · L276-L325 — def setUp(self) -> None
- record · function · L285-L291 — def record(name, effect=None)
- stub · function · L286-L289 — def stub(adata, args, *kwargs)
- add_velocity · function · L293-L294 — def add_velocity(adata)
- add_confidence · function · L296-L303 — def add_confidence(adata): # Half the cells at 0.9 and half at 0.5: mean 0.700, and exactly # half above the 0.7 high-confidence cut used by the summary.
- add_fits · function · L305-L306 — def add_fits(adata)
- add_pseudotime · function · L308-L309 — def add_pseudotime(adata)
- add_latent_time · function · L311-L312 — def add_latent_time(adata)
- analyse · method · L327-L337 — def analyse(self, **kwargs) -> str
- test_the_dynamical_model_recovers_dynamics_before_estimating · method · L339-L344 — def test_the_dynamical_model_recovers_dynamics_before_estimating(self) -> None: # Reversed,
velocity(mode="dynamical") has no fitted parameters to use.
- test_the_dynamical_model_adds_latent_time_and_the_driver_heatmap · method · L346-L353 — def test_the_dynamical_model_adds_latent_time_and_the_driver_heatmap(self) -> None
- test_a_stochastic_run_skips_the_dynamical_only_steps · method · L355-L360 — def test_a_stochastic_run_skips_the_dynamical_only_steps(self) -> None
- test_gene_ranking_needs_the_grouping_column · method · L362-L364 — def test_gene_ranking_needs_the_grouping_column(self) -> None
- test_an_absent_grouping_column_skips_ranking_instead_of_failing · method · L366-L368 — def test_an_absent_grouping_column_skips_ranking_instead_of_failing(self) -> None
- test_the_summary_statistics_are_computed_over_the_confidences · method · L370-L377 — def test_the_summary_statistics_are_computed_over_the_confidences(self) -> None
- test_the_output_directory_is_created_before_anything_is_written · method · L379-L382 — def test_the_output_directory_is_created_before_anything_is_written(self) -> None
- ModeValidationTests · class · L385-L400 — class ModeValidationTests(unittest.TestCase)
- test_an_unknown_mode_is_rejected_by_scvelo · method · L386-L400 — def test_an_unknown_mode_is_rejected_by_scvelo(self) -> None: # The script forwards
mode verbatim, so a typo must surface as an # error naming the allowed estimators rather than as silent nonsense.