Skip to content

Export effect-allele af (not directionless maf) in top_loci (Step 1)#513

Merged
gaow merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-top-loci-af
Jun 10, 2026
Merged

Export effect-allele af (not directionless maf) in top_loci (Step 1)#513
gaow merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-top-loci-af

Conversation

@Yining97

Copy link
Copy Markdown
Contributor

Step 1 of the RSS-parity plan: top_loci exports af (effect-allele frequency,
LD/reference-aligned) instead of directionless maf; MAF becomes internal/derived.

  • af populated only via an explicit af: column-file declaration with a resolvable
    effect allele (else NA + one warning); ambiguous FRQ/AF/allele_frequency/EAF never
    become af; explicit declarations win over MungeSumstats.
  • Fitting unchanged: validated through the xqtl-protocol SoS pipeline on
    chr21:24215031-26405838 (AD_Bellenguez, susieR 0.16.4) — credible sets / PIP identical
    to the 5c729fa base (Jaccard 1.00, PIP corr 1.000); 2nd-CS / min_abs_corr behavior
    unchanged. Only delta is the maf -> af column.
  • Deferred to Step 2 (rss-qc-parity): complement af -> 1 - af on allele swaps
    (a failing demonstration test is staged for that step).

🤖 Generated with Claude Code

Yining97 and others added 3 commits June 10, 2026 14:34
- build_top_loci/.empty_top_loci + post-processing chain: column/arg maf -> af
- susie_rss_pipeline forwards sumstats$af; univariate_analysis_pipeline gains
  optional directional af (exported; maf kept for filtering only)
- load_rss_data: af declared only via explicit column-file mapping, with
  distinct one-time warnings; standardise_sumstats_columns shields explicit
  declarations so they win over MungeSumstats
- misc::maf_from_af() helper; MAF is now internal/derived, never exported
- tests: build_top_loci migration gate -> af; 6 load_rss_data af scenarios
- man pages updated

Verified on chr21:24215031-26405838 (AD_Bellenguez): credible sets / PIP /
purity identical to the base run; only delta is maf -> af.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gaow gaow merged commit c20dbc8 into StatFunGen:main Jun 10, 2026
1 check passed
@Yining97 Yining97 deleted the rss-top-loci-af branch June 11, 2026 14:00
Yining97 added a commit to Yining97/pecotmr that referenced this pull request Jun 11, 2026
…finemapping_fits

The maf->af rename in StatFunGen#513 missed multivariate_analysis_pipeline, which broke
test_multivariate_pipeline.R. The multivariate maf is directionless and only
used for filtering, so leave af unset (top_loci$af = NA) instead of relabeling
it. Added a test.

Pending follow-up: give multivariate_analysis_pipeline its own optional
directional af input so it can export a real af, like univariate does.
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