Repository: nf-core/sarek
Pull request #1859: fix: change dbsnp channel from queue to value in muse subworkflow
Author: login: famosab
Created: 2025-04-04T08:55:21Z | Merged: 2025-04-08T13:10:30Z

<!--
# nf-core/sarek pull request

Many thanks for contributing to nf-core/sarek!

Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).

Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.

Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/sarek/tree/master/.github/CONTRIBUTING.md)
-->

## 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](https://github.com/nf-core/sarek/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/sarek _branch_ on the [nf-core/test-datasets](https://github.com/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.
- [x] `CHANGELOG.md` is updated.
- [ ] `README.md` is updated (including new tool citations and authors/contributors).



Diff:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44e9a88bfd..02b67f6100 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -76,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - [1852](https://github.com/nf-core/sarek/pull/1852) - Modifying `assets/schema_input.json` and `nextflow_schema.json` should retrigger nf-test (cf https://github.com/nf-core/sarek/pull/1842)
 - [1852](https://github.com/nf-core/sarek/pull/1852) - Fix path to `license_message.py` script
 - [1855](https://github.com/nf-core/sarek/pull/1855) - Fix json schema cf_chrom_len input broken by [1842](https://github.com/nf-core/sarek/pull/1842)
+- [1859](https://github.com/nf-core/sarek/pull/1859) - Fix: change dbsnp channel from queue to value in muse subworkflow, wrong implemented in [1744](https://github.com/nf-core/sarek/pull/1744)
 
 #### Removed
 
diff --git a/conf/modules/muse.config b/conf/modules/muse.config
index 7b76cf3205..e51f805553 100644
--- a/conf/modules/muse.config
+++ b/conf/modules/muse.config
@@ -33,7 +33,7 @@ process {
         publishDir = [
                 mode: params.publish_dir_mode,
                 path: { "${params.outdir}/variant_calling/muse/${meta.id}/" },
-                pattern: "*{vcf.gz,vcf.gz.tbi}",
+                pattern: "*{vcf.gz,vcf.gz.tbi}"
             ]
     }
 
diff --git a/modules.json b/modules.json
index 12adb8c51e..e81103e13f 100644
--- a/modules.json
+++ b/modules.json
@@ -357,12 +357,12 @@
                     },
                     "muse/call": {
                         "branch": "master",
-                        "git_sha": "a14b4f333e54f58ac3125db6959c8a43957fd5c8",
+                        "git_sha": "89e14c5855b00b3c2501ad96de7440734909bf39",
                         "installed_by": ["modules"]
                     },
                     "muse/sump": {
                         "branch": "master",
-                        "git_sha": "a14b4f333e54f58ac3125db6959c8a43957fd5c8",
+                        "git_sha": "89e14c5855b00b3c2501ad96de7440734909bf39",
                         "installed_by": ["modules"]
                     },
                     "ngscheckmate/ncm": {
diff --git a/modules/nf-core/muse/call/main.nf b/modules/nf-core/muse/call/main.nf
index 97740c08e5..273c09bdd9 100644
--- a/modules/nf-core/muse/call/main.nf
+++ b/modules/nf-core/muse/call/main.nf
@@ -1,6 +1,6 @@
 process MUSE_CALL {
     tag "$meta.id"
-    label 'process_medium'
+    label 'process_high'
 
     conda "${moduleDir}/environment.yml"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
@@ -33,7 +33,7 @@ process MUSE_CALL {
 
     cat <<-END_VERSIONS > versions.yml
     "${task.process}":
-        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE //g" )
+        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE v//g")
     END_VERSIONS
     """
 
@@ -44,7 +44,7 @@ process MUSE_CALL {
 
     cat <<-END_VERSIONS > versions.yml
     "${task.process}":
-        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE //g" )
+        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE v//g")
     END_VERSIONS
     """
 }
diff --git a/modules/nf-core/muse/call/tests/main.nf.test.snap b/modules/nf-core/muse/call/tests/main.nf.test.snap
index e9a0c0d9a6..bc826adcc6 100644
--- a/modules/nf-core/muse/call/tests/main.nf.test.snap
+++ b/modules/nf-core/muse/call/tests/main.nf.test.snap
@@ -11,7 +11,7 @@
                     ]
                 ],
                 "1": [
-                    "versions.yml:md5,67bc768725ca9e5b73241808eda48eff"
+                    "versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
                 ],
                 "txt": [
                     [
@@ -22,12 +22,12 @@
                     ]
                 ],
                 "versions": [
-                    "versions.yml:md5,67bc768725ca9e5b73241808eda48eff"
+                    "versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
                 ]
             },
             {
                 "MUSE_CALL": {
-                    "MuSE": "v2.1.2"
+                    "MuSE": "2.1.2"
                 }
             }
         ],
@@ -35,12 +35,12 @@
             "nf-test": "0.9.2",
             "nextflow": "24.10.4"
         },
-        "timestamp": "2025-02-18T10:38:10.225172"
+        "timestamp": "2025-04-04T11:48:22.223976"
     },
     "human - bam": {
         "content": [
             [
-                "versions.yml:md5,67bc768725ca9e5b73241808eda48eff"
+                "versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
             ],
             [
                 "##MuSE_call=\"MuSE -f genome.fasta -O test -n 2 call test2.paired_end.recalibrated.sorted.bam test.paired_end.recalibrated.sorted.bam\"",
@@ -78,6 +78,6 @@
             "nf-test": "0.9.2",
             "nextflow": "24.10.4"
         },
-        "timestamp": "2025-02-18T11:35:05.915076"
+        "timestamp": "2025-04-04T11:48:09.865014"
     }
 }
