Skip to content

Skip invalid GWAS in focal mode; validate joint GWAS inputs - #418

Closed
kal26 wants to merge 11 commits into
StatFunGen:mainfrom
kal26:fix/skip-gwas-errors
Closed

kal26 wants to merge 11 commits into
StatFunGen:mainfrom
kal26:fix/skip-gwas-errors

Conversation

@kal26

@kal26 kal26 commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Joint mode: filter to valid GWAS studies; skip joint analysis if none are valid.
  • Separate (focal) mode: skip invalid GWAS studies and continue; catch and log errors per study.

Changes

  • Add validation for each GWAS: require z, n, variant, finite n, non-all-NA z, LD matrix present/finite, and overlapping variants with LD dimnames.
  • Joint mode now runs only on validated studies; if all invalid, emit message and skip.
  • Separate mode wraps colocboost(...) in try/catch and skips invalid studies with informative messages.

Rationale

Prevents single malformed GWAS inputs from halting the pipeline, which is common in heterogeneous public datasets.

@danielnachun

Copy link
Copy Markdown
Collaborator

Unit tests are failing here so I'm converting this to a draft so we don't merge until the problems are fixed.

@danielnachun
danielnachun marked this pull request as draft November 7, 2025 04:34
@gaow

gaow commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@kal26 See comment in: #431

@gaow gaow closed this Mar 1, 2026
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.

3 participants