Skip to content

Better error reporting for invalid chromosomes#14

Merged
seppinho merged 1 commit intogenepi:mainfrom
statgen:ux-better-error-on-invalid-chromosome
Oct 15, 2025
Merged

Better error reporting for invalid chromosomes#14
seppinho merged 1 commit intogenepi:mainfrom
statgen:ux-better-error-on-invalid-chromosome

Conversation

@MarcFraile
Copy link
Contributor

Currently, if a user provides a chromosome that is not in the validChromosomes set from VcfFileUtil (e.g., chrY), they receive a generic error message: ::error:: No valid chromosomes found! (even if other valid chromosomes are submitted). This has caused confusion amongst TOPMed Imputation Server users, who have asked for more specific error reporting.

This PR substitutes the error message with ::error:: Invalid chromosome found: <chr>.

I have also added two tests based on a code coverage report from the existing test suite:

  • A test covering the changed error message. It includes new data in test-data/data/chrY-fake/, created with bcftools from existing test data.
  • An additional test covering the error when no refpanel is found.

… covering error case; add test covering missing reference panel. New chrY-fake data is a rename from chr20-phased data using bcftools.
@seppinho seppinho merged commit 043e610 into genepi:main Oct 15, 2025
1 check passed
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