\ No newline at end of file
diff --git a/modules/nf-core/muse/sump/main.nf b/modules/nf-core/muse/sump/main.nf
index 70b3352847..ac173142a0 100644
--- a/modules/nf-core/muse/sump/main.nf
+++ b/modules/nf-core/muse/sump/main.nf
@@ -1,19 +1,20 @@
 process MUSE_SUMP {
     tag "$meta.id"
-    label 'process_medium'
+    label 'process_high'
 
     conda "${moduleDir}/environment.yml"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/35/3567f6162ff718c648175c5e7b5f848eaa27811d0cb3ad53def8f0a1c8893efa/data':
-        'community.wave.seqera.io/library/muse_tabix:df58ca78bd9447b7' }"
+        'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/f9/f951cafbcec988c70d08bec486d40d902db4114bb1aaee89fd68155fdc3273da/data':
+        'community.wave.seqera.io/library/muse_tabix:cf4c19969fa62f63' }"
 
     input:
-    tuple val(meta), path(muse_call_txt)
+    tuple val(meta) , path(muse_call_txt)
     tuple val(meta2), path(ref_vcf), path(ref_vcf_tbi)
 
     output:
-    tuple val(meta), path("*.vcf.gz"), emit: vcf
-    path "versions.yml"              , emit: versions
+    tuple val(meta), path("*.vcf.gz")    , emit: vcf
+    tuple val(meta), path("*.vcf.gz.tbi"), emit: tbi
+    path "versions.yml"                  , emit: versions
 
     when:
     task.ext.when == null || task.ext.when
@@ -32,10 +33,11 @@ process MUSE_SUMP {
         -O ${prefix}.vcf
 
     bgzip $args2 --threads $task.cpus ${prefix}.vcf
+    tabix -p vcf ${prefix}.vcf.gz
 
     cat <<-END_VERSIONS > versions.yml
     "${task.process}":
-        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE //g" )
+        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE v//g")
         bgzip: \$( bgzip --version | sed -n 's/bgzip (htslib) \\([0-9.]*\\)/\\1/p' )
     END_VERSIONS
     """
@@ -44,10 +46,11 @@ process MUSE_SUMP {
     def prefix = task.ext.prefix ?: "${meta.id}"
     """
     echo "" | gzip > ${prefix}.vcf.gz
+    touch ${prefix}.vcf.gz.tbi
 
     cat <<-END_VERSIONS > versions.yml
     "${task.process}":
-        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE //g" )
+        MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" | sed -e "s/MuSE v//g")
         bgzip: \$( bgzip --version | sed -n 's/bgzip (htslib) \\([0-9.]*\\)/\\1/p' )
     END_VERSIONS
     """
diff --git a/modules/nf-core/muse/sump/meta.yml b/modules/nf-core/muse/sump/meta.yml
index 9e938e1114..1f5f38842c 100644
--- a/modules/nf-core/muse/sump/meta.yml
+++ b/modules/nf-core/muse/sump/meta.yml
@@ -51,11 +51,20 @@ output:
           description: |
             Groovy Map containing sample information
             e.g. `[ id:'sample1' ]`
-          pattern: "*.vcf"
       - "*.vcf.gz":
           type: map
           description: bgzipped vcf file with called variants
-          pattern: "*.vcf"
+          pattern: "*.vcf.gz"
+  - tbi:
+      - meta:
+          type: map
+          description: |
+            Groovy Map containing sample information
+            e.g. `[ id:'sample1' ]`
+      - "*.vcf.gz.tbi":
+          type: map
+          description: tabix index of bgzipped vcf file with called variants
+          pattern: "*.vcf.gz.tbi"
   - versions:
       - versions.yml:
           type: file
diff --git a/modules/nf-core/muse/sump/tests/main.nf.test b/modules/nf-core/muse/sump/tests/main.nf.test
index 113fe8dd17..1364090fc9 100644
--- a/modules/nf-core/muse/sump/tests/main.nf.test
+++ b/modules/nf-core/muse/sump/tests/main.nf.test
@@ -15,7 +15,7 @@ nextflow_process {
 
         when {
             params {
-                module_args = '-E'
+                module_args = '-E' // '-G' for WGS data
             }
             process {
                 """
@@ -72,7 +72,7 @@ nextflow_process {
                 { assert snapshot(
                     process.out,
                     path(process.out.versions[0]).yaml
-                    ).match() 
+                    ).match()
                 }
             )
         }
