Skip to content

Release 0.3.2 - #37

Closed
qclayssen wants to merge 72 commits into
mainfrom
release/0.3.2
Closed

qclayssen wants to merge 72 commits into
mainfrom
release/0.3.2

Conversation

@qclayssen

Copy link
Copy Markdown
Collaborator

Release 0.3.2

Merges bolt 0.3.2 into main. Builds on bolt #35 (release/0.3.1-validated → main, 0.3.0 + 0.3.1) — merge that first.

Fixed

  • PCGR skip when variant count exceeds MAX_SOMATIC_VARIANTS — graceful skip, non-PCGR outputs still publish (#32, sash #52)
  • PCGR_MUTATION_HOTSPOT=. treated as truthy in retention check — was blocking tiered filtering for any sample with >450k PASS variants (#32)
  • Drop --estimate_signatures from PCGR somatic invocation — signature analysis is downstream in gpgr/sigrap (#31, sash #57)
  • Disable --estimate_msi/--estimate_tmb in chunked PCGR annotation runs — estimates on partial VCFs are not meaningful
  • Pin jlumbroso/free-disk-space CI action to v1.3.0

Tests added

TestRunSomaticCommandArgs (estimate flags), TestEntrySkipsPcgrOnOverflow, TestSelectPcgrVariantsRaisesOnUnresolvableOverflow, disable_estimates forwarding in TestRunSomaticChunkArgMapping

Prerequisite

  • bolt #35 — Release 0.3.1 validated (merge first)

qclayssen and others added 30 commits October 2, 2025 14:17
* update "HIGH_INF_POS" to "HIGH_I_I_POS" in VCF header for latest pcgr version

* update constant for pcgr 2.2.5
* change sage vcf header to match 2024 version

* move check function

* add check in rescue for sage vcf

* change for consistencency with pcgr
…arallelisation because OOM hypermutated samples
…e_command. Fixes #26 - Commands now fail immediately instead of continuing silently
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
qclayssen and others added 25 commits May 15, 2026 10:29
Path.with_suffix() only replaces the last suffix  everything after the final dot. The caller passes a path ending in .pass
When select_pcgr_variants cannot bring the PASS count below
MAX_SOMATIC_VARIANTS via tiered filtering it raises RuntimeError,
aborting the entire report step. This left sash with no usable
SMLV_SOMATIC_REPORT output for samples with very high variant counts
(e.g. L2100242 with 595,416 PASS variants — high CNA complexity, not
a true hypermutator).

Catch the RuntimeError, log a warning, and skip prepare_vcf_somatic
and run_somatic. Non-PCGR outputs (bcftools stats, AF distributions,
variant counts) continue to publish. Companion sash change marks the
PCGR emits as optional.

Refs: umccr/sash#52
Add three tests:
- select_pcgr_variants raises RuntimeError when all SAGE_HOTSPOT
  variants (RETAIN_FIELDS) make tiered filtering impossible
- entry() skips prepare_vcf_somatic + run_somatic when the
  RuntimeError is caught (core of the sash #52 fix)
- entry() calls run_somatic normally when count is within the limit
  (regression guard)
PCGR writes PCGR_MUTATION_HOTSPOT=. (Type=String placeholder) on every
non-hotspot variant. cyvcf2 returns the string '.' which Python evaluates
as truthy, so any(variant.INFO.get(e) ...) always returned True — ALL
variants were treated as retained, variants_sorted stayed empty, and
select_pcgr_variants raised RuntimeError for any sample with >450k
PASS variants (sash #52 root cause).

Fix: exclude '.' alongside None so only genuinely set String/Flag fields
trigger retention. Adds regression test with PCGR_MUTATION_HOTSPOT=.
fixture to prevent silent recurrence.
* fix: drop --estimate_signatures from PCGR somatic invocation

PCGR's mutational signature estimation is unreliable for our cohort
and we get signature analysis from gpgr/sigrap downstream. Keep
--estimate_msi and --estimate_tmb (still useful in the PCGR report).

Refs: umccr/sash#57

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Documents CI smoke tests, build fixes, split_vcf tabix-indexing,
r-gpgr 2.3.1 bump, and the estimate_signatures drop (#31, sash#57) —
all merged into release/0.3.0 after the v0.3.1 tag but never recorded.
* fix: skip PCGR when variant count exceeds MAX_SOMATIC_VARIANTS

When select_pcgr_variants cannot bring the PASS count below
MAX_SOMATIC_VARIANTS via tiered filtering it raises RuntimeError,
aborting the entire report step. This left sash with no usable
SMLV_SOMATIC_REPORT output for samples with very high variant counts
(e.g. L2100242 with 595,416 PASS variants — high CNA complexity, not
a true hypermutator).

Catch the RuntimeError, log a warning, and skip prepare_vcf_somatic
and run_somatic. Non-PCGR outputs (bcftools stats, AF distributions,
variant counts) continue to publish. Companion sash change marks the
PCGR emits as optional.

Refs: umccr/sash#52

* test: cover PCGR graceful skip on unresolvable variant count overflow

Add three tests:
- select_pcgr_variants raises RuntimeError when all SAGE_HOTSPOT
  variants (RETAIN_FIELDS) make tiered filtering impossible
- entry() skips prepare_vcf_somatic + run_somatic when the
  RuntimeError is caught (core of the sash #52 fix)
- entry() calls run_somatic normally when count is within the limit
  (regression guard)

* fix: treat PCGR_MUTATION_HOTSPOT=. as missing in retention check

PCGR writes PCGR_MUTATION_HOTSPOT=. (Type=String placeholder) on every
non-hotspot variant. cyvcf2 returns the string '.' which Python evaluates
as truthy, so any(variant.INFO.get(e) ...) always returned True — ALL
variants were treated as retained, variants_sorted stayed empty, and
select_pcgr_variants raised RuntimeError for any sample with >450k
PASS variants (sash #52 root cause).

Fix: exclude '.' alongside None so only genuinely set String/Flag fields
trigger retention. Adds regression test with PCGR_MUTATION_HOTSPOT=.
fixture to prevent silent recurrence.

* refactor: tighten retention-check comment to one line

* test: assert real PCGR_MUTATION_HOTSPOT value retains variant
Graceful PCGR skip when variant count exceeds MAX_SOMATIC_VARIANTS (sash #52, bolt PR #32).
Fixes dot-placeholder PCGR_MUTATION_HOTSPOT retention false positive.
Approved by scwatts (2026-06-05), all CI green.
Drops comments that restate what the code already says (logger setup,
execute_command flag explanation, merge step annotations) and replaces
multi-paragraph docstrings on merge_tsv_files/merge_vcf_files with no
docstring, per project conventions.
@qclayssen

Copy link
Copy Markdown
Collaborator Author

Closing — redundant with bolt #33 which already covers the full release/0.3.0 tip including 0.3.2. Created in error.

@qclayssen qclayssen closed this Jul 17, 2026
@qclayssen
qclayssen deleted the release/0.3.2 branch July 17, 2026 04:00
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.

1 participant