diff --git a/modules/nf-core/crispresso2/environment.yml b/modules/nf-core/crispresso2/environment.yml index 58b7db0733da..af544d050c73 100644 --- a/modules/nf-core/crispresso2/environment.yml +++ b/modules/nf-core/crispresso2/environment.yml @@ -4,4 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - "bioconda::crispresso2=2.3.3" + - bioconda::bowtie2=2.5.4 + - bioconda::crispresso2=2.3.3 + - bioconda::fastp=1.0.1 + - bioconda::samtools=1.22 diff --git a/modules/nf-core/crispresso2/main.nf b/modules/nf-core/crispresso2/main.nf index 343367cc755f..8472718df801 100644 --- a/modules/nf-core/crispresso2/main.nf +++ b/modules/nf-core/crispresso2/main.nf @@ -14,7 +14,7 @@ process CRISPRESSO2 { tuple val(meta), path("CRISPResso_on_*") , emit: results tuple val(meta), path("*.html") , emit: html tuple val(meta), path("CRISPResso_on_*/*.txt") , emit: txt - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('crispresso2'), eval("CRISPResso --version 2>&1 | sed 's/CRISPResso //'"), emit: versions_crispresso2, topic: versions when: task.ext.when == null || task.ext.when @@ -32,16 +32,12 @@ process CRISPRESSO2 { } """ + export MPLCONFIGDIR=.matplotlib CRISPResso \\ ${read_inputs} \\ --name ${prefix} \\ --output_folder . \\ ${args} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - crispresso2: \$(CRISPResso --version 2>&1 | grep -o 'CRISPResso version [0-9.]*' | sed 's/CRISPResso version //') - END_VERSIONS """ stub: @@ -49,6 +45,7 @@ process CRISPRESSO2 { """ #!/usr/bin/env bash set -e + export MPLCONFIGDIR=.matplotlib mkdir -p CRISPResso_on_${prefix} touch CRISPResso_on_${prefix}/${prefix}.html @@ -56,10 +53,5 @@ process CRISPRESSO2 { touch CRISPResso_on_${prefix}/CRISPResso_mapping_statistics.txt touch CRISPResso_on_${prefix}/quantification_of_editing_frequency.txt touch ${prefix}.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - crispresso2: 2.3.3 - END_VERSIONS """ } diff --git a/modules/nf-core/crispresso2/meta.yml b/modules/nf-core/crispresso2/meta.yml index 1e4b2a84284f..2d8a1fff4883 100644 --- a/modules/nf-core/crispresso2/meta.yml +++ b/modules/nf-core/crispresso2/meta.yml @@ -15,9 +15,9 @@ tools: documentation: "https://docs.crispresso.com" tool_dev_url: "https://github.com/pinellolab/CRISPResso2" doi: "10.1038/s41587-019-0032-3" - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:crispresso2 - input: - - meta: type: map @@ -31,7 +31,6 @@ input: pattern: "*.{fastq,fq,fastq.gz,fq.gz}" ontologies: - edam: http://edamontology.org/format_1930 # FASTQ - output: results: - - meta: @@ -61,20 +60,33 @@ output: description: | Groovy Map containing sample information e.g. `[ id:'test', single_end:false ]` - - "CRISPResso_on_*/*.txt": + - CRISPResso_on_*/*.txt: type: file description: CRISPResso text output files pattern: "CRISPResso_on_*/*.txt" ontologies: - edam: http://edamontology.org/format_2330 # Textual format + versions_crispresso2: + - - ${task.process}: + type: string + description: The name of the process + - crispresso2: + type: string + description: The name of the tool + - CRISPResso --version 2>&1 | sed 's/CRISPResso //': + 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 + - crispresso2: + type: string + description: The name of the tool + - CRISPResso --version 2>&1 | sed 's/CRISPResso //': + type: eval + description: The expression to obtain the version of the tool authors: - "@sathyasjali" maintainers: diff --git a/modules/nf-core/crispresso2/tests/main.nf.test b/modules/nf-core/crispresso2/tests/main.nf.test index da400ccbbb4e..124976921f15 100644 --- a/modules/nf-core/crispresso2/tests/main.nf.test +++ b/modules/nf-core/crispresso2/tests/main.nf.test @@ -24,12 +24,14 @@ nextflow_process { } then { - assertAll( + assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("single_end_versions") }, - { assert process.out.results[0][1].size() > 0 }, - { assert process.out.html[0][1].size() > 0 }, - { assert process.out.txt[0][1].size() > 0 } + { assert snapshot( + process.out.results[0][1].size(), + file(process.out.html[0][1]).name, + process.out.txt[0][1].size(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() }, ) } } @@ -55,10 +57,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("paired_end_versions") }, - { assert process.out.results[0][1].size() > 0 }, - { assert process.out.html[0][1].size() > 0 }, - { assert process.out.txt[0][1].size() > 0 } + { assert snapshot( + process.out.results[0][1].size(), + process.out.html[0][1].collect{ html -> file(html).name }.sort(), + process.out.txt[0][1].size(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() }, ) } } @@ -81,10 +85,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("nhej_analysis_versions") }, - { assert process.out.results[0][1].size() > 0 }, - { assert process.out.html[0][1].size() > 0 }, - { assert process.out.txt[0][1].size() > 0 } + { assert snapshot( + process.out.results[0][1].size(), + file(process.out.html[0][1]).name, + process.out.txt[0][1].size(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() }, ) } } diff --git a/modules/nf-core/crispresso2/tests/main.nf.test.snap b/modules/nf-core/crispresso2/tests/main.nf.test.snap index 38236c9efe30..7b656b4a21aa 100644 --- a/modules/nf-core/crispresso2/tests/main.nf.test.snap +++ b/modules/nf-core/crispresso2/tests/main.nf.test.snap @@ -1,38 +1,68 @@ { - "paired_end_versions": { + "crispresso2 - paired_end": { "content": [ + 2, [ - "versions.yml:md5,2c04a720d2ac80a8651db90eaa1e8c35" - ] + "CRISPResso_on_paired_test.html", + "fastp.html" + ], + 9, + { + "versions_crispresso2": [ + [ + "CRISPRESSO2", + "crispresso2", + "2.3.3" + ] + ] + } ], + "timestamp": "2026-03-13T14:56:09.120398517", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-04T10:40:04.221264" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, - "nhej_analysis_versions": { + "crispresso2 - nhej_analysis": { "content": [ - [ - "versions.yml:md5,2c04a720d2ac80a8651db90eaa1e8c35" - ] + 2, + "CRISPResso_on_nhej_test.html", + 9, + { + "versions_crispresso2": [ + [ + "CRISPRESSO2", + "crispresso2", + "2.3.3" + ] + ] + } ], + "timestamp": "2026-03-13T15:34:17.493407027", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-04T10:40:15.66427" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, - "single_end_versions": { + "crispresso2 - single_end": { "content": [ - [ - "versions.yml:md5,2c04a720d2ac80a8651db90eaa1e8c35" - ] + 2, + "CRISPResso_on_test.html", + 9, + { + "versions_crispresso2": [ + [ + "CRISPRESSO2", + "crispresso2", + "2.3.3" + ] + ] + } ], + "timestamp": "2026-03-13T15:32:17.852481198", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-04T10:39:52.068269" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file