Skip to content

fix: sort final vcf in varlociraptor sbwfs and update varlociraptor#2055

Merged
famosab merged 38 commits intodevfrom
fix/sort-vcf
Feb 12, 2026
Merged

fix: sort final vcf in varlociraptor sbwfs and update varlociraptor#2055
famosab merged 38 commits intodevfrom
fix/sort-vcf

Conversation

@famosab
Copy link
Copy Markdown
Contributor

@famosab famosab commented Nov 14, 2025

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/sarek branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@nf-core-bot
Copy link
Copy Markdown
Member

nf-core-bot commented Nov 14, 2025

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.5.1.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 14, 2025

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

Posted for pipeline commit 95513ac

+| ✅ 224 tests passed       |+
#| ❔  13 tests were ignored |#
!| ❗   7 tests had warnings |!
Details

❗ Test warnings:

  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • schema_lint - Input mimetype is missing or empty
  • schema_description - No description provided in schema for parameter: markduplicates_pixel_distance
  • schema_description - No description provided in schema for parameter: gatk_pcr_indel_model

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 3.5.1
  • Run at 2026-02-12 17:07:56

@famosab famosab changed the title fix: sort final vcf in varlociraptor sbwfs fix: sort final vcf in varlociraptor sbwfs and update varlociraptor Nov 14, 2025
@famosab
Copy link
Copy Markdown
Contributor Author

famosab commented Nov 14, 2025

Needs testing whether this works as expected with multi-sample input.

Comment thread CHANGELOG.md Outdated
@famosab
Copy link
Copy Markdown
Contributor Author

famosab commented Nov 24, 2025

Testing now with 2 tumor-normal-pairs

Comment thread subworkflows/local/vcf_varlociraptor_somatic/main.nf
@famosab
Copy link
Copy Markdown
Contributor Author

famosab commented Feb 6, 2026

@copilot I always run into this error:

Join mismatch for the following entries: 
  - key=[test3, sample4_vs_sample3, 14, strelka] values= 
  - key=[test3, sample3, 1, strelka] values= 
  - key=[test3, sample4_vs_sample3, 10, strelka] values= 
  - key=[test3, sample3, 3, strelka] values= 
  - key=[test3, sample4_vs_sample3, 12, strelka] values= 
  - key=[test3, sample3, 5, strelka] values= 
  - key=[test3, sample4_vs_sample3, 4, strelka] values= 
  - key=[test3, sample3, 8, strelka] values= 
  - key=[test3, sample4_vs_sample3, 2, strelka] values= 
  - key=[test3, sample4_vs_sample3, 8, strelka] values=
  (more omitted)
  
  
  -[nf-core/sarek] Pipeline completed with errors-
  WARN: Killing running tasks (1)
  ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting
  
   -- Check '/home/runner/tests/4296a60746f9da139b541c5950b714eb/meta/nextflow.log' file for details
  WARN: Failed to render execution report -- see the log file for details
  WARN: Failed to render execution timeline -- see the log file for details
  Nextflow stderr:
  
  



FAILURE: Executed 1 tests in 851.139s (1 failed)

Can you propose changes that fix this issue?

Copy link
Copy Markdown

Copilot AI commented Feb 6, 2026

@famosab I've opened a new pull request, #2125, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits February 6, 2026 12:22
…processing (#2125)

The varlociraptor somatic subworkflow failed to join normal and tumor
preprocessed BCF files when processing multiple tumor-normal pairs,
causing a "Join mismatch" error.

## Root Cause

The join operation requires matching keys between normal and tumor
channels:
- Normal: `[meta.patient, meta.id, meta.chunk, meta.variantcaller]`
- Tumor: `[meta.patient, meta.normal_id, meta.chunk,
meta.variantcaller]`

After PREPROCESS_NORMAL, `meta.id` was set to the pair ID (e.g.,
"sample4_vs_sample3") instead of the normal sample ID (e.g., "sample3"),
preventing matches with tumor's `meta.normal_id`.

## Changes

**subworkflows/local/vcf_varlociraptor_somatic/main.nf**
- Line 211: Changed normal sample ID assignment from `meta_cram.id` to
`meta_cram.match_id`

```groovy
// Before
meta_vcf + [
    id: meta_cram.id,  // pair ID
    postprocess: 'varlociraptor',
]

// After
meta_vcf + [
    id: meta_cram.match_id,  // normal sample ID
    postprocess: 'varlociraptor',
]
```

This ensures join keys align: normal's `meta.id` now matches tumor's
`meta.normal_id` for each sample pair and chunk.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: famosab <45968370+famosab@users.noreply.github.com>
Comment thread CHANGELOG.md Outdated
@famosab famosab modified the milestone: 3.9.0 Feb 9, 2026
@famosab famosab merged commit b2e39a8 into dev Feb 12, 2026
15 checks passed
@famosab famosab deleted the fix/sort-vcf branch February 12, 2026 17:29
@pinin4fjords pinin4fjords mentioned this pull request May 7, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants