Chain: all events -> leukocytes (scatter) -> single cells -> live -> CD45+. Each step degrades gracefully: a missing viability dye or missing CD45 skips that step with a warning rather than aborting, because a panel that lacks one is still analysable.
Usage
apply_gate_hierarchy(
rd,
cofactor,
cfg = list(),
control_ref = NULL,
singlet_k = 3,
viability_name = NULL,
cd45_name = "CD45",
transform = NULL,
overrides = NULL,
autofix = FALSE,
adaptive = FALSE
)Arguments
- rd
The rd.
- cofactor
Arcsinh cofactor. See
derive_cofactor().- cfg
The cfg. Default
list().- control_ref
The control ref.
- singlet_k
The singlet k. Default
3.- viability_name
The viability name.
- cd45_name
The cd45 name. Default
"CD45".- transform
Intensity transform from
make_transform(). Defaults to arcsinh withcofactor, which is what every caller got before the transform became selectable.- overrides
Optional per-marker override entries for THIS sample, as returned by indexing the config's
sample_overridesblock by sample id. Seesample_override(). Absent by default, in which case every threshold is derived exactly as before.- autofix
Skip a hierarchy gate whose threshold came from
quantile_fallback, carrying its parent through unchanged. Such a gate has its retention decided by the fallback constant rather than by the data, so it keeps a fixed share of the parent whatever the sample holds.FALSEby default, because skipping a gate changes every count in an affected file. Seegate_needs_autofix().- adaptive
Sweep the kernel bandwidth and try the tail and Otsu rules before falling back to a quantile, for both hierarchy gates. See
best_threshold().FALSEby default, because it moves thresholds.