diff --git a/modules/nf-core/muse/sump/tests/main.nf.test.snap b/modules/nf-core/muse/sump/tests/main.nf.test.snap
index 796bd3dc85..18cff68b54 100644
--- a/modules/nf-core/muse/sump/tests/main.nf.test.snap
+++ b/modules/nf-core/muse/sump/tests/main.nf.test.snap
@@ -11,7 +11,23 @@
                     ]
                 ],
                 "1": [
-                    "versions.yml:md5,b464e1a4b351fa27cea9141b8ab79bb7"
+                    [
+                        {
+                            "id": "test"
+                        },
+                        "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+                    ]
+                ],
+                "2": [
+                    "versions.yml:md5,83d9458549879e13641c6861a802aa31"
+                ],
+                "tbi": [
+                    [
+                        {
+                            "id": "test"
+                        },
+                        "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+                    ]
                 ],
                 "vcf": [
                     [
@@ -22,12 +38,12 @@
                     ]
                 ],
                 "versions": [
-                    "versions.yml:md5,b464e1a4b351fa27cea9141b8ab79bb7"
+                    "versions.yml:md5,83d9458549879e13641c6861a802aa31"
                 ]
             },
             {
                 "MUSE_SUMP": {
-                    "MuSE": "v2.1.2",
+                    "MuSE": "2.1.2",
                     "bgzip": 1.21
                 }
             }
@@ -36,12 +52,12 @@
             "nf-test": "0.9.2",
             "nextflow": "24.10.4"
         },
-        "timestamp": "2025-02-18T10:48:48.403588"
+        "timestamp": "2025-04-04T11:43:36.736512"
     },
     "human - txt": {
         "content": [
             [
-                "versions.yml:md5,b464e1a4b351fa27cea9141b8ab79bb7"
+                "versions.yml:md5,83d9458549879e13641c6861a802aa31"
             ],
             11,
             "VcfFile [chromosomes=[], sampleCount=2, variantCount=0, phased=true, phasedAutodetect=true]"
@@ -50,6 +66,6 @@
             "nf-test": "0.9.2",
             "nextflow": "24.10.4"
         },
-        "timestamp": "2025-02-18T10:48:40.369312"
+        "timestamp": "2025-04-04T11:57:11.337109"
     }
 }
\ No newline at end of file
diff --git a/modules/nf-core/muse/sump/tests/nextflow.config b/modules/nf-core/muse/sump/tests/nextflow.config
index 6d29ad9187..96c26d581d 100644
--- a/modules/nf-core/muse/sump/tests/nextflow.config
+++ b/modules/nf-core/muse/sump/tests/nextflow.config
@@ -2,11 +2,7 @@ process {
 
     withName: 'MUSE_SUMP' {
         ext.args    = params.module_args
-        stageInMode = 'copy'
-    }
-
-    withName: 'MUSE_SUMP_WGS' {
-        ext.args    = '-G'
+        stageInMode = 'copy' // to avoid that the dbsnp index is older than the dbsnp file
     }
 
 }
diff --git a/subworkflows/local/bam_variant_calling_somatic_muse/main.nf b/subworkflows/local/bam_variant_calling_somatic_muse/main.nf
index 466295c4d0..cb0b9ee6be 100644
--- a/subworkflows/local/bam_variant_calling_somatic_muse/main.nf
+++ b/subworkflows/local/bam_variant_calling_somatic_muse/main.nf
@@ -15,12 +15,14 @@ workflow BAM_VARIANT_CALLING_SOMATIC_MUSE {
     cram_tumor    // channel: [mandatory] [ meta, tumor_cram, tumor_crai]
     fasta         // channel: [mandatory] [ meta, fasta ]
     fai           // channel: [mandatory] [ meta, fai ]
-    dbsnp         // channel: [optional]  [ dbsnp ]
-    dbsnp_tbi     // channel: [optional]  [ dbsnp_tbi ]
+    dbsnp         // channel: [mandatory] [ dbsnp ]
+    dbsnp_tbi     // channel: [mandatory] [ dbsnp_tbi ]
 
     main:
     versions = Channel.empty()
-    ch_dbsnp = dbsnp.combine(dbsnp_tbi)
+    ch_dbsnp = dbsnp.map{ it -> [ [id:it.name], it ] }
+    ch_dbsnp_tbi = dbsnp_tbi.map{ it -> [ [id:it.baseName], it ] }
+    ch_dbsnp_with_tbi = ch_dbsnp.join(ch_dbsnp_tbi, by: [0]).collect()  // Join by meta.id
 
     CRAM_TO_BAM_TUMOR(
         cram_tumor,
@@ -55,7 +57,7 @@ workflow BAM_VARIANT_CALLING_SOMATIC_MUSE {
 
     MUSE_SUMP(
         MUSE_CALL.out.txt,
-        ch_dbsnp.map{ it -> [ [ id:it.baseName ], it[0], it[1] ] }
+        ch_dbsnp_with_tbi
     )
 
     // add variantcaller to meta map
diff --git a/tests/.nftignore b/tests/.nftignore
index ba41f2a4a6..4e300d2e7a 100644
--- a/tests/.nftignore
+++ b/tests/.nftignore
@@ -33,4 +33,5 @@ variant_calling/**/*.vcf
 variant_calling/**/*.vcf.{gz,gz.tbi}
 variant_calling/cnvkit/*/*.pdf
 variant_calling/controlfreec/*/config.txt
+variant_calling/muse/*/*.MuSE.txt
 variant_calling/tiddit/*/*.tiddit.ploidies.tab
diff --git a/tests/variant_calling_muse.nf.test b/tests/variant_calling_muse.nf.test
index 42b56ca63f..f4428f2306 100644
--- a/tests/variant_calling_muse.nf.test
+++ b/tests/variant_calling_muse.nf.test
@@ -41,6 +41,10 @@ nextflow_pipeline {
             // bam_files: All bam files
             def bam_files   = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
             def fasta       = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta'
+            // vcf_files: All vcf files
+            def vcf_files   = getAllFilesFromDir(params.outdir, include: ['**/*.vcf', '**/*.vcf.gz'])
+            // Mtxt_files: MuSE txt files
+            def txt_files   = getAllFilesFromDir(params.outdir, include: ['**/*.MuSE.txt'])
             assertAll(
                 { assert workflow.success},
                 { assert snapshot(
@@ -52,8 +56,12 @@ nextflow_pipeline {
                     stable_name,
                     // All files with stable contents
                     stable_path,
+                    // MuSE txt files will differ in their first line (holds Build Date & Time) between conda and docker/singularity
+                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1].join('\n').md5() ] },
                     // All bam files
-                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] }
+                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] },
+                    // All vcf files
+                    vcf_files.collect { file -> [file.getName(), path(file.toString()).vcf.variantsMD5] }
                 ).match() }
             )
         }
