Conversation
- Check for missing phenotype, covariate, genotype, sumstat, column mapping, and LD metadata files - Error (not warn) when files are missing to catch path issues early - Fix genotype file check to look for .bed/.bim/.fam or .pgen/.pvar/.psam files instead of base filename - Improve error messages to show which files are missing with condition names - Filter phenotypes without data for specific region before loading
- Centralize normalize_variant_id function in misc.R and remove duplicates - Normalize variant IDs consistently across sumstats, LD matrices, and genotype data - Fix LD matrix usage: use processed LD matrices after normalization in summary_stats_qc - Normalize ref_panel variant IDs before imputation to match processed sumstats - Add try-catch error handling in summary_stats_qc_multitask loop - Add try-catch error handling in separate_gwas focal analysis loop - Fix pip_cutoff_to_skip_sumstat handling for single values, named vectors, and unnamed vectors - Remove debug statements
…alyses - Use normalize_variant_id() consistently for sumstats and LD matrices to handle variant ID format mismatches - Remove double 'chr' prefix issue and build suffix (e.g., :b38) mismatches - Add tryCatch error handling for joint_gwas and separate_gwas analyses - Add concise warning messages for colocboost validation failures - Fix sumstat_studies handling when sumstats list is empty
- Check if sumstats is empty before running joint_gwas analysis - Check if dict_sumstatLD is NULL or has 0 rows before running separate_gwas analysis - Prevents 'subscript out of bounds' error when all GWAS studies are skipped during QC - Returns NULL results with informative message instead of crashing
Re: Your Open PRs (#418, #419, #427, #429, #431)Thanks so much for all the work you put into these PRs. After some recent code changes, I asked Claude Code (Opus 4.6) to go through every single change across all five PRs and cross-reference them against the current You will need to update pecotmr and susieR both to the latest main branch. We have not yet made updated conda packages. What's been resolved in
|
Summary
Adds graceful handling when all GWAS studies are skipped during QC in the colocboost analysis pipeline.
Problem
When all GWAS studies are skipped during QC (e.g., due to "No variants in region"), the pipeline would crash with a "subscript out of bounds" error when trying to access
dict_sumstatLD[i_gwas, ]with an invalid index.Solution
sumstatsbefore runningjoint_gwasanalysisdict_sumstatLDbefore runningseparate_gwasanalysisChanges
colocboost_analysis_pipeline()to check if GWAS data exists before attempting analysis