diff --git a/.gitignore b/.gitignore index 40b5bbb5a..230d97df0 100644 --- a/.gitignore +++ b/.gitignore @@ -154,3 +154,4 @@ packages.dot # plotting tests tests/plotting/actual_figures/ +tests/plotting/figures/ diff --git a/docs/conf.py b/docs/conf.py index 07a38842b..98d7c7237 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -119,7 +119,7 @@ tippy_enable_mathjax = True # no need because of sphinxcontrib-bibtex tippy_enable_doitips = False - +linkcheck_report_timeouts_as_broken = True linkcheck_ignore = [ # 403 Client Error r"https://doi.org/10.1126/science.aad0501", diff --git a/src/moscot/problems/space/_mapping.py b/src/moscot/problems/space/_mapping.py index 6042a314e..8d4a0cb67 100644 --- a/src/moscot/problems/space/_mapping.py +++ b/src/moscot/problems/space/_mapping.py @@ -174,8 +174,8 @@ def prepare( - :attr:`spatial_key` - key in :attr:`~anndata.AnnData.obsm` where the spatial coordinates are stored. - :attr:`batch_key` - key in :attr:`~anndata.AnnData.obs` where batches are stored. - :attr:`stage` - set to ``'prepared'``. - - :attr:`problem_kind` - set to ``'quadratic'`` (if both ``spatial_key`` and ``sc_attr`` are passed) - or ``'linear'`` (if both ``spatial_key`` and ``sc_attr`` are `None`). + - :attr:`problem_kind` - set to ``'quadratic'`` (if both `spatial_key` and `sc_attr` are passed) + or ``'linear'`` (if both `spatial_key` and `sc_attr` are `None`). """ if sc_attr: x = {"attr": "obsm", "key": spatial_key} if isinstance(spatial_key, str) else spatial_key @@ -292,15 +292,15 @@ def solve( Whether to :func:`~jax.jit` the underlying :mod:`ott` solver. min_iterations Minimum number of :term:`(fused) GW ` or :term:`Sinkhorn` iterations, - depending on :attr:`alpha`. + depending on `alpha`. max_iterations Maximum number of :term:`(fused) GW ` or :term:`Sinkhorn` iterations, - depending on :attr:`alpha`. + depending on `alpha`. threshold Convergence threshold of the :term:`GW ` or the :term:`Sinkhorn` algorithm, - depending on :attr:`alpha`. + depending on `alpha`. linear_solver_kwargs - Keyword arguments for the inner :term:`linear problem` solver. Only used when :attr:`alpha` > 0. + Keyword arguments for the inner :term:`linear problem` solver. Only used when `alpha` > 0. device Transfer the solution to a different device, see :meth:`~moscot.base.output.BaseSolverOutput.to`. If :obj:`None`, keep the output on the original device. diff --git a/src/moscot/problems/space/_mixins.py b/src/moscot/problems/space/_mixins.py index a3ca2fbb5..b6cd39538 100644 --- a/src/moscot/problems/space/_mixins.py +++ b/src/moscot/problems/space/_mixins.py @@ -412,20 +412,20 @@ def correlate( # type: ignore[misc] corr_method Correlation method. Valid options are: - - ``'pearson'`` - `Pearson correlation `_. - - ``'spearman'`` - `Spearman's rank correlation - `_. + - ``'pearson'`` - `Pearson correlation `_. + - ``'spearman'`` - `Spearman rank correlation `_. + device Device where to transfer the solutions, see :meth:`~moscot.base.output.BaseSolverOutput.to`. groupby Optional key in :attr:`~anndata.AnnData.obs`, containing categorical annotations for grouping. - batch_size: + batch_size Number of features to process at once. If :obj:`None`, process all features at once. Larger values will require more memory. Returns ------- - Correlation for each solution in :attr:`solutions`. + Correlation for each solution in `solutions`. """ var_sc = self._filter_vars(var_names) if var_sc is None or not len(var_sc): diff --git a/tests/plotting/expected_figures/OutputPlotting_costs.png b/tests/plotting/expected_figures/OutputPlotting_costs.png index b2db9068d..43ce5b45c 100644 Binary files a/tests/plotting/expected_figures/OutputPlotting_costs.png and b/tests/plotting/expected_figures/OutputPlotting_costs.png differ diff --git a/tests/plotting/expected_figures/OutputPlotting_costs_last.png b/tests/plotting/expected_figures/OutputPlotting_costs_last.png index 3ddbb2483..983be022b 100644 Binary files a/tests/plotting/expected_figures/OutputPlotting_costs_last.png and b/tests/plotting/expected_figures/OutputPlotting_costs_last.png differ diff --git a/tests/plotting/expected_figures/OutputPlotting_errors_gw.png b/tests/plotting/expected_figures/OutputPlotting_errors_gw.png index cb9212416..6228f41d5 100644 Binary files a/tests/plotting/expected_figures/OutputPlotting_errors_gw.png and b/tests/plotting/expected_figures/OutputPlotting_errors_gw.png differ diff --git a/tests/plotting/expected_figures/OutputPlotting_errors_sink.png b/tests/plotting/expected_figures/OutputPlotting_errors_sink.png index e266a61c8..3336e0612 100644 Binary files a/tests/plotting/expected_figures/OutputPlotting_errors_sink.png and b/tests/plotting/expected_figures/OutputPlotting_errors_sink.png differ diff --git a/tests/plotting/expected_figures/Plotting_cell_transition-failed-diff.png b/tests/plotting/expected_figures/Plotting_cell_transition-failed-diff.png new file mode 100644 index 000000000..841b940ae Binary files /dev/null and b/tests/plotting/expected_figures/Plotting_cell_transition-failed-diff.png differ diff --git a/tests/plotting/expected_figures/Plotting_cell_transition.png b/tests/plotting/expected_figures/Plotting_cell_transition.png index 24df290be..db290ebeb 100644 Binary files a/tests/plotting/expected_figures/Plotting_cell_transition.png and b/tests/plotting/expected_figures/Plotting_cell_transition.png differ diff --git a/tests/plotting/expected_figures/Plotting_cell_transition_params-failed-diff.png b/tests/plotting/expected_figures/Plotting_cell_transition_params-failed-diff.png new file mode 100644 index 000000000..346d0b1a3 Binary files /dev/null and b/tests/plotting/expected_figures/Plotting_cell_transition_params-failed-diff.png differ diff --git a/tests/plotting/expected_figures/Plotting_cell_transition_params.png b/tests/plotting/expected_figures/Plotting_cell_transition_params.png index 084c28747..63b651bd0 100644 Binary files a/tests/plotting/expected_figures/Plotting_cell_transition_params.png and b/tests/plotting/expected_figures/Plotting_cell_transition_params.png differ diff --git a/tests/plotting/expected_figures/Plotting_pull.png b/tests/plotting/expected_figures/Plotting_pull.png index 8a1b723ae..ad2e84ddc 100644 Binary files a/tests/plotting/expected_figures/Plotting_pull.png and b/tests/plotting/expected_figures/Plotting_pull.png differ diff --git a/tests/plotting/expected_figures/Plotting_push.png b/tests/plotting/expected_figures/Plotting_push.png index 53a307c4c..7cfabd5ad 100644 Binary files a/tests/plotting/expected_figures/Plotting_push.png and b/tests/plotting/expected_figures/Plotting_push.png differ diff --git a/tests/plotting/expected_figures/Plotting_sankey.png b/tests/plotting/expected_figures/Plotting_sankey.png index 1a3140974..c72321ab9 100644 Binary files a/tests/plotting/expected_figures/Plotting_sankey.png and b/tests/plotting/expected_figures/Plotting_sankey.png differ diff --git a/tests/plotting/expected_figures/Plotting_sankey_params.png b/tests/plotting/expected_figures/Plotting_sankey_params.png index 83b4cbb22..45e888120 100644 Binary files a/tests/plotting/expected_figures/Plotting_sankey_params.png and b/tests/plotting/expected_figures/Plotting_sankey_params.png differ diff --git a/tests/plotting/figures/Plotting_cell_transition.png b/tests/plotting/figures/Plotting_cell_transition.png deleted file mode 100644 index ce75fa7cd..000000000 Binary files a/tests/plotting/figures/Plotting_cell_transition.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_cell_transition_params.png b/tests/plotting/figures/Plotting_cell_transition_params.png deleted file mode 100644 index 636b25fe5..000000000 Binary files a/tests/plotting/figures/Plotting_cell_transition_params.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_pull-failed-diff.png b/tests/plotting/figures/Plotting_pull-failed-diff.png deleted file mode 100644 index 666d168a6..000000000 Binary files a/tests/plotting/figures/Plotting_pull-failed-diff.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_pull.png b/tests/plotting/figures/Plotting_pull.png deleted file mode 100644 index b7f4b0b6e..000000000 Binary files a/tests/plotting/figures/Plotting_pull.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_push-failed-diff.png b/tests/plotting/figures/Plotting_push-failed-diff.png deleted file mode 100644 index 6ce251bd7..000000000 Binary files a/tests/plotting/figures/Plotting_push-failed-diff.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_push.png b/tests/plotting/figures/Plotting_push.png deleted file mode 100644 index ff69958f7..000000000 Binary files a/tests/plotting/figures/Plotting_push.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_sankey.png b/tests/plotting/figures/Plotting_sankey.png deleted file mode 100644 index a44131add..000000000 Binary files a/tests/plotting/figures/Plotting_sankey.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_sankey_params-failed-diff.png b/tests/plotting/figures/Plotting_sankey_params-failed-diff.png deleted file mode 100644 index 63af5b026..000000000 Binary files a/tests/plotting/figures/Plotting_sankey_params-failed-diff.png and /dev/null differ diff --git a/tests/plotting/figures/Plotting_sankey_params.png b/tests/plotting/figures/Plotting_sankey_params.png deleted file mode 100644 index 83b4cbb22..000000000 Binary files a/tests/plotting/figures/Plotting_sankey_params.png and /dev/null differ