Down-samples every live sample of an [MsCatalog] to a common mutation
burden through Multinomial(depth, counts_j / total_j) — the same
law as the real-data sanity harness. Samples already at or below
`depth` are kept verbatim (never upsampled); zero-total samples stay
zero. Deterministic for a given catalog and seed.
Usage
ms_downsample(catalog, depth = "min", seed = 1)
Arguments
- catalog
An [MsCatalog].
- depth
A positive whole number (the common depth) or the string
`"min"` (use the smallest live-sample total).
- seed
Single finite seed for the multinomial draws.
Value
A new [MsCatalog] with the same channels/labels/samples and a
`downsample` provenance record.