Skip PIP-screened regions gracefully instead of erroring - #565
Merged
Conversation
summaryStatsQc(pipCutoffToSkip) empties a no-signal region and records qcInfo$entryAudit[[i]]$pipScreenSkipped, but nothing read it: fineMappingPipeline hit .fmExtractZN and threw 'entry has no SNP mcol' - a misleading hard stop that shows a screened region as FAILED in an array job. Add .fmEntrySkipInfo(data, i); both SumStats methods now consult it, skip the entry with a clear 'region skipped: <reason>' message and no row, and an all-screened collection returns a valid 0-row result (allowEmpty on the builders) instead of stop(). Fixes the misleading message, the non-zero exit, and the dangling flag.
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.
What
summaryStatsQc(pipCutoffToSkip)empties a no-signal region (df[FALSE, ]) and recordsqcInfo$entryAudit[[i]]$pipScreenSkipped. Nothing consumed that flag, sofineMappingPipelinelooped the 0-variant entry and.fmExtractZNthrew"entry has no SNP mcol". Three problems: (1) misleading message (reads like corrupt input); (2) hardstop()→ non-zero exit → shows as FAILED in an array job, indistinguishable from a real error; (3)pipScreenSkippedwritten and never read.Now
fineMappingPipeline(GwasSumStats+QtlSumStats) consults.fmEntrySkipInfo(data, i)before extracting z/N: a screened (or 0-variant) entry is skipped with a clearregion skipped: <reason>message and no row; an all-screened collection returns a valid 0-row result (allowEmptyon the builders) instead of erroring.Impact
fine_mapping.Rhandles a 0-row result andgwas_rss_plot.Ralreadywrite_emptys an empty FMR.Testing
susieR 0.16.6: test_fineMappingPipeline (474) + test_sumstatsQc (825) green — new tests: screened GWAS → empty FMR + skip message; mixed screened+real → only real rows; 0-variant entry skipped without the flag; QtlSumStats screened trait → empty result. Real chr21 AD_Bellenguez: forced screen (cutoff 0.163 > max SER PIP 0.153) →
fineMappingPipelinereturns a 0-rowGwasFineMappingResultwith the skip message, where pre-change it errored"entry has no SNP mcol".