Repository navigation
Pcgr v2.2.5 - #22
Merged
Merged
Pcgr v2.2.5#22
Conversation
…11) * add params input for sigrap tools
There was a problem hiding this comment.
Pull Request Overview
This PR updates the PCGR (Personal Cancer Genome Reporter) version from v2.2.1 to v2.2.5. The update includes corresponding changes to VEP annotation fields to support new gnomAD genome frequency annotations.
- Updated Docker conda environment lock files to reference PCGR v2.2.5
- Added gnomAD genome (gnomADg) annotation fields to VEP CSQ format strings
- Added logging imports and logger initialization to several workflow modules
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docker/Dockerfile.pcgr | Updated conda lock file URLs from PCGR v2.2.1 to v2.2.5 for both pcgr and pcgrr environments |
| bolt/common/constants.py | Extended VEP CSQ format strings to include gnomAD genome frequency fields (gnomADg_*) |
| bolt/workflows/smlv_somatic/report.py | Added logging module import and logger initialization; defined pcgr_output_dir variable |
| bolt/workflows/smlv_germline/report.py | Added logging module import and logger initialization |
| bolt/workflows/smlv_somatic/filter.py | Added duplicate logging import |
| bolt/workflows/other/cancer_report.py | Added logging module import |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
qclayssen
added a commit
that referenced
this pull request
Jul 22, 2026
* Add option for sash sigrap individual process input to cancer report (#11) * add params input for sigrap tools * Hypermutation Handling in PCGR (#9) * Feature/pcgr v2.2.1 (#10) * fix merge duplication and imports * bump pcgr version * bump gpgr version * change print to logging * add argument chunck size * fix version software pcgr container * add logging and filter fonction to read value and replace placeholder * fix indentation * read gz tsv from pcgr * change PCGR_CLINVAR_CLASSIFICATION * Change pcgr header check * tyo * typo * add missing variable pcgr_output_dir * Pcgr v2.2.5 (#22) * update "HIGH_INF_POS" to "HIGH_I_I_POS" in VCF header for latest pcgr version * update constant for pcgr 2.2.5 * Uptade sage vcf header check (#24) * change sage vcf header to match 2024 version * move check function * add check in rescue for sage vcf * change for consistencency with pcgr * add missing HMF_HOTSPOT constant * Fix quotation * Fix test * remove PCGR html report from chunk (hypermutated) to reduce memory use * change remove pcgr parallelisation of chunks, and fix pcgr internal parallelisation because OOM hypermutated samples * free disk worker * remove exception to stop at fail process * make thread you by pcgr constant, so in case of OOM, on the retry don't use more core and so more memory * Fix silent command failures by integrating error handling into execute_command. Fixes #26 - Commands now fail immediately instead of continuing silently * Extract PCGR errors from log files * Update bolt/workflows/other/cancer_report.py Co-authored-by: Copilot <[email protected]> * Update bolt/common/pcgr.py Co-authored-by: Copilot <[email protected]> * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * fix typo * remove duplicate fonction * fix typo * add check pcgr_hotspot_present value * add is_hypermutated flag to variant counts process JSON * update PCGR_TIERS_FILTERING * Fix PCGR hypermutated filtering, add exhaustive tests Corrects the tier ordering logic and filtering in hypermutated sample handling to ensure NONCODING variants are dropped before TIER_1, preventing excessive variant counts. Refines error handling, improves logging and VCF writing, and clarifies filter traceability. Adds comprehensive unit and integration tests to verify all edge cases in tiered variant selection and CSQ parsing. Relates to improved reliability for high-mutation samples. * add back source comment * DEV: install r-gpgr from input-sigrap-data branch for is_hypermutated testing Revert to conda pin r-gpgr ==2.3.0 before final release. * Add tests for split_vcf chunking and document PCGR 500k handling - TestSplitVcf: verify split_vcf correctly chunks VCFs above MAX_SOMATIC_VARIANTS - Document PCGR 500k as a hard software limit (not OOM) in CLAUDE.md - Document known failure mode when tiered filtering cannot cap count (sash #52) * Fix positional arg shift in run_somatic_chunk → run_somatic call run_somatic has pcgr_threads between threads and pcgr_conda. The call in run_somatic_chunk used positional args and skipped pcgr_threads, causing pcgr_conda ('pcgr') to land in pcgr_threads → ValueError. Switch to keyword args matching the non-chunked call in annotate.py. Add regression test that mocks run_somatic and asserts pcgr_conda, pcgrr_conda, and threads are received at the correct parameters. * fix hypermutated tag * Add tests for is_hypermutated dragen count fix Covers count_variant_process: dragen vs filter_pass threshold, SAGE_NOVEL exclusion, and annotation filter exclusion. * Separate stdout/stderr streams in execute_command Uses select() to multiplex both pipes in one thread, preventing pipe buffer deadlock and routing stderr to WARNING level. * Pin r-gpgr ==2.3.0 in Dockerfile.gpgr Includes hypermutated flag fix (reads is_hypermutated from bolt JSON) and SNVs display cleanup. * fix doc and missing file closure * add test * change .with_suffix : Path.with_suffix() only replaces the last suffix everything after the final dot. The caller passes a path ending in .pass * chore: untrack local-only files * update CHANGELOG for 0.3.0 release * bump version to 0.3.1 and update changelog * ci: add smoke tests to catch image startup failures before push * fix missing build and pcgr docker file * Fix remove unused package and log pcgr limit * fix: tabix-index VCF chunks after split_vcf so PCGR can read them * test: assert split_vcf chunks have .tbi index (regression for PCGR v2.2.5 tabix check) * fix: bump r-gpgr to 2.3.1 in gpgr Docker image * fix: skip bcftools merge for single PCGR VCF chunk (bolt #26) run_somatic_chunk -> merging_pcgr_files unconditionally called util.merge_vcf_files, which shells out to `bcftools merge`. That command requires 2+ inputs, so a sample whose variants fit in a single chunk (no splitting needed) produced a bcftools merge Usage error instead of a valid annotated VCF. Guard on len(pcgr_vcf_files) == 1: copy the single chunk's VCF directly to the expected merged-output path and tabix-index it, matching the indexed .vcf.gz contract that merge_vcf_files normally produces. Two or more chunks still go through the existing bcftools merge -> sort -> index path unchanged. * style: address Stephen's review comments (bolt #35) - Remove stray blank first line in bolt/common/pcgr.py - Reword comment in report.py to reference MAX_SOMATIC_VARIANTS constant instead of hardcoded '500,000' value * docs: document MAX_SOMATIC_VARIANTS rationale (bolt #35) Explain why the threshold is 450k (not 500k): PCGR's hard cap is 500k, the 50k margin avoids edge-case overflows during tiered filtering. Notes this was an oral team decision with no written Slack thread. Addresses Stephen's review comment on constants.py:7.
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.
bump pcgr v2.2.1 -> v2.2.5