Skip to content
Open
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
13 changes: 2 additions & 11 deletions modules/nf-core/porechop/abi/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ process PORECHOP_ABI {

output:
tuple val(meta), path("*.fastq.gz"), emit: reads
tuple val(meta), path("*.log"), emit: log
path "versions.yml", emit: versions
tuple val(meta), path("*.log") , emit: log
tuple val("${task.process}"), val('porechop_abi'), eval("porechop_abi --version"), topic: versions, emit: versions_porechop_abi

when:
task.ext.when == null || task.ext.when
Expand All @@ -34,21 +34,12 @@ process PORECHOP_ABI {
${args} \\
--output ${prefix}.fastq.gz \\
| tee ${prefix}.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
porechop_abi: \$( porechop_abi --version )
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}.porechop_abi"
"""
echo "" | gzip > ${prefix}.fastq.gz
touch ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
porechop_abi: \$( porechop_abi --version )
END_VERSIONS
"""
}
37 changes: 26 additions & 11 deletions modules/nf-core/porechop/abi/meta.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: "porechop_abi"
description: Extension of Porechop whose purpose is to process adapter sequences in
ONT reads.
description: Extension of Porechop whose purpose is to process adapter sequences in ONT reads.
keywords:
- porechop_abi
- adapter
- nanopore
tools:
- "porechop_abi":
description: Extension of Porechop whose purpose is to process adapter sequences
in ONT reads.
description: Extension of Porechop whose purpose is to process adapter sequences in ONT reads.
homepage: "https://github.com/bonsai-team/Porechop_ABI"
documentation: "https://github.com/bonsai-team/Porechop_ABI"
tool_dev_url: "https://github.com/bonsai-team/Porechop_ABI"
doi: "10.1101/2022.07.07.499093"
licence: ["MIT"]
licence:
- "MIT"
identifier: ""
input:
- - meta:
Expand Down Expand Up @@ -56,13 +55,29 @@ output:
description: Log file containing stdout information
pattern: "*.log"
ontologies: []
versions_porechop_abi:
- - ${task.process}:
type: string
description: The name of the process
- porechop_abi:
type: string
description: The name of the tool
- porechop_abi --version:
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
- porechop_abi:
type: string
description: The name of the tool
- porechop_abi --version:
type: eval
description: The expression to obtain the version of the tool

authors:
- "@sofstam"
- "LilyAnderssonLee"
Expand Down
18 changes: 6 additions & 12 deletions modules/nf-core/porechop/abi/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,41 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test'], // meta map
[ id:'test'],
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true)
]
input[1] = []
input[1] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.reads,
file(process.out.log.get(0).get(1)).readLines()[20..40],
process.out.versions).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"])).match() }
)
}
}

test("sarscov2-nanopore - stub") {

options "-stub"

when {

process {
"""
input[0] = [
[ id:'test'], // meta map
[ id:'test'],
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true)
]
input[1] = []
input[1] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
88 changes: 32 additions & 56 deletions modules/nf-core/porechop/abi/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,69 +1,41 @@
{
"sarscov2-nanopore": {
"content": [
[
[
{
"id": "test"
},
"test.porechop_abi.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e"
]
],
[
" Best \u001b[0m",
" read Best \u001b[0m",
" start read end\u001b[0m",
" \u001b[4mSet %ID %ID \u001b[0m",
" \u001b[32mSQK-NSK007 100.0 73.1\u001b[0m",
" Rapid 40.4 0.0",
" RBK004_upstream 77.5 0.0",
" SQK-MAP006 75.8 72.7",
" SQK-MAP006 short 65.5 66.7",
" PCR adapters 1 73.9 69.6",
" PCR adapters 2 80.0 72.7",
" PCR adapters 3 70.8 69.6",
" 1D^2 part 1 71.4 70.0",
" 1D^2 part 2 84.8 75.8",
" cDNA SSP 63.0 61.7",
" \u001b[32mBarcode 1 (reverse) 100.0 100.0\u001b[0m",
" Barcode 2 (reverse) 70.8 69.2",
" Barcode 3 (reverse) 76.0 70.4",
" Barcode 4 (reverse) 74.1 71.4",
" Barcode 5 (reverse) 77.8 80.8",
" Barcode 6 (reverse) 73.1 70.8"
],
[
"versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-10T10:27:24.536642628"
},
"sarscov2-nanopore - stub": {
"content": [
{
"0": [
"log": [
[
{
"id": "test"
},
"test.porechop_abi.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
"test.porechop_abi.log"
]
],
"1": [
"reads": [
[
{
"id": "test"
},
"test.porechop_abi.log:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.porechop_abi.fastq.gz:md5,886fdb859fb50e0dddd35007bcff043e"
]
],
"2": [
"versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98"
],
"versions_porechop_abi": [
[
"PORECHOP_ABI",
"porechop_abi",
"0.5.0"
]
]
}
],
"timestamp": "2026-08-06T17:59:25.403246301",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"sarscov2-nanopore - stub": {
"content": [
{
"log": [
[
{
Expand All @@ -80,15 +52,19 @@
"test.porechop_abi.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"versions": [
"versions.yml:md5,0e9e5e0d35a68ff8e6490c949b257f98"
"versions_porechop_abi": [
[
"PORECHOP_ABI",
"porechop_abi",
"0.5.0"
]
]
}
],
"timestamp": "2026-08-06T17:59:32.504538143",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-10T10:27:30.502715737"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
17 changes: 4 additions & 13 deletions modules/nf-core/porechop/porechop/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ process PORECHOP_PORECHOP {
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/2b/2bce1f10c51906a66c4c4d3a7485394f67e304177192ad1cce6cf586a3a18bae/data' :
'community.wave.seqera.io/library/porechop_pigz:d1655e5b5bad786c' }"


input:
tuple val(meta), path(reads)

output:
tuple val(meta), path("*.fastq.gz"), emit: reads
tuple val(meta), path("*.log") , emit: log
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('porechop'), eval("porechop --version"), topic: versions, emit: versions_porechop

when:
task.ext.when == null || task.ext.when
Expand All @@ -24,15 +23,11 @@ process PORECHOP_PORECHOP {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
porechop \\
-i $reads \\
-t $task.cpus \\
$args \\
-i ${reads} \\
-t ${task.cpus} \\
${args} \\
-o ${prefix}.fastq.gz \\
> ${prefix}.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
porechop: \$( porechop --version )
END_VERSIONS
"""

stub:
Expand All @@ -41,9 +36,5 @@ process PORECHOP_PORECHOP {
touch ${prefix}.fastq
gzip ${prefix}.fastq
touch ${prefix}.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
porechop: \$( porechop --version )
END_VERSIONS
"""
}
31 changes: 24 additions & 7 deletions modules/nf-core/porechop/porechop/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ tools:
documentation: "https://github.com/rrwick/Porechop"
tool_dev_url: "https://github.com/rrwick/Porechop"
doi: "10.1099/mgen.0.000132"
licence: ["GPL v3"]
licence:
- "GPL v3"
identifier: ""
input:
- - meta:
Expand Down Expand Up @@ -48,13 +49,29 @@ output:
description: Log file containing stdout information
pattern: "*.log"
ontologies: []
versions_porechop:
- - ${task.process}:
type: string
description: The name of the process
- porechop:
type: string
description: The name of the tool
- porechop --version:
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
- porechop:
type: string
description: The name of the tool
- porechop --version:
type: eval
description: The expression to obtain the version of the tool

authors:
- "@ggabernet"
- "@jasmezz"
Expand Down
Loading