diff --git a/modules/nf-core/drep/compare/main.nf b/modules/nf-core/drep/compare/main.nf index a6597419322f..7fb1e7113e47 100644 --- a/modules/nf-core/drep/compare/main.nf +++ b/modules/nf-core/drep/compare/main.nf @@ -12,7 +12,7 @@ process DREP_COMPARE { output: tuple val(meta), path("${prefix}"), emit: directory - path "versions.yml", emit: versions + tuple val("${task.process}"), val("drep"), eval("dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1"), emit:versions_drep, topic:versions when: task.ext.when == null || task.ext.when @@ -27,11 +27,6 @@ process DREP_COMPARE { -p ${task.cpus} \\ ${args} \\ -g fastas/* - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - drep: \$(dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1) - END_VERSIONS """ stub: @@ -40,10 +35,5 @@ process DREP_COMPARE { """ echo "${args}" mkdir -p ${prefix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - drep: \$(dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1) - END_VERSIONS """ } diff --git a/modules/nf-core/drep/compare/meta.yml b/modules/nf-core/drep/compare/meta.yml index 81e637fc747e..9787f6048171 100644 --- a/modules/nf-core/drep/compare/meta.yml +++ b/modules/nf-core/drep/compare/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "drep_compare" description: Performs rapid genome comparisons for a group of genomes and visualize their relatedness @@ -13,7 +12,6 @@ keywords: - assembly - microbial genomics - dereplication - tools: - "drep": description: "De-replication of microbial genomes assembled from multiple samples" @@ -21,9 +19,9 @@ tools: documentation: "https://drep.readthedocs.io/en/latest/" tool_dev_url: "https://github.com/MrOlm/drep" doi: "10.1038/ismej.2017.126" - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:drep - input: - - meta: type: map @@ -35,7 +33,7 @@ input: description: List of FASTA files to compare pattern: "*.{fasta,fa,fna,fas}" ontologies: - - edam: http://edamontology.org/format_1929 # FASTA + - edam: http://edamontology.org/format_1929 output: directory: - - meta: @@ -50,13 +48,27 @@ output: pattern: "${prefix}/" ontologies: - edam: "http://edamontology.org/data_1049" + versions_drep: + - - ${task.process}: + type: string + description: The name of the process + - drep: + type: string + description: The name of the tool + - dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1: + 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 + - drep: + type: string + description: The name of the tool + - dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1: + type: eval + description: The expression to obtain the version of the tool authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/drep/compare/tests/main.nf.test b/modules/nf-core/drep/compare/tests/main.nf.test index 6d71dbd7d7c6..476182b381a5 100644 --- a/modules/nf-core/drep/compare/tests/main.nf.test +++ b/modules/nf-core/drep/compare/tests/main.nf.test @@ -25,8 +25,7 @@ nextflow_process { } } -then { - + then { def stablefiles = [] file(process.out.directory.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && ["Secondary_clustering_MDS.pdf", "Secondary_clustering_dendrograms.pdf", "cluster_arguments.json", "warnings.txt", "Cdb.csv", "Ndb.csv"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } def unstablefiles = [] @@ -37,11 +36,10 @@ then { { assert snapshot( stablefiles.sort(), unstablefiles.sort(), - process.out.versions - ).match() } + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } - } test("sarscov2 - fasta - stub") { @@ -68,7 +66,5 @@ then { { assert snapshot(process.out).match() } ) } - } - -} +} \ No newline at end of file