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
18 changes: 4 additions & 14 deletions modules/nf-core/preseq/ccurve/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process PRESEQ_CCURVE {
output:
tuple val(meta), path("*.c_curve.txt"), emit: c_curve
tuple val(meta), path("*.log") , emit: log
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('preseq'), eval("preseq 2>&1 | sed -n 's/Version: //p'"), emit: versions_preseq, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,27 +26,17 @@ process PRESEQ_CCURVE {
"""
preseq \\
c_curve \\
$args \\
$paired_end \\
${args} \\
${paired_end} \\
-output ${prefix}.c_curve.txt \\
$bam
${bam}
cp .command.err ${prefix}.command.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.c_curve.txt
touch ${prefix}.command.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//')
END_VERSIONS
"""
}
37 changes: 26 additions & 11 deletions modules/nf-core/preseq/ccurve/meta.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: preseq_ccurve
description: Software for predicting library complexity and genome coverage in high-throughput
sequencing
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
keywords:
- preseq
- library
- complexity
tools:
- preseq:
description: Software for predicting library complexity and genome coverage in
high-throughput sequencing
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
homepage: http://smithlabresearch.org/software/preseq/
documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf
tool_dev_url: https://github.com/smithlabcode/preseq
licence: ["GPL"]
licence:
- "GPL"
identifier: biotools:preseq
input:
- - meta:
Expand Down Expand Up @@ -48,13 +47,29 @@ output:
description: Log file containing stderr produced by Preseq
pattern: "*.{log}"
ontologies: []
versions_preseq:
- - ${task.process}:
type: string
description: The name of the process
- preseq:
type: string
description: The name of the tool
- "preseq 2>&1 | sed -n 's/Version: //p'":
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
- preseq:
type: string
description: The name of the tool
- "preseq 2>&1 | sed -n 's/Version: //p'":
type: eval
description: The expression to obtain the version of the tool

authors:
- "@drpatelh"
- "@edmundmiller"
Expand Down
28 changes: 6 additions & 22 deletions modules/nf-core/preseq/ccurve/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,78 +11,62 @@ nextflow_process {
tag "preseq/ccurve"

test("test-preseq-ccurve-single-end") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.c_curve,
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"])).match() }
)
}
}

test("test-preseq-ccurve-paired-end") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.c_curve,
file(process.out.log[0][1]).name,
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"])).match() }
)
}
}

test("test-preseq-ccurve-paired-end-stub") {
options '-stub'

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
113 changes: 62 additions & 51 deletions modules/nf-core/preseq/ccurve/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,72 +1,79 @@
{
"test-preseq-ccurve-paired-end": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.c_curve.txt:md5,cf4743abdd355595d6ec1fb3f38e66e5"
{
"c_curve": [
[
{
"id": "test",
"single_end": false
},
"test.c_curve.txt:md5,cf4743abdd355595d6ec1fb3f38e66e5"
]
],
"log": [
[
{
"id": "test",
"single_end": false
},
"test.command.log"
]
],
"versions_preseq": [
[
"PRESEQ_CCURVE",
"preseq",
"3.2.0"
]
]
],
"test.command.log",
[
"versions.yml:md5,2702c580fbb9fbe70468c50c9948aa29"
]
}
],
"timestamp": "2026-08-06T18:55:27.240838543",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-19T17:07:03.336886334"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"test-preseq-ccurve-single-end": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.c_curve.txt:md5,cf4743abdd355595d6ec1fb3f38e66e5"
]
],
"test.command.log",
[
"versions.yml:md5,2702c580fbb9fbe70468c50c9948aa29"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-19T17:06:51.412629669"
},
"test-preseq-ccurve-paired-end-stub": {
"content": [
{
"0": [
"c_curve": [
[
{
"id": "test",
"single_end": false
},
"test.c_curve.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.c_curve.txt:md5,cf4743abdd355595d6ec1fb3f38e66e5"
]
],
"1": [
"log": [
[
{
"id": "test",
"single_end": false
},
"test.command.log:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.command.log"
]
],
"2": [
"versions.yml:md5,2702c580fbb9fbe70468c50c9948aa29"
],
"versions_preseq": [
[
"PRESEQ_CCURVE",
"preseq",
"3.2.0"
]
]
}
],
"timestamp": "2026-08-06T18:55:20.969801086",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"test-preseq-ccurve-paired-end-stub": {
"content": [
{
"c_curve": [
[
{
Expand All @@ -85,15 +92,19 @@
"test.command.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,2702c580fbb9fbe70468c50c9948aa29"
"versions_preseq": [
[
"PRESEQ_CCURVE",
"preseq",
"3.2.0"
]
]
}
],
"timestamp": "2026-08-06T18:55:33.242745598",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-19T17:07:21.526898235"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
8 changes: 4 additions & 4 deletions modules/nf-core/preseq/lcextrap/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process PRESEQ_LCEXTRAP {
output:
tuple val(meta), path("*.lc_extrap.txt"), emit: lc_extrap
tuple val(meta), path("*.log") , emit: log
tuple val("${task.process}"), val('preseq'), eval("preseq 2>&1 | sed -n 's/.*Version: \\(.*\\)/\\1/p'"), emit: versions_preseq, topic: versions
tuple val("${task.process}"), val('preseq'), eval("preseq 2>&1 | sed -n 's/Version: //p'"), emit: versions_preseq, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -27,10 +27,10 @@ process PRESEQ_LCEXTRAP {
"""
preseq \\
lc_extrap \\
$args \\
$paired_end \\
${args} \\
${paired_end} \\
-output ${prefix}.lc_extrap.txt \\
$bam
${bam}
cp .command.err ${prefix}.command.log
"""

Expand Down
13 changes: 6 additions & 7 deletions modules/nf-core/preseq/lcextrap/meta.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: preseq_lcextrap
description: Software for predicting library complexity and genome coverage in high-throughput
sequencing
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
keywords:
- preseq
- library
- complexity
tools:
- preseq:
description: Software for predicting library complexity and genome coverage in
high-throughput sequencing
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
homepage: http://smithlabresearch.org/software/preseq/
documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf
tool_dev_url: https://github.com/smithlabcode/preseq
licence: ["GPL"]
licence:
- "GPL"
identifier: biotools:preseq
input:
- - meta:
Expand Down Expand Up @@ -55,7 +54,7 @@ output:
- preseq:
type: string
description: The name of the tool
- "preseq 2>&1 | sed -n 's/.*Version: \\(.*\\)/\\1/p'":
- "preseq 2>&1 | sed -n 's/Version: //p'":
type: eval
description: The expression to obtain the version of the tool

Expand All @@ -67,7 +66,7 @@ topics:
- preseq:
type: string
description: The name of the tool
- "preseq 2>&1 | sed -n 's/.*Version: \\(.*\\)/\\1/p'":
- "preseq 2>&1 | sed -n 's/Version: //p'":
type: eval
description: The expression to obtain the version of the tool

Expand Down
Loading