Skip to content

Pcgr v2.2.5 - #22

Merged
qclayssen merged 12 commits into
release/0.3.0from
pcgr-v2.2.5
Nov 19, 2025
Merged

qclayssen merged 12 commits into
release/0.3.0from
pcgr-v2.2.5

Conversation

@qclayssen

Copy link
Copy Markdown
Collaborator

bump pcgr v2.2.1 -> v2.2.5

@qclayssen
qclayssen requested a review from Copilot October 23, 2025 23:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread bolt/workflows/smlv_somatic/filter.py Resolved
@qclayssen
qclayssen merged commit 966967f into release/0.3.0 Nov 19, 2025
@qclayssen
qclayssen deleted the pcgr-v2.2.5 branch November 19, 2025 03:26
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.
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