From 43c775c1df3ae027538bfc5704c587489315bab7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 23 Mar 2026 19:18:53 +0100 Subject: [PATCH 1/2] New module: exomiser/analyse --- modules/nf-core/exomiser/analyse/main.nf | 67 ++++++++ modules/nf-core/exomiser/analyse/meta.yml | 153 ++++++++++++++++++ .../exomiser/analyse/tests/main.nf.test | 48 ++++++ .../exomiser/analyse/tests/main.nf.test.snap | 16 ++ 4 files changed, 284 insertions(+) create mode 100644 modules/nf-core/exomiser/analyse/main.nf create mode 100644 modules/nf-core/exomiser/analyse/meta.yml create mode 100644 modules/nf-core/exomiser/analyse/tests/main.nf.test create mode 100644 modules/nf-core/exomiser/analyse/tests/main.nf.test.snap diff --git a/modules/nf-core/exomiser/analyse/main.nf b/modules/nf-core/exomiser/analyse/main.nf new file mode 100644 index 000000000000..b930a567958c --- /dev/null +++ b/modules/nf-core/exomiser/analyse/main.nf @@ -0,0 +1,67 @@ +process EXOMISER_ANALYSE { + tag "${meta.id}" + label 'process_medium' + + container "nf-core/exomiser-cli:15.0.0-bash" + + input: + tuple val(meta), path(vcf), path(ped), val(assembly), path(phenopacket), path(analysis_script) + tuple val(meta2), path(reference_cache, stageAs: 'exomiser_data/*'), val(reference_version) + tuple val(meta3), path(phenotype_cache, stageAs: 'exomiser_data/*'), val(phenotype_version) + + output: + tuple val(meta), path("*.{tsv}"), emit: tsv + tuple val(meta), path("*.{json}"), emit: json + tuple val(meta), path("*.{html}"), emit: html + tuple val(meta), path("*.{parquet}"), emit: parquet + tuple val(meta), path("*.{vcf}"), emit: vcf + tuple val("${task.process}"), val('exomiser'), eval("exomiser --version"), topic: versions, emit: versions_exomiser + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error("EXOMISERCLI_ANALYSE module does not support Conda. Please use Docker / Singularity / Podman instead.") + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def ped_cmd = ped ? "--ped=${ped}" : "" + def phenopacket_cmd = phenopacket ? "--sample=${phenopacket}" : "" + def assembly_cmd = assembly ? "--assembly=${assembly}" : "" + def analysis_cmd = analysis_script ? "--analysis ${analysis_script}" : "" + def vcf_cmd = vcf ? "--vcf=${vcf}" : "" + + """ + export EXOMISER_DATA_DIRECTORY=./exomiser_data + export EXOMISER_${assembly}_DATA_VERSION=${reference_version} + export EXOMISER_PHENOTYPE_DATA_VERSION=${phenotype_version} + + exomiser analyse \\ + ${ped_cmd} \\ + ${phenopacket_cmd} \\ + ${assembly_cmd} \\ + ${vcf_cmd}\\ + ${analysis_cmd} \\ + ${args} \\ + --output-directory=\$PWD \ + --output-filename=${prefix} \ + --exomiser.data-directory=./exomiser-data \ + --exomiser.${assembly}.data-version=${reference_version} \ + --exomiser.phenotype.data-version=${phenotype_version} + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + echo ${args} + touch ${prefix}.tsv + touch ${prefix}.json + touch ${prefix}.html + touch ${prefix}.parquet + touch ${prefix}.vcf + """ +} diff --git a/modules/nf-core/exomiser/analyse/meta.yml b/modules/nf-core/exomiser/analyse/meta.yml new file mode 100644 index 000000000000..cfca38d346ef --- /dev/null +++ b/modules/nf-core/exomiser/analyse/meta.yml @@ -0,0 +1,153 @@ +name: "exomiser_analyse" +description: Phenotype-driven variant prioritisation for rare Mendelian + disorders. +keywords: + - exomiser + - variant prioritisation + - rare disease + - Mendelian disorders +tools: + - "exomiser": + description: "A Tool to Annotate and Prioritize Exome Variants" + homepage: "https://exomiser.readthedocs.io/en/stable/" + documentation: "https://exomiser.readthedocs.io/en/stable/" + tool_dev_url: "https://github.com/exomiser/Exomiser" + doi: "10.1038/s41525-024-00456-2" + licence: + - "AGPL-3.0" + identifier: biotools:exomiser +input: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - vcf: + type: file + description: "VCF file containing variants to be analysed." + pattern: "*.vcf.gz" + ontologies: + - edam: http://edamontology.org/format_3989 + - ped: + type: file + description: "PED file containing family information." + pattern: "*.ped" + ontologies: [] + - assembly: + type: string + description: "Genome assembly to use. e.g. GRCh37, GRCh38" + - phenopacket: + type: file + description: "Phenopacket file containing phenotype information." + pattern: "*.{yml,yaml,json}" + ontologies: + - edam: http://edamontology.org/format_3750 + - edam: http://edamontology.org/format_3464 + - analysis_script: + type: file + description: "Custom analysis script for Exomiser analysis" + pattern: "*.{yml,yaml,json}" + ontologies: + - edam: http://edamontology.org/format_3750 + - edam: http://edamontology.org/format_3464 + - - meta2: + type: map + description: Groovy Map containing reference cache information. e.g. `[ + id:'sample1' ]` + - reference_cache: + type: file + description: "Reference cache for Exomiser analysis" + pattern: "exomiser_data/*" + ontologies: [] + - reference_version: + type: string + description: "Reference version for Exomiser analysis" + - - meta3: + type: map + description: Groovy Map containing phenotype cache information. e.g. `[ + id:'sample1' ]` + - phenotype_cache: + type: file + description: "Phenotype cache for Exomiser analysis" + pattern: "exomiser_data/*" + ontologies: [] + - phenotype_version: + type: string + description: "Phenotype version for Exomiser analysis" +output: + tsv: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - "*.{tsv}": + type: file + description: "TSV file containing prioritized variants." + pattern: "*.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + json: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - "*.{json}": + type: file + description: "JSON file containing prioritized variants." + pattern: "*.json" + ontologies: + - edam: http://edamontology.org/format_3464 + html: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - "*.{html}": + type: file + description: "HTML file containing prioritized variants." + pattern: "*.html" + ontologies: [] + parquet: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - "*.{parquet}": + type: file + description: "Parquet file containing prioritized variants." + pattern: "*.parquet" + ontologies: [] + vcf: + - - meta: + type: map + description: Groovy Map containing sample information. e.g. `[ + id:'sample1' ]` + - "*.{vcf}": + type: file + description: "VCF file containing prioritized variants." + pattern: "*.vcf" + ontologies: [] + versions_exomiser: + - - ${task.process}: + type: string + description: The name of the process + - exomiser: + type: string + description: The name of the tool + - exomiser --version: + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - exomiser: + type: string + description: The name of the tool + - exomiser --version: + type: eval + description: The expression to obtain the version of the tool +authors: + - "@matthdsm" +maintainers: + - "@matthdsm" diff --git a/modules/nf-core/exomiser/analyse/tests/main.nf.test b/modules/nf-core/exomiser/analyse/tests/main.nf.test new file mode 100644 index 000000000000..60928bf8f8af --- /dev/null +++ b/modules/nf-core/exomiser/analyse/tests/main.nf.test @@ -0,0 +1,48 @@ +nextflow_process { + + name "Test Process EXOMISER_ANALYSE" + script "../main.nf" + process "EXOMISER_ANALYSE" + + tag "modules" + tag "modules_nfcore" + tag "exomiser" + tag "exomiser/analyse" + + test("homo_sapiens - vcf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.vcf.gz'), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/ped/test.ped'), + "GRCh38", + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/phenopacket/test.yml'), + [] + ] + input[1] = [ + [ id:'test' ], + file("s3://nf-core-reference-data/exomiser/GRCh38/1234/reference_cache"), + "1234" + ] + input[2] = [ + [ id:'test' ], + file("s3://nf-core-reference-data/exomiser/GRCh38/1234/phenotype_cache"), + "1234" + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } + ) + } + } +} diff --git a/modules/nf-core/exomiser/analyse/tests/main.nf.test.snap b/modules/nf-core/exomiser/analyse/tests/main.nf.test.snap new file mode 100644 index 000000000000..e6a6a1377e88 --- /dev/null +++ b/modules/nf-core/exomiser/analyse/tests/main.nf.test.snap @@ -0,0 +1,16 @@ +{ + "homo_sapiens - vcf - stub": { + "content": [ + { + "versions_exomiser": [ + + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.4" + }, + "timestamp": "2026-03-23T19:09:41.158068" + } +} \ No newline at end of file From 93e0a0e12e35ee4e94c85bb218744a412a5e64be Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:40:18 +0100 Subject: [PATCH 2/2] address review comments --- modules/nf-core/exomiser/analyse/main.nf | 23 ++++++++++++----------- modules/nf-core/exomiser/analyse/meta.yml | 10 +++++----- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/modules/nf-core/exomiser/analyse/main.nf b/modules/nf-core/exomiser/analyse/main.nf index b930a567958c..849ed8602c5a 100644 --- a/modules/nf-core/exomiser/analyse/main.nf +++ b/modules/nf-core/exomiser/analyse/main.nf @@ -10,11 +10,11 @@ process EXOMISER_ANALYSE { tuple val(meta3), path(phenotype_cache, stageAs: 'exomiser_data/*'), val(phenotype_version) output: - tuple val(meta), path("*.{tsv}"), emit: tsv - tuple val(meta), path("*.{json}"), emit: json - tuple val(meta), path("*.{html}"), emit: html - tuple val(meta), path("*.{parquet}"), emit: parquet - tuple val(meta), path("*.{vcf}"), emit: vcf + tuple val(meta), path("*.tsv"), emit: tsv + tuple val(meta), path("*.json"), emit: json + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.parquet"), emit: parquet + tuple val(meta), path("*.vcf"), emit: vcf tuple val("${task.process}"), val('exomiser'), eval("exomiser --version"), topic: versions, emit: versions_exomiser when: @@ -23,7 +23,7 @@ process EXOMISER_ANALYSE { script: // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error("EXOMISERCLI_ANALYSE module does not support Conda. Please use Docker / Singularity / Podman instead.") + error("EXOMISER_ANALYSE module does not support Conda. Please use Docker / Singularity / Podman instead.") } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -45,14 +45,15 @@ process EXOMISER_ANALYSE { ${vcf_cmd}\\ ${analysis_cmd} \\ ${args} \\ - --output-directory=\$PWD \ - --output-filename=${prefix} \ - --exomiser.data-directory=./exomiser-data \ - --exomiser.${assembly}.data-version=${reference_version} \ - --exomiser.phenotype.data-version=${phenotype_version} + --output-directory=\$PWD \\ + --output-filename=${prefix} """ stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error("EXOMISER_ANALYSE module does not support Conda. Please use Docker / Singularity / Podman instead.") + } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nf-core/exomiser/analyse/meta.yml b/modules/nf-core/exomiser/analyse/meta.yml index cfca38d346ef..5946d2721781 100644 --- a/modules/nf-core/exomiser/analyse/meta.yml +++ b/modules/nf-core/exomiser/analyse/meta.yml @@ -79,7 +79,7 @@ output: type: map description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]` - - "*.{tsv}": + - "*.tsv": type: file description: "TSV file containing prioritized variants." pattern: "*.tsv" @@ -90,7 +90,7 @@ output: type: map description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]` - - "*.{json}": + - "*.json": type: file description: "JSON file containing prioritized variants." pattern: "*.json" @@ -101,7 +101,7 @@ output: type: map description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]` - - "*.{html}": + - "*.html": type: file description: "HTML file containing prioritized variants." pattern: "*.html" @@ -111,7 +111,7 @@ output: type: map description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]` - - "*.{parquet}": + - "*.parquet": type: file description: "Parquet file containing prioritized variants." pattern: "*.parquet" @@ -121,7 +121,7 @@ output: type: map description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]` - - "*.{vcf}": + - "*.vcf": type: file description: "VCF file containing prioritized variants." pattern: "*.vcf"