@@ -96,6 +104,8 @@ nextflow_pipeline {
             // bam_files: All bam files
             def bam_files   = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
             def fasta       = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta'
+            // vcf_files: All vcf files
+            def vcf_files  = getAllFilesFromDir(params.outdir, include: ['**/*.vcf', '**/*.vcf.gz'])
             assertAll(
                 { assert workflow.success},
                 { assert snapshot(
@@ -108,7 +118,9 @@ nextflow_pipeline {
                     // All files with stable contents
                     stable_path,
                     // All bam files
-                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] }
+                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] },
+                    // All vcf files
+                    vcf_files.collect { file -> file }
                 ).match() }
             )
         }
diff --git a/tests/variant_calling_muse.nf.test.snap b/tests/variant_calling_muse.nf.test.snap
index 1801e32cca..ad09fc26f8 100644
--- a/tests/variant_calling_muse.nf.test.snap
+++ b/tests/variant_calling_muse.nf.test.snap
@@ -1,156 +1,4 @@
 {
-    "-profile test --tools muse --input recalibrated_somatic.csv": {
-        "content": [
-            18,
-            {
-                "BCFTOOLS_STATS": {
-                    "bcftools": 1.2
-                },
-                "CRAM_TO_BAM_NORMAL": {
-                    "samtools": 1.21
-                },
-                "CRAM_TO_BAM_TUMOR": {
-                    "samtools": 1.21
-                },
-                "MUSE_CALL": {
-                    "MuSE": "v2.1.2"
-                },
-                "MUSE_SUMP": {
-                    "MuSE": "v2.1.2",
-                    "bgzip": 1.21
-                },
-                "VCFTOOLS_TSTV_COUNT": {
-                    "vcftools": "0.1.16"
-                },
-                "Workflow": {
-                    "nf-core/sarek": "v3.6.0dev"
-                }
-            },
-            [
-                "cram",
-                "cram/sample3.bam",
-                "cram/sample3.bam.bai",
-                "cram/sample4.bam",
-                "cram/sample4.bam.bai",
-                "csv",
-                "csv/variantcalled.csv",
-                "multiqc",
-                "multiqc/multiqc_data",
-                "multiqc/multiqc_data/bcftools_stats_indel-lengths.txt",
-                "multiqc/multiqc_data/multiqc.log",
-                "multiqc/multiqc_data/multiqc_bcftools_stats.txt",
-                "multiqc/multiqc_data/multiqc_citations.txt",
-                "multiqc/multiqc_data/multiqc_data.json",
-                "multiqc/multiqc_data/multiqc_general_stats.txt",
-                "multiqc/multiqc_data/multiqc_software_versions.txt",
-                "multiqc/multiqc_data/multiqc_sources.txt",
-                "multiqc/multiqc_data/vcftools_tstv_by_count.txt",
-                "multiqc/multiqc_data/vcftools_tstv_by_qual.txt",
-                "multiqc/multiqc_plots",
-                "multiqc/multiqc_plots/pdf",
-                "multiqc/multiqc_plots/pdf/bcftools_stats_indel-lengths.pdf",
-                "multiqc/multiqc_plots/pdf/general_stats_table.pdf",
-                "multiqc/multiqc_plots/pdf/vcftools_tstv_by_count.pdf",
-                "multiqc/multiqc_plots/pdf/vcftools_tstv_by_qual.pdf",
-                "multiqc/multiqc_plots/png",
-                "multiqc/multiqc_plots/png/bcftools_stats_indel-lengths.png",
-                "multiqc/multiqc_plots/png/general_stats_table.png",
-                "multiqc/multiqc_plots/png/vcftools_tstv_by_count.png",
-                "multiqc/multiqc_plots/png/vcftools_tstv_by_qual.png",
-                "multiqc/multiqc_plots/svg",
-                "multiqc/multiqc_plots/svg/bcftools_stats_indel-lengths.svg",
-                "multiqc/multiqc_plots/svg/general_stats_table.svg",
-                "multiqc/multiqc_plots/svg/vcftools_tstv_by_count.svg",
-                "multiqc/multiqc_plots/svg/vcftools_tstv_by_qual.svg",
-                "multiqc/multiqc_report.html",
-                "pipeline_info",
-                "pipeline_info/nf_core_sarek_software_mqc_versions.yml",
-                "reference",
-                "reference/dict",
-                "reports",
-                "reports/bcftools",
-                "reports/bcftools/muse",
-                "reports/bcftools/muse/sample4_vs_sample3",
-                "reports/bcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.bcftools_stats.txt",
-                "reports/mosdepth",
-                "reports/mosdepth/sample3",
-                "reports/mosdepth/sample3/sample3.recal.mosdepth.global.dist.txt",
-                "reports/mosdepth/sample3/sample3.recal.mosdepth.region.dist.txt",
-                "reports/mosdepth/sample3/sample3.recal.mosdepth.summary.txt",
-                "reports/mosdepth/sample3/sample3.recal.per-base.bed.gz",
-                "reports/mosdepth/sample3/sample3.recal.per-base.bed.gz.csi",
-                "reports/mosdepth/sample3/sample3.recal.regions.bed.gz",
-                "reports/mosdepth/sample3/sample3.recal.regions.bed.gz.csi",
-                "reports/mosdepth/sample4",
-                "reports/mosdepth/sample4/sample4.recal.mosdepth.global.dist.txt",
-                "reports/mosdepth/sample4/sample4.recal.mosdepth.region.dist.txt",
-                "reports/mosdepth/sample4/sample4.recal.mosdepth.summary.txt",
-                "reports/mosdepth/sample4/sample4.recal.per-base.bed.gz",
-                "reports/mosdepth/sample4/sample4.recal.per-base.bed.gz.csi",
-                "reports/mosdepth/sample4/sample4.recal.regions.bed.gz",
-                "reports/mosdepth/sample4/sample4.recal.regions.bed.gz.csi",
-                "reports/samtools",
-                "reports/samtools/sample3",
-                "reports/samtools/sample3/sample3.recal.cram.stats",
-                "reports/samtools/sample4",
-                "reports/samtools/sample4/sample4.recal.cram.stats",
-                "reports/vcftools",
-                "reports/vcftools/muse",
-                "reports/vcftools/muse/sample4_vs_sample3",
-                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.FILTER.summary",
-                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.TsTv.count",
-                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.TsTv.qual",
-                "variant_calling",
-                "variant_calling/muse",
-                "variant_calling/muse/sample4_vs_sample3",
-                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.MuSE.txt",
-                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz"
-            ],
-            [
-                "sample3.bam:md5,8cfa7f35990240ab663a0776ae67ecdc",
-                "sample3.bam.bai:md5,c55142e20838c3b56d93ff853a7b7189",
-                "sample4.bam:md5,fe8ceee2ede1f9b0b4f2aaa3f1a97241",
-                "sample4.bam.bai:md5,c6d0e6be2e5d8a6bd312517d9ba0f4af",
-                "bcftools_stats_indel-lengths.txt:md5,a61271bd3cf0a87521bd00049e260cef",
-                "multiqc_bcftools_stats.txt:md5,a268831d16d1d8e2c800c3c5b045fb2e",
-                "multiqc_citations.txt:md5,ac2b3cf2dfb12c40837b9bbad8112d86",
-                "vcftools_tstv_by_count.txt:md5,0f4e35a5c711129a5df1f6c8cf2a6678",
-                "sample4_vs_sample3.muse.bcftools_stats.txt:md5,0a4c6d5841a55b492a50917b0610a0b3",
-                "sample3.recal.mosdepth.global.dist.txt:md5,69e29702ef01fd8f6c7a5468fc35a16a",
-                "sample3.recal.mosdepth.region.dist.txt:md5,6ec49cd7d510c2eb3d9d90fdb79b783a",
-                "sample3.recal.mosdepth.summary.txt:md5,103098d0bf76ed82d2b87d5f242b099a",
-                "sample3.recal.per-base.bed.gz:md5,297f96648928d0ca5184223fb9941e7c",
-                "sample3.recal.per-base.bed.gz.csi:md5,519cc5bf84da0d71b87a88c76f83194e",
-                "sample3.recal.regions.bed.gz:md5,314ce8d7273eff353072108aa77c327c",
-                "sample3.recal.regions.bed.gz.csi:md5,538cb5d244411a670a4b041691f8825b",
-                "sample4.recal.mosdepth.global.dist.txt:md5,f2dcd00a64947c49e8e4b93c2f4fbf27",
-                "sample4.recal.mosdepth.region.dist.txt:md5,39005ffaac22871ffaaf19656fe69c5b",
-                "sample4.recal.mosdepth.summary.txt:md5,68d4b98f17361fddf73052ead34fa370",
-                "sample4.recal.per-base.bed.gz:md5,39a1bc436aa8546c26faedbe94cb676c",
-                "sample4.recal.per-base.bed.gz.csi:md5,aaa7bed9e7ef873b23bca249b8b58eb9",
-                "sample4.recal.regions.bed.gz:md5,b7561bc56a955f7db0f11e67e2ec0386",
-                "sample4.recal.regions.bed.gz.csi:md5,538cb5d244411a670a4b041691f8825b",
-                "sample4_vs_sample3.muse.FILTER.summary:md5,1ce42d34e4ae919afb519efc99146423",
-                "sample4_vs_sample3.muse.TsTv.count:md5,8dcfdbcaac118df1d5ad407dd2af699f",
-                "sample4_vs_sample3.MuSE.txt:md5,06f2eb941e03ea238ca8d864985aa6f1"
-            ],
-            [
-                [
-                    "sample3.bam",
-                    "891da60dc1cc5c6455bfc1442aea0982"
-                ],
-                [
-                    "sample4.bam",
-                    "36856b3e6dd1bc0f10688b9d8c02faa8"
-                ]
-            ]
-        ],
-        "meta": {
-            "nf-test": "0.9.2",
-            "nextflow": "24.10.4"
-        },
-        "timestamp": "2025-02-24T10:09:35.350085828"
-    },
     "-profile test --tools muse --input recalibrated_somatic.csv -stub": {
         "content": [
             17,
@@ -165,10 +13,10 @@
                     "samtools": 1.21
                 },
                 "MUSE_CALL": {
-                    "MuSE": "v2.1.2"
+                    "MuSE": "2.1.2"
                 },
                 "MUSE_SUMP": {
-                    "MuSE": "v2.1.2",
+                    "MuSE": "2.1.2",
                     "bgzip": 1.21
                 },
                 "VCFTOOLS_TSTV_COUNT": {
@@ -300,7 +148,8 @@
                 "variant_calling/muse",
                 "variant_calling/muse/sample4_vs_sample3",
                 "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.MuSE.txt",
-                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz"
+                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz",
+                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz.tbi"
             ],
             [
                 "sample3.bai:md5,d41d8cd98f00b204e9800998ecf8427e",
@@ -392,8 +241,7 @@
                 "sample4_vs_sample3.muse.tped:md5,d41d8cd98f00b204e9800998ecf8427e",
                 "sample4_vs_sample3.muse.vcf:md5,d41d8cd98f00b204e9800998ecf8427e",
                 "sample4_vs_sample3.muse.weir.fst:md5,d41d8cd98f00b204e9800998ecf8427e",
-                "sample4_vs_sample3.muse.windowed.pi:md5,d41d8cd98f00b204e9800998ecf8427e",
-                "sample4_vs_sample3.MuSE.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+                "sample4_vs_sample3.muse.windowed.pi:md5,d41d8cd98f00b204e9800998ecf8427e"
             ],
             [
                 [
@@ -404,12 +252,180 @@
                     "sample4.bam",
                     "d41d8cd98f00b204e9800998ecf8427e"
                 ]
+            ],
+            [
+                "sample4_vs_sample3.muse.vcf:md5,d41d8cd98f00b204e9800998ecf8427e",
+                "sample4_vs_sample3.muse.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
             ]
         ],
         "meta": {
             "nf-test": "0.9.2",
             "nextflow": "24.10.4"
         },
-        "timestamp": "2025-02-24T10:10:10.73871183"
+        "timestamp": "2025-04-07T15:04:10.141661"
+    },
+    "-profile test --tools muse --input recalibrated_somatic.csv": {
+        "content": [
+            18,
+            {
+                "BCFTOOLS_STATS": {
+                    "bcftools": 1.2
+                },
+                "CRAM_TO_BAM_NORMAL": {
+                    "samtools": 1.21
+                },
+                "CRAM_TO_BAM_TUMOR": {
+                    "samtools": 1.21
+                },
+                "MUSE_CALL": {
+                    "MuSE": "2.1.2"
+                },
+                "MUSE_SUMP": {
+                    "MuSE": "2.1.2",
+                    "bgzip": 1.21
+                },
+                "VCFTOOLS_TSTV_COUNT": {
+                    "vcftools": "0.1.16"
+                },
+                "Workflow": {
+                    "nf-core/sarek": "v3.6.0dev"
+                }
+            },
+            [
+                "cram",
+                "cram/sample3.bam",
+                "cram/sample3.bam.bai",
+                "cram/sample4.bam",
+                "cram/sample4.bam.bai",
+                "csv",
+                "csv/variantcalled.csv",
+                "multiqc",
+                "multiqc/multiqc_data",
+                "multiqc/multiqc_data/bcftools_stats_indel-lengths.txt",
+                "multiqc/multiqc_data/multiqc.log",
+                "multiqc/multiqc_data/multiqc_bcftools_stats.txt",
+                "multiqc/multiqc_data/multiqc_citations.txt",
+                "multiqc/multiqc_data/multiqc_data.json",
+                "multiqc/multiqc_data/multiqc_general_stats.txt",
+                "multiqc/multiqc_data/multiqc_software_versions.txt",
+                "multiqc/multiqc_data/multiqc_sources.txt",
+                "multiqc/multiqc_data/vcftools_tstv_by_count.txt",
+                "multiqc/multiqc_data/vcftools_tstv_by_qual.txt",
+                "multiqc/multiqc_plots",
+                "multiqc/multiqc_plots/pdf",
+                "multiqc/multiqc_plots/pdf/bcftools_stats_indel-lengths.pdf",
+                "multiqc/multiqc_plots/pdf/general_stats_table.pdf",
+                "multiqc/multiqc_plots/pdf/vcftools_tstv_by_count.pdf",
+                "multiqc/multiqc_plots/pdf/vcftools_tstv_by_qual.pdf",
+                "multiqc/multiqc_plots/png",
+                "multiqc/multiqc_plots/png/bcftools_stats_indel-lengths.png",
+                "multiqc/multiqc_plots/png/general_stats_table.png",
+                "multiqc/multiqc_plots/png/vcftools_tstv_by_count.png",
+                "multiqc/multiqc_plots/png/vcftools_tstv_by_qual.png",
+                "multiqc/multiqc_plots/svg",
+                "multiqc/multiqc_plots/svg/bcftools_stats_indel-lengths.svg",
+                "multiqc/multiqc_plots/svg/general_stats_table.svg",
+                "multiqc/multiqc_plots/svg/vcftools_tstv_by_count.svg",
+                "multiqc/multiqc_plots/svg/vcftools_tstv_by_qual.svg",
+                "multiqc/multiqc_report.html",
+                "pipeline_info",
+                "pipeline_info/nf_core_sarek_software_mqc_versions.yml",
+                "reference",
+                "reference/dict",
+                "reports",
+                "reports/bcftools",
+                "reports/bcftools/muse",
+                "reports/bcftools/muse/sample4_vs_sample3",
+                "reports/bcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.bcftools_stats.txt",
+                "reports/mosdepth",
+                "reports/mosdepth/sample3",
+                "reports/mosdepth/sample3/sample3.recal.mosdepth.global.dist.txt",
+                "reports/mosdepth/sample3/sample3.recal.mosdepth.region.dist.txt",
+                "reports/mosdepth/sample3/sample3.recal.mosdepth.summary.txt",
+                "reports/mosdepth/sample3/sample3.recal.per-base.bed.gz",
+                "reports/mosdepth/sample3/sample3.recal.per-base.bed.gz.csi",
+                "reports/mosdepth/sample3/sample3.recal.regions.bed.gz",
+                "reports/mosdepth/sample3/sample3.recal.regions.bed.gz.csi",
+                "reports/mosdepth/sample4",
+                "reports/mosdepth/sample4/sample4.recal.mosdepth.global.dist.txt",
+                "reports/mosdepth/sample4/sample4.recal.mosdepth.region.dist.txt",
+                "reports/mosdepth/sample4/sample4.recal.mosdepth.summary.txt",
+                "reports/mosdepth/sample4/sample4.recal.per-base.bed.gz",
+                "reports/mosdepth/sample4/sample4.recal.per-base.bed.gz.csi",
+                "reports/mosdepth/sample4/sample4.recal.regions.bed.gz",
+                "reports/mosdepth/sample4/sample4.recal.regions.bed.gz.csi",
+                "reports/samtools",
+                "reports/samtools/sample3",
+                "reports/samtools/sample3/sample3.recal.cram.stats",
+                "reports/samtools/sample4",
+                "reports/samtools/sample4/sample4.recal.cram.stats",
+                "reports/vcftools",
+                "reports/vcftools/muse",
+                "reports/vcftools/muse/sample4_vs_sample3",
+                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.FILTER.summary",
+                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.TsTv.count",
+                "reports/vcftools/muse/sample4_vs_sample3/sample4_vs_sample3.muse.TsTv.qual",
+                "variant_calling",
+                "variant_calling/muse",
+                "variant_calling/muse/sample4_vs_sample3",
+                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.MuSE.txt",
+                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz",
+                "variant_calling/muse/sample4_vs_sample3/sample4_vs_sample3.muse.vcf.gz.tbi"
+            ],
+            [
+                "sample3.bam:md5,8cfa7f35990240ab663a0776ae67ecdc",
+                "sample3.bam.bai:md5,c55142e20838c3b56d93ff853a7b7189",
+                "sample4.bam:md5,fe8ceee2ede1f9b0b4f2aaa3f1a97241",
+                "sample4.bam.bai:md5,c6d0e6be2e5d8a6bd312517d9ba0f4af",
+                "bcftools_stats_indel-lengths.txt:md5,a61271bd3cf0a87521bd00049e260cef",
+                "multiqc_bcftools_stats.txt:md5,a268831d16d1d8e2c800c3c5b045fb2e",
+                "multiqc_citations.txt:md5,ac2b3cf2dfb12c40837b9bbad8112d86",
+                "vcftools_tstv_by_count.txt:md5,0f4e35a5c711129a5df1f6c8cf2a6678",
+                "sample4_vs_sample3.muse.bcftools_stats.txt:md5,0a4c6d5841a55b492a50917b0610a0b3",
+                "sample3.recal.mosdepth.global.dist.txt:md5,69e29702ef01fd8f6c7a5468fc35a16a",
+                "sample3.recal.mosdepth.region.dist.txt:md5,6ec49cd7d510c2eb3d9d90fdb79b783a",
+                "sample3.recal.mosdepth.summary.txt:md5,103098d0bf76ed82d2b87d5f242b099a",
+                "sample3.recal.per-base.bed.gz:md5,297f96648928d0ca5184223fb9941e7c",
+                "sample3.recal.per-base.bed.gz.csi:md5,519cc5bf84da0d71b87a88c76f83194e",
+                "sample3.recal.regions.bed.gz:md5,314ce8d7273eff353072108aa77c327c",
+                "sample3.recal.regions.bed.gz.csi:md5,538cb5d244411a670a4b041691f8825b",
+                "sample4.recal.mosdepth.global.dist.txt:md5,f2dcd00a64947c49e8e4b93c2f4fbf27",
+                "sample4.recal.mosdepth.region.dist.txt:md5,39005ffaac22871ffaaf19656fe69c5b",
+                "sample4.recal.mosdepth.summary.txt:md5,68d4b98f17361fddf73052ead34fa370",
+                "sample4.recal.per-base.bed.gz:md5,39a1bc436aa8546c26faedbe94cb676c",
+                "sample4.recal.per-base.bed.gz.csi:md5,aaa7bed9e7ef873b23bca249b8b58eb9",
+                "sample4.recal.regions.bed.gz:md5,b7561bc56a955f7db0f11e67e2ec0386",
+                "sample4.recal.regions.bed.gz.csi:md5,538cb5d244411a670a4b041691f8825b",
+                "sample4_vs_sample3.muse.FILTER.summary:md5,1ce42d34e4ae919afb519efc99146423",
+                "sample4_vs_sample3.muse.TsTv.count:md5,8dcfdbcaac118df1d5ad407dd2af699f"
+            ],
+            [
+                [
+                    "sample4_vs_sample3.MuSE.txt",
+                    "32961f7d718b4a1114f168253e50ef9e"
+                ]
+            ],
+            [
+                [
+                    "sample3.bam",
+                    "891da60dc1cc5c6455bfc1442aea0982"
+                ],
+                [
+                    "sample4.bam",
+                    "36856b3e6dd1bc0f10688b9d8c02faa8"
+                ]
+            ],
+            [
+                [
+                    "sample4_vs_sample3.muse.vcf.gz",
+                    "d41d8cd98f00b204e9800998ecf8427e"
+                ]
+            ]
+        ],
+        "meta": {
+            "nf-test": "0.9.2",
+            "nextflow": "24.10.5"
+        },
+        "timestamp": "2025-04-08T14:09:40.119006654"
     }
