diff --git a/modules/nf-core/eklipse/environment.yml b/modules/nf-core/eklipse/environment.yml index c0b75ed6fc0b..000fe4f93b8c 100644 --- a/modules/nf-core/eklipse/environment.yml +++ b/modules/nf-core/eklipse/environment.yml @@ -1,7 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - - conda-forge - bioconda + - conda-forge dependencies: - - bioconda::eklipse=1.8=hdfd78af_2 + - bioconda::eklipse=1.8=hdfd78af_3 diff --git a/modules/nf-core/eklipse/main.nf b/modules/nf-core/eklipse/main.nf index 07f73ca4d5d4..5fb0a2078e68 100644 --- a/modules/nf-core/eklipse/main.nf +++ b/modules/nf-core/eklipse/main.nf @@ -1,23 +1,21 @@ - process EKLIPSE { - tag "$meta.id" + tag "${meta.id}" label 'process_single' - // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/eklipse:1.8--hdfd78af_1': - 'biocontainers/eklipse:1.8--hdfd78af_1' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/eklipse:1.8--hdfd78af_1' + : 'biocontainers/eklipse:1.8--hdfd78af_1'}" input: tuple val(meta), path(bam), path(bai) path ref_gb output: - tuple val(meta), path("*deletions.csv") , emit: deletions - tuple val(meta), path("*genes.csv") , emit: genes - tuple val(meta), path("*.png") , emit: circos - path "versions.yml" , emit: versions + tuple val(meta), path("*deletions.csv"), emit: deletions + tuple val(meta), path("*genes.csv"), emit: genes + tuple val(meta), path("*.png"), emit: circos + tuple val("${task.process}"), val('eklipse'), eval("eKLIPse.py 2>&1 | sed -n 's/.*\\[v\\([^]]*\\)\\].*/\\1/p' | tr '-' '.'"), emit: versions_eklipse, topic: versions when: task.ext.when == null || task.ext.when @@ -25,35 +23,23 @@ process EKLIPSE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def ref_gb_path = ref_gb ? "$ref_gb" : "/usr/local/bin/data/NC_012920.1.gb" - def VERSION = "1.8" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def ref_gb_path = ref_gb ? "${ref_gb}" : "/usr/local/bin/data/NC_012920.1.gb" """ - echo "$bam\t${prefix}" > infile.txt + echo "${bam}\t${prefix}" > infile.txt eKLIPse.py \\ -in infile.txt \\ - $args \\ - -ref $ref_gb_path + -ref ${ref_gb_path} \\ + ${args} mv eKLIPse_*/eKLIPse_deletions.csv eKLIPse_${prefix}_deletions.csv mv eKLIPse_*/eKLIPse_genes.csv eKLIPse_${prefix}_genes.csv mv eKLIPse_*/eKLIPse_${prefix}.png eKLIPse_${prefix}.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - eklipse: $VERSION - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = "1.8" """ touch eKLIPse_${prefix}_deletions.csv touch eKLIPse_${prefix}_genes.csv touch eKLIPse_${prefix}.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - eklipse: $VERSION - END_VERSIONS """ } diff --git a/modules/nf-core/eklipse/meta.yml b/modules/nf-core/eklipse/meta.yml index ef7c6df4896d..eab1be429772 100644 --- a/modules/nf-core/eklipse/meta.yml +++ b/modules/nf-core/eklipse/meta.yml @@ -1,6 +1,6 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "eklipse" -description: tool for detection and quantification of large mtDNA rearrangements. +description: tool for detection and quantification of large mtDNA + rearrangements. keywords: - eklipse - mitochondria @@ -15,7 +15,8 @@ tools: documentation: "https://github.com/dooguypapua/eKLIPse/tree/master" tool_dev_url: "https://github.com/dooguypapua/eKLIPse/tree/master" doi: "10.1038/s41436-018-0350-8" - licence: ["GNU General Public v3 or later (GPL v3+)"] + licence: + - "GNU General Public v3 or later (GPL v3+)" identifier: "" input: - - meta: @@ -35,8 +36,8 @@ input: ontologies: [] - ref_gb: type: file - description: mtDNA reference genome in Genbank format, optional if empty NC_012920.1.gb - will be used + description: mtDNA reference genome in Genbank format, optional if empty + NC_012920.1.gb will be used pattern: "*.{gb}" ontologies: [] output: @@ -51,7 +52,7 @@ output: description: csv file with deletion information pattern: "*deletions.csv" ontologies: - - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3752 genes: - - meta: type: map @@ -63,7 +64,7 @@ output: description: csv file with gene information pattern: "*genes.csv" ontologies: - - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3752 circos: - - meta: type: map @@ -75,14 +76,29 @@ output: description: png file with circos plot of mt pattern: "*.{png}" ontologies: [] + versions_eklipse: + - - ${task.process}: + type: string + description: The name of the process + - eklipse: + type: string + description: The name of the tool + - eKLIPse.py 2>&1 | sed -n 's/.*\[v\([^]]*\)\].*/\1/p' | tr '-' '.': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - eklipse: + type: string + description: The name of the tool + - eKLIPse.py 2>&1 | sed -n 's/.*\[v\([^]]*\)\].*/\1/p' | tr '-' '.': + type: eval + description: The expression to obtain the version of the tool authors: - "@Lucpen" maintainers: - "@Lucpen" + - "@EfraMP" diff --git a/modules/nf-core/eklipse/tests/main.nf.test b/modules/nf-core/eklipse/tests/main.nf.test index fb0be6d43c21..018523a1f632 100644 --- a/modules/nf-core/eklipse/tests/main.nf.test +++ b/modules/nf-core/eklipse/tests/main.nf.test @@ -7,7 +7,7 @@ nextflow_process { tag "modules_nfcore" tag "eklipse" - test("homo_sapiens [bam]") { + test("homo_sapiens - bam") { when { process { @@ -25,11 +25,32 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(file(process.out.deletions[0][1]), - file(process.out.genes[0][1]), - file(process.out.circos[0][1]), - file(process.out.versions[0])).match() - } + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("homo_sapiens - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam.bai', checkIfExists: true) + ] + input[1] = [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.NC_012920_1.gb', checkIfExists: true) ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/eklipse/tests/main.nf.test.snap b/modules/nf-core/eklipse/tests/main.nf.test.snap index 5969a1da0e76..5642d3cd2386 100644 --- a/modules/nf-core/eklipse/tests/main.nf.test.snap +++ b/modules/nf-core/eklipse/tests/main.nf.test.snap @@ -1,11 +1,92 @@ { - "homo_sapiens [bam]": { + "homo_sapiens - bam": { "content": [ - "eKLIPse_test_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7", - "eKLIPse_test_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18", - "eKLIPse_test.png:md5,d1ea2a548bc4f8d321b1128a61ea8b0a", - "versions.yml:md5,8e6ebaa9abf72ced91c1f56acd10f131" + { + "circos": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test.png:md5,d1ea2a548bc4f8d321b1128a61ea8b0a" + ] + ], + "deletions": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test_deletions.csv:md5,8bcfdb8f3e8a63dcd211c2a53b6ca0a7" + ] + ], + "genes": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test_genes.csv:md5,ec1a1f31d018ca66a46d8a2d17bc8d18" + ] + ], + "versions_eklipse": [ + [ + "EKLIPSE", + "eklipse", + "1.8" + ] + ] + } ], - "timestamp": "2024-02-11T14:55:25.205208435" + "timestamp": "2026-04-15T15:34:08.413794", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "homo_sapiens - bam - stub": { + "content": [ + { + "circos": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "deletions": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test_deletions.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "genes": [ + [ + { + "id": "test", + "single_end": false + }, + "eKLIPse_test_genes.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_eklipse": [ + [ + "EKLIPSE", + "eklipse", + "1.8" + ] + ] + } + ], + "timestamp": "2026-04-15T15:34:17.198319", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file