Skip to content

Severus fix - #223

Merged
robert-a-forsyth merged 2 commits into
devfrom
severus-fix
Oct 14, 2026
Merged

robert-a-forsyth merged 2 commits into
devfrom
severus-fix

Conversation

@robert-a-forsyth

Copy link
Copy Markdown
Collaborator

Summary

  • severus_input is now built from PHASING_HAPLOTYPING.out.tumor_normal_hapbams_ch (the Longphase-haplotagged BAMs) rather than the unphased minimap2 BAMs, so Severus gets HP tags for haplotype-aware SV calling. Before this, severus.log reported Median coverage by PASS reads (H1 / H2 / H0): 0.0 / 0.0 / N and every hVAF was x,0,0.
  • Wakhan reads severus_input, so it now gets the haplotagged BAMs too.
  • SAVANA used to build this same channel itself; it now reuses severus_input, which removes the duplicated block.
  • somatic_smallvar_input (ClairS / DeepSomatic) is unchanged.

Test plan

  • nextflow lint workflows/lrsomatic.nf (no new errors)
  • -profile test,singularity -stub: aborts with Join mismatch ... key=[id:sample1, paired_data:true, ...] before phasing. Unmodified dev (91b8c1e) aborts the same way, so this is not caused by this PR, but it means the stub run can't check the new channel end to end
  • CI nf-tests (snapshots list Severus outputs by name only, so no snapshot changes expected)

🤖 Generated with Claude Code

robert-a-forsyth and others added 2 commits October 14, 2026 16:58
Build severus_input from PHASING_HAPLOTYPING's haplotagged BAMs instead of
the unphased minimap2 BAMs, so Severus (and Wakhan, which reads the same
channel) see the HP tags. SAVANA already built this channel itself; it now
reuses severus_input.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread workflows/lrsomatic.nf
def sv_meta_keys = ['id', 'paired_data', 'platform', 'sex', 'fiber',
'clair3_model', 'clairS_model', 'clairSTO_model', 'kinetics']

PHASING_HAPLOTYPING.out.tumor_normal_hapbams_ch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snapshot is not name-only for Severus. The PR description says "snapshots list Severus outputs by name only, so no snapshot changes expected". That's wrong. tests/.nftignore only ignores Severus's read_ids.csv, severus.log and the *.vcf.gz/.tbi files. breakpoints_double.csv, read_qual.txt and {all_SVs,somatic_SVs}/breakpoint_clusters*.tsv are md5-checked in tests/default.nf.test.snap (lines 612–634), and default.nf.test is tagged small.

Now that Severus gets HP-tagged reads, the per-haplotype support in breakpoints_double.csv should change. One of two things will happen:

  • the md5s drift and the small CI test fails until the snapshot is regenerated, or
  • they don't drift, which suggests the test data doesn't show the fix working.

Please regenerate tests/default.nf.test.snap and explain the Severus md5 changes in the PR. Also regenerate the extended snapshots (clair_only, consensus, deep_only, union, chm13) that include Severus outputs.

Comment thread workflows/lrsomatic.nf
Comment on lines 907 to 909
// Attach phased germline VCF (used by SEVERUS for phased SV calling)
.join(PHASING_HAPLOTYPING.out.phased_germline_vcf)
.set{severus_input}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing test coverage for the fix, and Wakhan's input change is untested.

  1. No test checks the behaviour this PR fixes. That bug was severus.log reporting H1 / H2 coverage 0.0 / 0.0 and every hVAF being x,0,0. default.nf.test only checks that severus_somatic.vcf.gz exists, and severus.log is in .nftignore. If someone switches severus_input back to the unphased BAMs, CI would still pass. Please add an assertion to the small default test, e.g. that sample1/variants/severus/severus.log reports non-zero H1/H2 coverage, or that some Severus record has a non-zero haplotype VAF.
  2. Wakhan now gets the haplotagged BAMs too, but conf/test.config sets skip_wakhan = true. The only small test that enables Wakhan (sv_annotation_compose.nf.test) is a preview run that only checks process names. So no CI test runs Wakhan on the new input. Per REVIEW.md, please run the Slurm test array (or a real --skip_wakhan false run) and report the result before merging.

