From fec36e20e4339b58d90402d0d1a07577813743c4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 7 Nov 2024 17:40:40 +0100 Subject: [PATCH 1/6] new output structure --- conf/test.config | 1 - main.nf | 47 ++++++++++--------- nextflow.config | 26 +++++----- nextflow_schema.json | 9 ---- .../utils_cmgg_germline_pipeline/main.nf | 2 +- .../nf-core/utils_nextflow_pipeline/main.nf | 2 +- workflows/germline.nf | 2 +- 7 files changed, 39 insertions(+), 50 deletions(-) diff --git a/conf/test.config b/conf/test.config index c259bd53..cdb5273d 100644 --- a/conf/test.config +++ b/conf/test.config @@ -46,7 +46,6 @@ params { validate = true add_ped = true vep_chunk_size = 10000 - project = "test" normalize = true updio = true automap = true diff --git a/main.nf b/main.nf index 3c22bec8..1891d809 100644 --- a/main.nf +++ b/main.nf @@ -51,6 +51,7 @@ params.vcfanno_config = getGenomeAttribute('vcfanno_config', params.genome include { GERMLINE } from './workflows/germline' include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_cmgg_germline_pipeline' include { PIPELINE_COMPLETION } from './subworkflows/local/utils_cmgg_germline_pipeline' +include { getWorkflowVersion } from './subworkflows/nf-core/utils_nfcore_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -217,10 +218,10 @@ workflow { publish: ch_gvcfs_out >> 'gvcfs' - GERMLINE.out.genomicsdb >> 'genomicsdb' GERMLINE.out.single_beds >> 'single_beds' GERMLINE.out.validation >> 'validation' GERMLINE.out.gvcf_reports >> 'gvcf_reports' + GERMLINE.out.genomicsdb >> 'genomicsdb' GERMLINE.out.vcfs >> 'vcfs' GERMLINE.out.gemini >> 'gemini' GERMLINE.out.peds >> 'peds' @@ -231,61 +232,61 @@ workflow { GERMLINE.out.multiqc_report >> 'multiqc' } -def project_name = params.project ?: workflow.runName -def final_prefix = params.skip_date_project ? "${project_name}" : "${new Date().format("yyyy-MM-dd")}_${project_name}" +def pipeline_version = getWorkflowVersion().replace(".", "_") +def date = new Date().format("yyyy_MM_dd") output { 'gvcfs' { path { meta, gvcf, _tbi -> { file -> if(file == gvcf.name) { - return "${meta.id}/${meta.id}.${meta.caller}.g.vcf.gz" + return "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.g.vcf.gz" } - return "${meta.id}/${meta.id}.${meta.caller}.g.vcf.gz.tbi" + return "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.g.vcf.gz.tbi" } } } - 'genomicsdb' { - enabled (params.output_genomicsdb || params.only_merge) - path { meta, genomicsdb -> - { file -> "${final_prefix}/${meta.family}/${meta.id}_${meta.caller}_genomicsdb"} - } - } 'single_beds' { - path { meta, _bed -> { _file -> "${meta.id}/${meta.id}.bed" } } + path { meta, _bed -> { _file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.bed" } } } 'validation' { - path { meta, _report -> { file -> "${meta.id}/validation/${meta.caller}/${file}" } } + path { meta, _report -> { file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/validation/${meta.caller}/${file}" } } } 'gvcf_reports' { - path { meta, _report -> { _file -> "${meta.id}/reports/${meta.id}.${meta.caller}.bcftools_stats.txt" }} + path { meta, _report -> { _file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.bcftools_stats.txt" }} + } + 'genomicsdb' { + enabled (params.output_genomicsdb || params.only_merge) + path { meta, genomicsdb -> + { file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}_${meta.caller}_genomicsdb"} + } } 'vcfs' { path { meta, vcf, _tbi -> { file -> if(file == vcf.name) { - return "${final_prefix}/${meta.family}/${meta.id}.${meta.caller}.vcf.gz" + return "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.vcf.gz" } - return "${final_prefix}/${meta.family}/${meta.id}.${meta.caller}.vcf.gz.tbi" + return "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.vcf.gz.tbi" } } } 'gemini' { - path { meta, _db -> { _file -> "${final_prefix}/${meta.family}/${meta.id}.${meta.caller}.db"}} + path { meta, _db -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.db"}} } 'peds' { - path { meta, _ped -> { _file -> "${final_prefix}/${meta.family}/${meta.id}.${meta.caller}.ped"}} + path { meta, _ped -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.ped"}} } 'joint_beds' { - path { meta, _bed -> { _file -> "${final_prefix}/${meta.family}/${meta.id}.${meta.caller}.bed"}} + path { meta, _bed -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.bed"}} } 'final_reports' { - path { meta, _report -> { file -> "${final_prefix}/${meta.family}/reports/${file}"}} + path { meta, _report -> { file -> "${meta.family}/qc_${pipeline_version}_${date}/${file}"}} } 'automap' { - path { meta, _automap -> { file -> "${final_prefix}/${meta.family}/automap/${meta.caller}"}} + path { meta, _automap -> { file -> "${meta.family}/output_${pipeline_version}_${date}/automap/${meta.caller}"}} } 'updio' { - path { meta, _updio -> { file -> "${final_prefix}/${meta.family}/updio/${meta.caller}"}} + path { meta, _updio -> { file -> "${meta.family}/output_${pipeline_version}_${date}/updio/${meta.caller}"}} } 'multiqc' { - path { _report -> { _file -> "multiqc/multiqc_report.html"}} + path { _report -> { _file -> "${pipeline_version}_${date}/multiqc_report.html"}} } } diff --git a/nextflow.config b/nextflow.config index 4877e4d7..8671e61a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -22,8 +22,6 @@ params { add_ped = false validate = false roi = null - project = null - skip_date_project = false only_call = false only_merge = false output_genomicsdb = false @@ -271,9 +269,20 @@ set -C # No clobber - prevent output redirection from overwriting files. // Disable process selector warnings by default. Use debug profile to enable warnings. nextflow.enable.configProcessNamesValidation = false +manifest { + name = 'nf-cmgg/germline' + author = """nvnieuwk""" + homePage = 'https://github.com/nf-cmgg/germline' + description = """A nextflow pipeline for calling and annotating small germline variants from short DNA reads for WES and WGS data""" + mainScript = 'main.nf' + nextflowVersion = '!>=24.10.0' + version = '1.9.0dev' + doi = '' +} + timeline { enabled = true - file = "${params.outdir}/pipeline_info/execution_timeline_${new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')}.html" + file = "${params.outdir}/v${manifest.version.replace('.', '_')}_${new Date().format("yyyy_MM_dd")}/execution_timeline_${new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')}.html" } report { enabled = true @@ -288,17 +297,6 @@ dag { file = timeline.file.replace("execution_timeline", "pipeline_dag") } -manifest { - name = 'nf-cmgg/germline' - author = """nvnieuwk""" - homePage = 'https://github.com/nf-cmgg/germline' - description = """A nextflow pipeline for calling and annotating small germline variants from short DNA reads for WES and WGS data""" - mainScript = 'main.nf' - nextflowVersion = '!>=24.10.0' - version = '1.9.0dev' - doi = '' -} - // Nextflow plugins plugins { id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet diff --git a/nextflow_schema.json b/nextflow_schema.json index 79d18c26..4ce42943 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -210,15 +210,6 @@ "description": "Don't run mosdepth in fast-mode", "help_text": "This is advised if you need exact coverage BED files as output." }, - "project": { - "type": "string", - "description": "The name of the project.", - "help_text": "This will be used to specify the name of the final output files folder in the output directory." - }, - "skip_date_project": { - "type": "boolean", - "description": "Don't add the current date to the output project folder." - }, "roi": { "type": "string", "description": "Path to the default ROI (regions of interest) BED file to be used for WES analysis.", diff --git a/subworkflows/local/utils_cmgg_germline_pipeline/main.nf b/subworkflows/local/utils_cmgg_germline_pipeline/main.nf index 343aa32d..8c463532 100644 --- a/subworkflows/local/utils_cmgg_germline_pipeline/main.nf +++ b/subworkflows/local/utils_cmgg_germline_pipeline/main.nf @@ -84,7 +84,7 @@ workflow PIPELINE_INITIALISATION { ) // Output the samplesheet - file(input).copyTo("${outdir}/samplesheet.csv") + file(input).copyTo("${outdir}/v${workflow.manifest.version.replace('.', '_')}_${new Date().format("yyyy_MM_dd")}/samplesheet.csv") emit: samplesheet = WATCHPATH_HANDLING.out.samplesheet diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index b17b8774..bf347813 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -77,7 +77,7 @@ def dumpParametersToJSON(outdir) { def jsonStr = groovy.json.JsonOutput.toJson(params) temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) - nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/v${workflow.manifest.version.replace('.', '_')}_${new Date().format("yyyy_MM_dd")}/params_${timestamp}.json") temp_pf.delete() } diff --git a/workflows/germline.nf b/workflows/germline.nf index 060d75d7..42fdbe96 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -838,7 +838,7 @@ workflow GERMLINE { // def ch_collated_versions = softwareVersionsToYAML(ch_versions) .collectFile( - storeDir: "${outdir}/pipeline_info", + storeDir: "${outdir}/v${workflow.manifest.version.replace('.', '_')}_${new Date().format("yyyy_MM_dd")}", name: '' + 'pipeline_software_' + 'mqc_' + 'versions.yml', sort: true, newLine: true From 483030be0e82a130956ced7c2f5fde9fb8edb724 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 13 Nov 2024 14:53:36 +0100 Subject: [PATCH 2/6] fix tests --- .nf-core.yml | 2 +- CHANGELOG.md | 6 +- nextflow.config | 2 +- tests/pipeline/callers/main.nf.test | 39 ++- tests/pipeline/callers/main.nf.test.snap | 171 +++++---- tests/pipeline/default/main.nf.test | 17 +- tests/pipeline/default/main.nf.test.snap | 47 ++- tests/pipeline/gvcfs/main.nf.test | 17 +- tests/pipeline/gvcfs/main.nf.test.snap | 23 +- tests/pipeline/variations/main.nf.test | 72 +++- tests/pipeline/variations/main.nf.test.snap | 284 +++++++-------- tests/pipeline/variations2/main.nf.test | 61 +++- tests/pipeline/variations2/main.nf.test.snap | 351 +++++++++---------- 13 files changed, 579 insertions(+), 513 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index bb292c7d..8bc363c0 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -42,4 +42,4 @@ template: skip_features: - fastqc - is_nfcore - version: 1.9.0dev + version: 2.0.0dev diff --git a/CHANGELOG.md b/CHANGELOG.md index e77b12a8..38136a64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v1.9.0dev +## v2.0.0dev ### New features 1. Added the `--min_callable_coverage` parameter to state what the lowest coverage should for a region to be classified as callable. +2. Added the [`elprep` caller](https://github.com/ExaScience/elprep) as an alternative to the haplotypecaller. ### Changes 1. Added the `--squash-ploidy` argument to the RTG vcfeval process. 2. Update to nf-core v3.0.1 +3. Completely reworked the output directory structure to a more sensible structure. The pipeline can now be run on the same output directory every time and will incrementally add files to the correct family folder. See the [output documentation](https://nf-cmgg.github.io/germline/latest/output/) for more info. +4. Migrated to the new workflow output definitions. +5. Bumped the minimal Nextflow version to 24.10.0. ### Fixes diff --git a/nextflow.config b/nextflow.config index 8671e61a..1c9168ef 100644 --- a/nextflow.config +++ b/nextflow.config @@ -276,7 +276,7 @@ manifest { description = """A nextflow pipeline for calling and annotating small germline variants from short DNA reads for WES and WGS data""" mainScript = 'main.nf' nextflowVersion = '!>=24.10.0' - version = '1.9.0dev' + version = '2.0.0dev' doi = '' } diff --git a/tests/pipeline/callers/main.nf.test b/tests/pipeline/callers/main.nf.test index 18cfcb3a..b3701313 100644 --- a/tests/pipeline/callers/main.nf.test +++ b/tests/pipeline/callers/main.nf.test @@ -20,14 +20,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("vardict") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -45,14 +50,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("haplotypecaller") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -70,14 +80,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("vardict + haplotypecaller") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -91,3 +106,9 @@ def getRecursiveFileNames(fileOrDir, outputDir) { } return fileOrDir.toString().replace("${outputDir}/", "") } + +def getDynamicOutputName() { + def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) + def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) + return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String +} \ No newline at end of file diff --git a/tests/pipeline/callers/main.nf.test.snap b/tests/pipeline/callers/main.nf.test.snap index a4b2d068..dcd0e17c 100644 --- a/tests/pipeline/callers/main.nf.test.snap +++ b/tests/pipeline/callers/main.nf.test.snap @@ -1,119 +1,110 @@ { - "haplotypecaller": { + "pipeline_callers - haplotypecaller": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:43:23.245304993" + "timestamp": "2024-11-13T14:05:33.245638727" }, - "vardict + haplotypecaller": { + "pipeline_callers - vardict + haplotypecaller": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/NA24143.vardict.ped", - "test/Ashkenazim/NA24143.vardict.vcf.gz", - "test/Ashkenazim/NA24143.vardict.vcf.gz.tbi", - "test/Ashkenazim/NA24149.vardict.ped", - "test/Ashkenazim/NA24149.vardict.vcf.gz", - "test/Ashkenazim/NA24149.vardict.vcf.gz.tbi", - "test/Ashkenazim/NA24385.vardict.ped", - "test/Ashkenazim/NA24385.vardict.vcf.gz", - "test/Ashkenazim/NA24385.vardict.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html", - "test/Ashkenazim/reports/NA24143.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24143.vardict.html", - "test/Ashkenazim/reports/NA24149.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24149.vardict.html", - "test/Ashkenazim/reports/NA24385.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24385.vardict.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/output__/NA24143.vardict.ped", + "Ashkenazim/output__/NA24143.vardict.vcf.gz", + "Ashkenazim/output__/NA24143.vardict.vcf.gz.tbi", + "Ashkenazim/output__/NA24149.vardict.ped", + "Ashkenazim/output__/NA24149.vardict.vcf.gz", + "Ashkenazim/output__/NA24149.vardict.vcf.gz.tbi", + "Ashkenazim/output__/NA24385.vardict.ped", + "Ashkenazim/output__/NA24385.vardict.vcf.gz", + "Ashkenazim/output__/NA24385.vardict.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "Ashkenazim/qc__/NA24143.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24143.vardict.html", + "Ashkenazim/qc__/NA24149.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24149.vardict.html", + "Ashkenazim/qc__/NA24385.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24385.vardict.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:44:48.221710874" + "timestamp": "2024-11-13T14:09:45.604865258" }, - "vardict": { + "pipeline_callers - vardict": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24149/NA24149.bed", - "NA24385/NA24385.bed", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/NA24143.vardict.ped", - "test/Ashkenazim/NA24143.vardict.vcf.gz", - "test/Ashkenazim/NA24143.vardict.vcf.gz.tbi", - "test/Ashkenazim/NA24149.vardict.ped", - "test/Ashkenazim/NA24149.vardict.vcf.gz", - "test/Ashkenazim/NA24149.vardict.vcf.gz.tbi", - "test/Ashkenazim/NA24385.vardict.ped", - "test/Ashkenazim/NA24385.vardict.vcf.gz", - "test/Ashkenazim/NA24385.vardict.vcf.gz.tbi", - "test/Ashkenazim/reports/NA24143.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24143.vardict.html", - "test/Ashkenazim/reports/NA24149.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24149.vardict.html", - "test/Ashkenazim/reports/NA24385.vardict.bcftools_stats.txt", - "test/Ashkenazim/reports/NA24385.vardict.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/output__/NA24143.vardict.ped", + "Ashkenazim/output__/NA24143.vardict.vcf.gz", + "Ashkenazim/output__/NA24143.vardict.vcf.gz.tbi", + "Ashkenazim/output__/NA24149.vardict.ped", + "Ashkenazim/output__/NA24149.vardict.vcf.gz", + "Ashkenazim/output__/NA24149.vardict.vcf.gz.tbi", + "Ashkenazim/output__/NA24385.vardict.ped", + "Ashkenazim/output__/NA24385.vardict.vcf.gz", + "Ashkenazim/output__/NA24385.vardict.vcf.gz.tbi", + "Ashkenazim/qc__/NA24143.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24143.vardict.html", + "Ashkenazim/qc__/NA24149.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24149.vardict.html", + "Ashkenazim/qc__/NA24385.vardict.bcftools_stats.txt", + "Ashkenazim/qc__/NA24385.vardict.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:42:12.627820502" + "timestamp": "2024-11-13T14:02:38.547566464" } } \ No newline at end of file diff --git a/tests/pipeline/default/main.nf.test b/tests/pipeline/default/main.nf.test index 31b1a025..6f112d0d 100644 --- a/tests/pipeline/default/main.nf.test +++ b/tests/pipeline/default/main.nf.test @@ -19,14 +19,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("default") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -40,3 +45,9 @@ def getRecursiveFileNames(fileOrDir, outputDir) { } return fileOrDir.toString().replace("${outputDir}/", "") } + +def getDynamicOutputName() { + def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) + def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) + return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String +} diff --git a/tests/pipeline/default/main.nf.test.snap b/tests/pipeline/default/main.nf.test.snap index 39d941df..3bf2a32c 100644 --- a/tests/pipeline/default/main.nf.test.snap +++ b/tests/pipeline/default/main.nf.test.snap @@ -1,36 +1,33 @@ { - "default": { + "pipeline_default - default": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:45:55.603941963" + "timestamp": "2024-11-13T13:55:37.532795185" } } \ No newline at end of file diff --git a/tests/pipeline/gvcfs/main.nf.test b/tests/pipeline/gvcfs/main.nf.test index 19ec78f9..694288ff 100644 --- a/tests/pipeline/gvcfs/main.nf.test +++ b/tests/pipeline/gvcfs/main.nf.test @@ -20,14 +20,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("gvcfs") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -41,3 +46,9 @@ def getRecursiveFileNames(fileOrDir, outputDir) { } return fileOrDir.toString().replace("${outputDir}/", "") } + +def getDynamicOutputName() { + def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) + def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) + return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String +} diff --git a/tests/pipeline/gvcfs/main.nf.test.snap b/tests/pipeline/gvcfs/main.nf.test.snap index f768f819..2cd80e35 100644 --- a/tests/pipeline/gvcfs/main.nf.test.snap +++ b/tests/pipeline/gvcfs/main.nf.test.snap @@ -1,24 +1,21 @@ { - "gvcfs": { + "pipeline_default - gvcfs": { "content": [ [ - - ], - [ - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:46:42.423860055" + "timestamp": "2024-11-13T14:14:20.958812996" } } \ No newline at end of file diff --git a/tests/pipeline/variations/main.nf.test b/tests/pipeline/variations/main.nf.test index 738ec677..cdf7aff0 100644 --- a/tests/pipeline/variations/main.nf.test +++ b/tests/pipeline/variations/main.nf.test @@ -20,14 +20,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("annotate") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -46,14 +51,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("annotate + vcfanno") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -71,14 +81,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("filter") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -96,14 +111,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("only_call") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -122,14 +142,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("only_merge") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -147,14 +172,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("automap") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -167,3 +197,9 @@ def getRecursiveFileNames(fileOrDir, outputDir) { } return fileOrDir.toString().replace("${outputDir}/", "") } + +def getDynamicOutputName() { + def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) + def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) + return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String +} \ No newline at end of file diff --git a/tests/pipeline/variations/main.nf.test.snap b/tests/pipeline/variations/main.nf.test.snap index 0cc71b8d..95999b13 100644 --- a/tests/pipeline/variations/main.nf.test.snap +++ b/tests/pipeline/variations/main.nf.test.snap @@ -1,207 +1,189 @@ { - "filter": { + "pipeline_variations - only_merge": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim_haplotypecaller_genomicsdb", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:49:57.656894161" + "timestamp": "2024-11-13T14:28:35.043452694" }, - "only_call": { + "pipeline_variations - filter": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:50:40.472097341" + "timestamp": "2024-11-13T14:24:24.556080575" }, - "annotate + vcfanno": { + "pipeline_variations - annotate + vcfanno": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:48:54.662702263" + "timestamp": "2024-11-13T14:21:15.80188879" }, - "automap": { + "pipeline_variations - annotate": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/automap/haplotypecaller/sample1/sample1.HomRegions.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample1/sample1.HomRegions.pdf", - "test/Ashkenazim/automap/haplotypecaller/sample1/sample1.HomRegions.strict.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample1/sample1.HomRegions.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample2/sample2.HomRegions.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample2/sample2.HomRegions.pdf", - "test/Ashkenazim/automap/haplotypecaller/sample2/sample2.HomRegions.strict.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample2/sample2.HomRegions.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample3/sample3.HomRegions.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample3/sample3.HomRegions.pdf", - "test/Ashkenazim/automap/haplotypecaller/sample3/sample3.HomRegions.strict.cmgg_bio.tsv", - "test/Ashkenazim/automap/haplotypecaller/sample3/sample3.HomRegions.tsv", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:52:36.347896098" + "timestamp": "2024-11-13T14:17:45.975261786" }, - "only_merge": { + "pipeline_variations - only_call": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim_haplotypecaller_genomicsdb" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:51:28.398537842" + "timestamp": "2024-11-13T14:26:32.219983438" }, - "annotate": { + "pipeline_variations - automap": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/output__/automap/haplotypecaller/sample1/sample1.HomRegions.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample1/sample1.HomRegions.pdf", + "Ashkenazim/output__/automap/haplotypecaller/sample1/sample1.HomRegions.strict.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample1/sample1.HomRegions.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample2/sample2.HomRegions.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample2/sample2.HomRegions.pdf", + "Ashkenazim/output__/automap/haplotypecaller/sample2/sample2.HomRegions.strict.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample2/sample2.HomRegions.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample3/sample3.HomRegions.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample3/sample3.HomRegions.pdf", + "Ashkenazim/output__/automap/haplotypecaller/sample3/sample3.HomRegions.strict.cmgg_bio.tsv", + "Ashkenazim/output__/automap/haplotypecaller/sample3/sample3.HomRegions.tsv", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:47:49.203214292" + "timestamp": "2024-11-13T14:31:35.104677632" } } \ No newline at end of file diff --git a/tests/pipeline/variations2/main.nf.test b/tests/pipeline/variations2/main.nf.test index 58ad40a6..5070bc13 100644 --- a/tests/pipeline/variations2/main.nf.test +++ b/tests/pipeline/variations2/main.nf.test @@ -20,14 +20,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("normalize") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -45,14 +50,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("updio") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -70,14 +80,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("gemini") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -95,14 +110,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("validate") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -120,14 +140,19 @@ nextflow_pipeline { then { assertAll( { assert workflow.success }, + { assert !workflow.stdout }, { assert snapshot( - workflow.stdout, path("${outputDir}") .list() - .findAll { !it.toString().endsWith("pipeline_info") } .collect { getRecursiveFileNames(it, "${outputDir}") } .flatten() - ).match("add_ped") } + .findAll { + !(it.contains("/execution_") || it.contains("/params_") || it.contains("/pipeline_")) + } + .collect { + it.replace(getDynamicOutputName(), "_") + } + ).match() } ) } @@ -141,3 +166,9 @@ def getRecursiveFileNames(fileOrDir, outputDir) { } return fileOrDir.toString().replace("${outputDir}/", "") } + +def getDynamicOutputName() { + def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) + def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) + return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String +} \ No newline at end of file diff --git a/tests/pipeline/variations2/main.nf.test.snap b/tests/pipeline/variations2/main.nf.test.snap index 8983c0cd..e0053c6b 100644 --- a/tests/pipeline/variations2/main.nf.test.snap +++ b/tests/pipeline/variations2/main.nf.test.snap @@ -1,230 +1,215 @@ { - "gemini": { + "pipeline_variations - add_ped": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.db", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:55:45.617425912" + "timestamp": "2024-11-13T14:48:10.189725508" }, - "normalize": { + "pipeline_variations - normalize": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:53:40.939481984" + "timestamp": "2024-11-13T14:34:50.228561252" }, - "updio": { + "pipeline_variations - updio": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:54:44.363989965" + "timestamp": "2024-11-13T14:38:05.475938734" }, - "add_ped": { + "pipeline_variations - gemini": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.db", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:58:01.026718708" + "timestamp": "2024-11-13T14:41:11.213707091" }, - "validate": { + "pipeline_variations - validate": { "content": [ [ - - ], - [ - "NA24143/NA24143.bed", - "NA24143/NA24143.haplotypecaller.g.vcf.gz", - "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", - "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", - "NA24143/validation/haplotypecaller/NA24143.fn.vcf.gz", - "NA24143/validation/haplotypecaller/NA24143.fn.vcf.gz.tbi", - "NA24143/validation/haplotypecaller/NA24143.fp.vcf.gz", - "NA24143/validation/haplotypecaller/NA24143.fp.vcf.gz.tbi", - "NA24143/validation/haplotypecaller/NA24143.non_snp.png", - "NA24143/validation/haplotypecaller/NA24143.non_snp.svg", - "NA24143/validation/haplotypecaller/NA24143.non_snp_roc.tsv.gz", - "NA24143/validation/haplotypecaller/NA24143.phasing.txt", - "NA24143/validation/haplotypecaller/NA24143.snp.png", - "NA24143/validation/haplotypecaller/NA24143.snp.svg", - "NA24143/validation/haplotypecaller/NA24143.snp_roc.tsv.gz", - "NA24143/validation/haplotypecaller/NA24143.summary.txt", - "NA24143/validation/haplotypecaller/NA24143.tp-baseline.vcf.gz", - "NA24143/validation/haplotypecaller/NA24143.tp-baseline.vcf.gz.tbi", - "NA24143/validation/haplotypecaller/NA24143.tp.vcf.gz", - "NA24143/validation/haplotypecaller/NA24143.tp.vcf.gz.tbi", - "NA24143/validation/haplotypecaller/NA24143.weighted.png", - "NA24143/validation/haplotypecaller/NA24143.weighted.svg", - "NA24143/validation/haplotypecaller/NA24143.weighted_roc.tsv.gz", - "NA24149/NA24149.bed", - "NA24149/NA24149.haplotypecaller.g.vcf.gz", - "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", - "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", - "NA24149/validation/haplotypecaller/NA24149.fn.vcf.gz", - "NA24149/validation/haplotypecaller/NA24149.fn.vcf.gz.tbi", - "NA24149/validation/haplotypecaller/NA24149.fp.vcf.gz", - "NA24149/validation/haplotypecaller/NA24149.fp.vcf.gz.tbi", - "NA24149/validation/haplotypecaller/NA24149.non_snp.png", - "NA24149/validation/haplotypecaller/NA24149.non_snp.svg", - "NA24149/validation/haplotypecaller/NA24149.non_snp_roc.tsv.gz", - "NA24149/validation/haplotypecaller/NA24149.phasing.txt", - "NA24149/validation/haplotypecaller/NA24149.snp.png", - "NA24149/validation/haplotypecaller/NA24149.snp.svg", - "NA24149/validation/haplotypecaller/NA24149.snp_roc.tsv.gz", - "NA24149/validation/haplotypecaller/NA24149.summary.txt", - "NA24149/validation/haplotypecaller/NA24149.tp-baseline.vcf.gz", - "NA24149/validation/haplotypecaller/NA24149.tp-baseline.vcf.gz.tbi", - "NA24149/validation/haplotypecaller/NA24149.tp.vcf.gz", - "NA24149/validation/haplotypecaller/NA24149.tp.vcf.gz.tbi", - "NA24149/validation/haplotypecaller/NA24149.weighted.png", - "NA24149/validation/haplotypecaller/NA24149.weighted.svg", - "NA24149/validation/haplotypecaller/NA24149.weighted_roc.tsv.gz", - "NA24385/NA24385.bed", - "NA24385/NA24385.haplotypecaller.g.vcf.gz", - "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", - "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", - "NA24385/validation/haplotypecaller/NA24385.fn.vcf.gz", - "NA24385/validation/haplotypecaller/NA24385.fn.vcf.gz.tbi", - "NA24385/validation/haplotypecaller/NA24385.fp.vcf.gz", - "NA24385/validation/haplotypecaller/NA24385.fp.vcf.gz.tbi", - "NA24385/validation/haplotypecaller/NA24385.non_snp.png", - "NA24385/validation/haplotypecaller/NA24385.non_snp.svg", - "NA24385/validation/haplotypecaller/NA24385.non_snp_roc.tsv.gz", - "NA24385/validation/haplotypecaller/NA24385.phasing.txt", - "NA24385/validation/haplotypecaller/NA24385.snp.png", - "NA24385/validation/haplotypecaller/NA24385.snp.svg", - "NA24385/validation/haplotypecaller/NA24385.snp_roc.tsv.gz", - "NA24385/validation/haplotypecaller/NA24385.summary.txt", - "NA24385/validation/haplotypecaller/NA24385.tp-baseline.vcf.gz", - "NA24385/validation/haplotypecaller/NA24385.tp-baseline.vcf.gz.tbi", - "NA24385/validation/haplotypecaller/NA24385.tp.vcf.gz", - "NA24385/validation/haplotypecaller/NA24385.tp.vcf.gz.tbi", - "NA24385/validation/haplotypecaller/NA24385.weighted.png", - "NA24385/validation/haplotypecaller/NA24385.weighted.svg", - "NA24385/validation/haplotypecaller/NA24385.weighted_roc.tsv.gz", - "multiqc/multiqc_report.html", - "samplesheet.csv", - "test/Ashkenazim/Ashkenazim.haplotypecaller.bed", - "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", - "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", - "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.html" + "Ashkenazim/NA24143__/NA24143.bed", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24143__/NA24143.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.fn.vcf.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.fn.vcf.gz.tbi", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.fp.vcf.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.fp.vcf.gz.tbi", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.non_snp.png", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.non_snp.svg", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.non_snp_roc.tsv.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.phasing.txt", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.snp.png", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.snp.svg", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.snp_roc.tsv.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.summary.txt", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.tp-baseline.vcf.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.tp-baseline.vcf.gz.tbi", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.tp.vcf.gz", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.tp.vcf.gz.tbi", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.weighted.png", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.weighted.svg", + "Ashkenazim/NA24143__/validation/haplotypecaller/NA24143.weighted_roc.tsv.gz", + "Ashkenazim/NA24149__/NA24149.bed", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24149__/NA24149.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.fn.vcf.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.fn.vcf.gz.tbi", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.fp.vcf.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.fp.vcf.gz.tbi", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.non_snp.png", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.non_snp.svg", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.non_snp_roc.tsv.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.phasing.txt", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.snp.png", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.snp.svg", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.snp_roc.tsv.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.summary.txt", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.tp-baseline.vcf.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.tp-baseline.vcf.gz.tbi", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.tp.vcf.gz", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.tp.vcf.gz.tbi", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.weighted.png", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.weighted.svg", + "Ashkenazim/NA24149__/validation/haplotypecaller/NA24149.weighted_roc.tsv.gz", + "Ashkenazim/NA24385__/NA24385.bed", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz", + "Ashkenazim/NA24385__/NA24385.haplotypecaller.g.vcf.gz.tbi", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.fn.vcf.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.fn.vcf.gz.tbi", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.fp.vcf.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.fp.vcf.gz.tbi", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.non_snp.png", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.non_snp.svg", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.non_snp_roc.tsv.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.phasing.txt", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.snp.png", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.snp.svg", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.snp_roc.tsv.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.summary.txt", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.tp-baseline.vcf.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.tp-baseline.vcf.gz.tbi", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.tp.vcf.gz", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.tp.vcf.gz.tbi", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.weighted.png", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.weighted.svg", + "Ashkenazim/NA24385__/validation/haplotypecaller/NA24385.weighted_roc.tsv.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.bed", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.ped", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz", + "Ashkenazim/output__/Ashkenazim.haplotypecaller.vcf.gz.tbi", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.bcftools_stats.txt", + "Ashkenazim/qc__/Ashkenazim.haplotypecaller.html", + "_/multiqc_report.html", + "_/samplesheet.csv" ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T15:56:56.038825116" + "timestamp": "2024-11-13T14:44:54.946386845" } } \ No newline at end of file From ef6c85dde34bb107c4dd8e909353d65c2044c13c Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 13 Nov 2024 15:43:40 +0100 Subject: [PATCH 3/6] fix linting --- .nf-core.yml | 1 + main.nf | 37 +++++++++++++++++-------------------- nextflow_schema.json | 15 +++++---------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 8bc363c0..63dd0c9f 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -28,6 +28,7 @@ lint: - manifest.homePage - validation.help.afterText - validation.summary.afterText + subworkflow_changes: false nf_core_version: 3.0.2 repository_type: pipeline template: diff --git a/main.nf b/main.nf index 1891d809..9f698591 100644 --- a/main.nf +++ b/main.nf @@ -214,7 +214,7 @@ workflow { // Filtering out input GVCFs from the output publishing fixes an issue in the current implementation of // the workflow output definitions: https://github.com/nextflow-io/nextflow/issues/5480 - ch_gvcfs_out = GERMLINE.out.gvcfs.filter { _meta, gvcf, _tbi -> gvcf.startsWith(workflow.workDir) } + def ch_gvcfs_out = GERMLINE.out.gvcfs.filter { _meta, gvcf, _tbi -> gvcf.startsWith(workflow.workDir) } publish: ch_gvcfs_out >> 'gvcfs' @@ -232,61 +232,58 @@ workflow { GERMLINE.out.multiqc_report >> 'multiqc' } -def pipeline_version = getWorkflowVersion().replace(".", "_") -def date = new Date().format("yyyy_MM_dd") - output { 'gvcfs' { path { meta, gvcf, _tbi -> { file -> if(file == gvcf.name) { - return "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.g.vcf.gz" + return "${meta.family}/${meta.id}_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.g.vcf.gz" } - return "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.g.vcf.gz.tbi" + return "${meta.family}/${meta.id}_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.g.vcf.gz.tbi" } } } 'single_beds' { - path { meta, _bed -> { _file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.bed" } } + path { meta, _bed -> { _file -> "${meta.family}/${meta.id}_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.bed" } } } 'validation' { - path { meta, _report -> { file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/validation/${meta.caller}/${file}" } } + path { meta, _report -> { file -> "${meta.family}/${meta.id}_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/validation/${meta.caller}/${file}" } } } 'gvcf_reports' { - path { meta, _report -> { _file -> "${meta.family}/${meta.id}_${pipeline_version}_${date}/${meta.id}.${meta.caller}.bcftools_stats.txt" }} + path { meta, _report -> { _file -> "${meta.family}/${meta.id}_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.bcftools_stats.txt" }} } 'genomicsdb' { enabled (params.output_genomicsdb || params.only_merge) - path { meta, genomicsdb -> - { file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}_${meta.caller}_genomicsdb"} + path { meta, _genomicsdb -> + { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}_${meta.caller}_genomicsdb"} } } 'vcfs' { path { meta, vcf, _tbi -> { file -> if(file == vcf.name) { - return "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.vcf.gz" + return "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.vcf.gz" } - return "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.vcf.gz.tbi" + return "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.vcf.gz.tbi" } } } 'gemini' { - path { meta, _db -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.db"}} + path { meta, _db -> { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.db"}} } 'peds' { - path { meta, _ped -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.ped"}} + path { meta, _ped -> { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.ped"}} } 'joint_beds' { - path { meta, _bed -> { _file -> "${meta.family}/output_${pipeline_version}_${date}/${meta.id}.${meta.caller}.bed"}} + path { meta, _bed -> { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${meta.id}.${meta.caller}.bed"}} } 'final_reports' { - path { meta, _report -> { file -> "${meta.family}/qc_${pipeline_version}_${date}/${file}"}} + path { meta, _report -> { file -> "${meta.family}/qc_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/${file}"}} } 'automap' { - path { meta, _automap -> { file -> "${meta.family}/output_${pipeline_version}_${date}/automap/${meta.caller}"}} + path { meta, _automap -> { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/automap/${meta.caller}"}} } 'updio' { - path { meta, _updio -> { file -> "${meta.family}/output_${pipeline_version}_${date}/updio/${meta.caller}"}} + path { meta, _updio -> { _file -> "${meta.family}/output_${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/updio/${meta.caller}"}} } 'multiqc' { - path { _report -> { _file -> "${pipeline_version}_${date}/multiqc_report.html"}} + path { _report -> { _file -> "${getWorkflowVersion().replace(".", "_")}_${new Date().format("yyyy_MM_dd")}/multiqc_report.html"}} } } diff --git a/nextflow_schema.json b/nextflow_schema.json index 4ce42943..ea1b13a3 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -122,6 +122,11 @@ "description": "Path to the elsites file. This is used when `elprep` is part of the callers.", "fa_icon": "far fa-file-code" }, + "genomes": { + "type": "object", + "hidden": true, + "description": "Object for genomes" + }, "genomes_base": { "type": "string", "default": "/references/", @@ -383,16 +388,6 @@ "description": "Less common options for the pipeline, typically set in a config file.", "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", "properties": { - "help": { - "type": ["boolean", "string"], - "description": "Display help text. Give a parameter name to this option to see the detailed help of that parameter.", - "fa_icon": "fas fa-question-circle" - }, - "help_full": { - "type": "boolean", - "description": "See the full help message of all parameters.", - "fa_icon": "fas fa-question-circle" - }, "version": { "type": "boolean", "description": "Display version and exit.", From a9cdb54b8103cd0172033937405576d04a3ae8bc Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 13 Nov 2024 15:50:05 +0100 Subject: [PATCH 4/6] fix genomes in summary --- nextflow.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 1c9168ef..2f5aaaab 100644 --- a/nextflow.config +++ b/nextflow.config @@ -299,7 +299,7 @@ dag { // Nextflow plugins plugins { - id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.2.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet } validation { @@ -322,6 +322,7 @@ validation { } summary { beforeText = validation.help.beforeText + hideParams = ["genomes"] } } From edc8b69152b88da97e386966941db8b8bd3619bd Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 13 Nov 2024 15:52:45 +0100 Subject: [PATCH 5/6] pre-commit --- tests/pipeline/callers/main.nf.test | 2 +- tests/pipeline/variations/main.nf.test | 2 +- tests/pipeline/variations2/main.nf.test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/pipeline/callers/main.nf.test b/tests/pipeline/callers/main.nf.test index b3701313..cf6bfbbd 100644 --- a/tests/pipeline/callers/main.nf.test +++ b/tests/pipeline/callers/main.nf.test @@ -111,4 +111,4 @@ def getDynamicOutputName() { def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String -} \ No newline at end of file +} diff --git a/tests/pipeline/variations/main.nf.test b/tests/pipeline/variations/main.nf.test index cdf7aff0..837a84be 100644 --- a/tests/pipeline/variations/main.nf.test +++ b/tests/pipeline/variations/main.nf.test @@ -202,4 +202,4 @@ def getDynamicOutputName() { def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String -} \ No newline at end of file +} diff --git a/tests/pipeline/variations2/main.nf.test b/tests/pipeline/variations2/main.nf.test index 5070bc13..d61fe35b 100644 --- a/tests/pipeline/variations2/main.nf.test +++ b/tests/pipeline/variations2/main.nf.test @@ -171,4 +171,4 @@ def getDynamicOutputName() { def Map nfcoreYaml = new groovy.yaml.YamlSlurper().parseText(file(".nf-core.yml").text) def date = new java.text.SimpleDateFormat("yyyy_MM_dd").format(new Date()) return "v${nfcoreYaml.template.version.replace('.', '_')}_${date}" as String -} \ No newline at end of file +} From f51c2a97e59a241ec7007026bee08fcf43196dd6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 13 Nov 2024 16:11:18 +0100 Subject: [PATCH 6/6] fix utils_nextflow_pipeline --- modules.json | 2 +- .../nf-core/utils_nextflow_pipeline/main.nf | 14 +++++++++++--- .../tests/main.workflow.nf.test | 10 ++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/modules.json b/modules.json index 5e9357a6..a9c6c52c 100644 --- a/modules.json +++ b/modules.json @@ -234,7 +234,7 @@ "nf-core": { "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "1b6b9a3338d011367137808b49b923515080e3ba", + "git_sha": "56372688d8979092cafbe0c5c3895b491166ca1c", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index bf347813..de2364d5 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -109,8 +109,16 @@ def checkCondaChannels() { def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } if (channels_missing | channel_priority_violation) { - log.warn( - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " There is a problem with your Conda configuration!\n\n" + " You will need to set-up the conda-forge and bioconda channels correctly.\n" + " Please refer to https://bioconda.github.io/\n" + " The observed channel order is \n" + " ${channels}\n" + " but the following channel order is required:\n" + " ${required_channels_in_order}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - ) + log.warn """\ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + There is a problem with your Conda configuration! + You will need to set-up the conda-forge and bioconda channels correctly. + Please refer to https://bioconda.github.io/ + The observed channel order is + ${channels} + but the following channel order is required: + ${required_channels_in_order} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + """.stripIndent(true) } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test index ca964ce8..02dbf094 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -52,10 +52,12 @@ nextflow_workflow { } then { - assertAll( - { assert workflow.success }, - { assert workflow.stdout.contains("nextflow_workflow v9.9.9") } - ) + expect { + with(workflow) { + assert success + assert "nextflow_workflow v9.9.9" in stdout + } + } } }