Skip to content

OA-only mode: handle oncoanalyser-only inputs (no DRAGEN) - #34

Open
qclayssen wants to merge 67 commits into
mainfrom
oa-only-v2
Open

OA-only mode: handle oncoanalyser-only inputs (no DRAGEN)#34
qclayssen wants to merge 67 commits into
mainfrom
oa-only-v2

Conversation

@qclayssen

@qclayssen qclayssen commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds support for running bolt's PCGR/CPSR and reporting steps from oncoanalyser-only inputs, without requiring DRAGEN outputs (SAGE-derived variants have no SQ FORMAT field, etc).
  • Companion to umccr/sash oa-only branch, which drives sash's OA-only pipeline mode against these container builds.

Related

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 added 21 commits May 15, 2026 09:48
Uses select() to multiplex both pipes in one thread, preventing
pipe buffer deadlock and routing stderr to WARNING level.
Includes hypermutated flag fix (reads is_hypermutated from bolt JSON)
and SNVs display cleanup.
Path.with_suffix() only replaces the last suffix  everything after the final dot. The caller passes a path ending in .pass
- smlv_somatic report: make --vcf_dragen_fp optional; skip dragen/bolt
  variant count comparison when absent; filt_* fields set to None in
  MultiQC YAML output
- transfer_annotations_germline: handle CPSR writing no output files
  when zero variants pass filtering; treat absent TSV/VCF as empty
  annotation data and pass variants through unchanged
SAGE sets GT=./. for all variants; CPSR drops all records with missing
genotype at report generation. Convert ./. to 0/1 via bcftools +setGT
so CPSR produces meaningful germline predisposition output in OA-only mode.
PCGR can emit multiple rows for the same variant when it maps to
multiple transcripts. Replace assert with tier-aware deduplication:
keep the most actionable entry (lowest tier number), warn on duplicates.
Add PCGR_TIER_NORMALISE dict to constants.py; derive _TIER_ORDER from
PCGR_TIERS_FILTERING. Removes inline tier string literals from pcgr.py.
PCGR can emit duplicate variant entries in its output VCF. The assert
raised on the second occurrence; skip duplicates with a warning instead.
SQ is a DRAGEN FORMAT field; cyvcf2.Variant.format() raises KeyError (not
None) when the field is absent from the header. In OA-only mode all variants
come from SAGE which has no SQ field. Check the header once before iterating
and skip the SQ path entirely when absent — SAGE QUAL values pass through
unchanged. Also close VCF handles explicitly to flush bgzip output.
qclayssen added a commit that referenced this pull request Jul 13, 2026
…ple ID

Sample identifiers shouldn't live in source comments. fddc7a7 (the fix
this NOTE documents) landed as part of #34.
@qclayssen
qclayssen changed the base branch from main to release/0.3.1-validated July 16, 2026 00:52
@qclayssen
qclayssen force-pushed the release/0.3.1-validated branch 2 times, most recently from 8f264d9 to 1a2a5ca Compare July 21, 2026 23:46
Base automatically changed from release/0.3.1-validated to main July 22, 2026 00:15
Conflicts resolved by taking oa-only-v2 content (superset of main):
- CHANGELOG.md, constants.py, pcgr.py, report.py, test_pcgr_hypermutated.py
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