Skip to contents

The certified artifact-share face of the QC report as its own addressable surface: per sample the share of the fitted exposure carried by the cataloged COSMIC artifact roster (sum of the roster-signed exposures over the dictionary total, the memo section 3 share formula), the positively loaded roster names, the shared denominator, and the frozen `artifact_share_flag` verdict clause ("hit" at `artifact_share >= artifact_share_flag`, "na" when the share is NA). The computation delegates to the same certified block [ms_qc_report()] uses, including the full label-protocol validation (exposure row labels must equal the signature column labels – labels are the only legal matching key, never position).

Usage

ms_qc_roster_share(catalog, signatures, exposures)

Arguments

catalog

An [MsCatalog] in the SBS96 channel space.

signatures

A signature matrix (m x k) in the catalog's SBS96 channel space; required here (this surface has no NA-only mode – use [ms_qc_report()] for the optional share block).

exposures

A k x n count-scale exposure matrix matching `signatures` and the catalog's samples; required.

Value

An `MsQcRosterShare` data.frame, one row per sample, columns in the frozen order `sample`, `exposure_total`, `artifact_share`, `artifact_sigs`, `artifact_flag`.

References

Design memo `vignettes/articles/devlog-2026-10-04-M4-02b-qc-memo.qmd` section 1 (roster) and section 3 (share formula and the declared flag); computation core `R/ms-qc-report.R` (.ms_qc_roster_block: the certified validation face and share loop, and .ms_qc_defaults).