@claude

claude Bot commented Oct 14, 2026

Copy link
Copy Markdown

Automated review: 2 findings.

The channel logic looks correct to me. It's the same branch/join that SAVANA used before, and the hapbam names ({id}_tumor / {id}_normal) don't collide when staged. The findings are about tests:

  1. Severus outputs breakpoints_double.csv, read_qual.txt and breakpoint_clusters*.tsv are md5-checked in tests/default.nf.test.snap. That test is tagged small, so expect snapshot drift, which needs regenerating and explaining.
  2. No test asserts that Severus now sees phased reads (non-zero H1/H2 coverage). Wakhan is skipped in every non-preview small test.

A human reviewer needs to run: the small nf-tests (to confirm the expected Severus md5 changes, and that they come from haplotagging), and the Slurm test array or a --skip_wakhan false run (to check that Wakhan works on the haplotagged BAMs). The PR also notes that the -stub run already aborts on dev with a join mismatch, so stub runs can't check this change.

@github-actions

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit b6ed884

+| ✅ 232 tests passed       |+
#| ❔  22 tests were ignored |#
#| ❔   1 tests had warnings |#
!| ❗  45 tests had warnings |!
Details

❗ Test warnings:

  • nextflow_config - Config manifest.version should end in dev: 1.1.0
  • pipeline_todos - TODO string in nextflow.config: Specify your pipeline's command line flags
  • pipeline_todos - TODO string in nextflow.config: Update the field with the details of the contributors to your pipeline. New with Nextflow version 24.10.0
  • pipeline_todos - TODO string in README.md: Include a figure that guides the user through the major workflow steps. Many nf-core
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in meta.yml: #Add a description of the module and list keywords
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in base.config: Customise requirements for specific processes.
  • pipeline_todos - TODO string in CONTRIBUTING.md: Add any pipeline specific contribution guidelines here, such as coding styles, procedures, checklists etc.
  • schema_description - Ungrouped param in schema: skip_modkit
  • schema_description - No description provided in schema for parameter: generate_gvcf
  • schema_description - No description provided in schema for parameter: autocorrelation
  • schema_description - No description provided in schema for parameter: vep_custom
  • schema_description - No description provided in schema for parameter: vep_custom_tbi
  • schema_description - No description provided in schema for parameter: severus_minsupport
  • schema_description - No description provided in schema for parameter: wakhan_chroms
  • local_component_structure - prepare_vep_plugins.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - ecdna.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - fiberseq.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - deepsomatic.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - small_variant_consensus.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_aa_data_repo.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_reference_files.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_annotation.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_signatures.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - reconplot_figures.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - phasing_haplotyping.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - padfoot_annotation.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure

❔ Tests ignored:

  • files_exist - File is ignored: CODE_OF_CONDUCT.md
  • files_exist - File is ignored: assets/nf-core-lrsomatic_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-lrsomatic_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-lrsomatic_logo_dark.png
  • files_exist - File is ignored: .github/ISSUE_TEMPLATE/config.yml
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • files_exist - File is ignored: .github/CONTRIBUTING.md
  • nextflow_config - Config variable ignored: manifest.name
  • nextflow_config - Config variable ignored: manifest.homePage
  • nf_test_content - 'tests/sv_annotation_compose.nf.test' checking ignored
  • files_unchanged - File ignored due to lint config: CODE_OF_CONDUCT.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.yml
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/email_template.txt
  • files_unchanged - File ignored due to lint config: assets/nf-core-lrsomatic_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-lrsomatic_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-lrsomatic_logo_dark.png
  • files_unchanged - File ignored due to lint config: docs/README.md
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/lrsomatic/lrsomatic/.github/workflows/awstest.yml

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.1.0
  • Run at 2026-10-14 15:03:29

@robert-a-forsyth
robert-a-forsyth merged commit 5208521 into dev Oct 14, 2026
10 of 11 checks passed
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