-}
+}
\ No newline at end of file


Reviews:
user: login: maxulysse
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-08T09:45:10Z
user: login: maxulysse
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-08T10:24:10Z
user: login: maxulysse
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-08T10:24:27Z
user: login: famosab
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T10:25:29Z
user: login: maxulysse
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-08T13:08:05Z

Review comments:
diff_hunk: @@ -52,8 +57,13 @@ nextflow_pipeline {
                     stable_name,
                     // All files with stable contents
                     stable_path,
+                    // MuSE txt files will differ in their first line (holds Build Date & Time) between conda and docker/singularity
+                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1] ] },
                     // All bam files
-                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] }
+                    bam_files.collect{ file -> [ file.getName(), bam(file.toString(), fasta).getReadsMD5() ] },
+                    // All vcf files
+                    vcf_files.collect { file -> [file.getName(), path(file.toString()).vcf.variantsMD5] },
+                    count_files.collect{ file -> [ file.getName(), file.readLines() ] },
path: tests/variant_calling_muse.nf.test
user: login: maxulysse
body: Now that we know that the contents are stable, how about we md5 it?
https://www.nf-test.com/docs/assertions/files/#md5-checksum
created_at: 2025-04-08T09:45:09Z
author_association: MEMBER
diff_hunk: @@ -52,8 +56,12 @@ nextflow_pipeline {
                     stable_name,
                     // All files with stable contents
                     stable_path,
+                    // MuSE txt files will differ in their first line (holds Build Date & Time) between conda and docker/singularity
+                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1] ] },
path: tests/variant_calling_muse.nf.test
user: login: maxulysse
body: ```suggestion
                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1].md5 ] },
```
created_at: 2025-04-08T10:24:09Z
author_association: MEMBER
diff_hunk: @@ -52,8 +56,12 @@ nextflow_pipeline {
                     stable_name,
                     // All files with stable contents
                     stable_path,
+                    // MuSE txt files will differ in their first line (holds Build Date & Time) between conda and docker/singularity
+                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1] ] },
path: tests/variant_calling_muse.nf.test
user: login: maxulysse
body: I'd do something like that to reduce the output in the snapshot
created_at: 2025-04-08T10:24:27Z
author_association: MEMBER
diff_hunk: @@ -52,8 +56,12 @@ nextflow_pipeline {
                     stable_name,
                     // All files with stable contents
                     stable_path,
+                    // MuSE txt files will differ in their first line (holds Build Date & Time) between conda and docker/singularity
+                    txt_files.collect{ file -> [ file.getName(), file.readLines()[2..-1] ] },
path: tests/variant_calling_muse.nf.test
user: login: famosab
body: ahhhh is that something that can be done - amazing haha
created_at: 2025-04-08T10:25:29Z
author_association: CONTRIBUTOR

PR comments:
user: login: nf-core-bot
created_at: 2025-04-04T08:55:54Z
body: <!-- add-pr-comment:add-pr-comment -->

> [!WARNING]
> Newer version of the nf-core template is available.
>
> Your pipeline is using an old version of the nf-core template: 3.0.2.
> Please update your pipeline to the latest version.
>
> For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
author_association: MEMBER
user: login: famosab
created_at: 2025-04-07T09:33:41Z
body: When testing the changes, I always run into this error: https://github.com/wwylab/MuSE/issues/33 (but only for MUSE_SUMP not for MUSE_CALL).
author_association: CONTRIBUTOR
user: login: famosab
created_at: 2025-04-07T11:01:26Z
body: When I remove `test` from profile and run with the test data it works -.-
author_association: CONTRIBUTOR