quadsv.comparators

Contents

quadsv.comparators#

quadsv.comparators — cross-sample spatial-pattern comparison.

Subpackage grouping the layer-4 public classes:

  • ComparatorIrregular — wraps a sequence of anndata.AnnData (irregular spots, NUFFT backend).

  • ComparatorGrid — wraps a sequence of spatialdata.SpatialData (regular rasterized bins, FFT backend).

Both classes share the same post-compute_spectra surface (normalize_background, normalize_covariates, test_diff_freq, test_diff_expr, effective_rank) through the private _ComparatorBase mixin. Cross-sample contrasts are supplied at test time via the design argument on the test methods — the comparator itself is design-agnostic, so one fitted comparator can serve any number of unrelated contrasts on the same spectra. The shape-only frequency test is available via a normalize_shape: bool = False keyword on test_diff_freq() (forwarded to the standalone compare_* function).

The array-level primitives (spectrum compute, radial binning, rotation alignment, statistical tests) live in quadsv.comparators.multisample.

Submodules#