RSS QC update: mafCutoff, AF complement on swap, kriging, qcMethod -> zMismatchQc#516
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.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.alleleFlipKriging(off by default).none) acrossrssAnalysisPipeline,summaryStatsQc, the three colocboost entry points,colocWrapper, and both twas sumstat pipelines.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 manualsusie_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 passqcMethodand need to adoptzMismatchQc; that protocol change is out of scope here.