Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/nf-core/crispresso2/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 3 additions & 11 deletions modules/nf-core/crispresso2/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,34 +32,26 @@ 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:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
#!/usr/bin/env bash
set -e
export MPLCONFIGDIR=.matplotlib

mkdir -p CRISPResso_on_${prefix}
touch CRISPResso_on_${prefix}/${prefix}.html
touch CRISPResso_on_${prefix}/CRISPResso_report.html
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
"""
}
34 changes: 23 additions & 11 deletions modules/nf-core/crispresso2/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,7 +31,6 @@ input:
pattern: "*.{fastq,fq,fastq.gz,fq.gz}"
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ

output:
results:
- - meta:
Expand Down Expand Up @@ -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:
Expand Down
32 changes: 19 additions & 13 deletions modules/nf-core/crispresso2/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
)
}
}
Expand All @@ -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() },
)
}
}
Expand All @@ -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() },
)
}
}
Expand Down
76 changes: 53 additions & 23 deletions modules/nf-core/crispresso2/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Loading