Treatment-forensics report: bootstrap-CI association plus clonal timing
Source:R/treatment-report.R
ms_treatment_report.RdAdjudicates which governed therapy class associates which officially recognised signature in a fitted cohort. Point estimates delegate to the public fit face; interval estimates ride the public bootstrap face ([ms_fit_bootstrap()]) – this module never reimplements a resampler. Without treatment records the association face degrades honestly (empty table plus attestation) instead of fabricating groups; without clonality records the timing face does the same.
Usage
ms_treatment_report(
catalog,
treatments = NULL,
clonality = NULL,
exposure_map = NULL,
n_boot = 200,
seed = 1,
build = "GRCh37",
method = "nnls"
)Arguments
- catalog
An [MsCatalog] in SBS96 channel space.
- treatments
`NULL` or a data.frame with columns `sample` (catalog ids) and `treatment` (a governed class label or `NA` for unexposed).
- clonality
`NULL` or a data.frame with columns `sample`, `signature` and `clonal_fraction` in `[0, 1]`, covering every sample x governed- signature cell exactly once.
- exposure_map
`NULL` for the governed default map, or a named list binding therapy classes to bundled-refdb signature labels.
- n_boot
Bootstrap replicate count (delegated scalar gate).
- seed
Bootstrap master seed (delegated scalar gate).
- build
Reference build for the bundled refdb dictionary.
- method
Fit method (delegated to [ms_fit_bootstrap()]).
Value
An object of class `MsTreatmentReport`. [as.data.frame()][as.data.frame.MsTreatmentReport] yields the association table (`treatment`, `signature`, `n_exposed`, `n_unexposed`, `prevalence_exposed`, `prevalence_unexposed`, `mean_exposed`, `mean_unexposed`, `contrast`, `contrast_lower`, `contrast_upper`, `is_associated`). `is_associated` is an effect-size call: the bootstrap interval must clear zero by the adjudication floor `.MS_TRT_ASSOC_FLOOR` (50 exposure-count units, documented at the constant). The clonal-timing table (attrs `timing`: `treatment`, `signature`, `n_exposed`, `exposure_pre`, `exposure_post`, `pre_lower`, `pre_upper`, `post_lower`, `post_upper`), the degradation ledger (attr `attestation`: `face`, `status`, `detail`) and the run record (attr `provenance`) ride as attributes.