Skip to content

RSS QC update: mafCutoff, AF complement on swap, kriging, qcMethod -> zMismatchQc#516

Merged
danielnachun merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-qc-parity
Jun 12, 2026
Merged

RSS QC update: mafCutoff, AF complement on swap, kriging, qcMethod -> zMismatchQc#516
danielnachun merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-qc-parity

Conversation

@Yining97

Copy link
Copy Markdown
Contributor

Step 2 of the RSS-parity plan, rebased onto the camelCase refactor (#514). Brings the RSS summary-stats path up to the controls the individual-level path already has.

What changes

  • mafCutoff on rssAnalysisPipeline(): filters on the AF-derived MAF (min(af, 1-af)) after harmonization and LD alignment. af drives the MAF; a missing af skips the filter with a warning. maf stays internal, never exported.
  • colToComplement on matchRefPanel(): complements af (1-af) on allele swaps, independent of the beta/z sign-flip path. Default unchanged, so MR/TWAS/mash callers are unaffected.
  • krigingOutlierQc(): new opt-in LD-consistency prefilter, gated by alleleFlipKriging (off by default).
  • qcMethod -> zMismatchQc hard rename (no alias, alpha phase; default none) across rssAnalysisPipeline, summaryStatsQc, the three colocboost entry points, colocWrapper, and both twas sumstat pipelines.
  • Fixes one call site camelCase refactor #514 left calling the removed snake summary_stats_qc (twasMultivariateWeightsSumstatPipeline).

Testing

Run against the modified package with susieR 0.16.4. Full testthat suite: 3072 pass, 0 fail, 22 skip. On chr21 AD_Bellenguez the behavior-preserving config (zMismatchQc='none', maf/kriging off) reproduces the step-1 credible sets exactly (max abs PIP diff 0), matches a manual susie_rss() run, and recovers the 2nd credible set at low min_abs_corr against the previous run.

Follow-up

xqtl-protocol notebooks (rss_analysis.ipynb, colocboost.ipynb) still pass qcMethod and need to adopt zMismatchQc; that protocol change is out of scope here.

Yining97 and others added 3 commits June 12, 2026 12:20
… zMismatchQc

Brings the RSS summary-stats path up to the QC controls the individual path
already has, on top of the camelCase refactor (StatFunGen#514).

- rssAnalysisPipeline() gains mafCutoff, filtering on the AF-derived MAF after
  harmonization and LD alignment. af drives the MAF; a missing af skips the
  filter with a warning. maf stays internal and is never exported.
- matchRefPanel() gains colToComplement, which complements af (1-af) on allele
  swaps. The default is unchanged so non-RSS callers are untouched.
- New opt-in krigingOutlierQc() LD-consistency prefilter (alleleFlipKriging,
  off by default).
- qcMethod renamed to zMismatchQc across rssAnalysisPipeline, summaryStatsQc,
  the colocboost entry points, colocWrapper, and the twas sumstat pipelines.
  No alias (alpha phase); default none.
- Fixes one call site StatFunGen#514 left on the removed snake summary_stats_qc
  (twasMultivariateWeightsSumstatPipeline).

Tested against the modified package with susieR 0.16.4: 3072 pass, 0 fail.
On chr21 AD_Bellenguez the behavior-preserving config reproduces the step-1
credible sets exactly (max abs PIP diff 0) and matches a manual susie_rss run.

xqtl-protocol notebooks still pass qcMethod and need a follow-up to adopt zMismatchQc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@danielnachun danielnachun merged commit a490c86 into StatFunGen:main Jun 12, 2026
5 checks passed
@Yining97 Yining97 deleted the rss-qc-parity branch June 13, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants