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
2 changes: 1 addition & 1 deletion modules/nf-core/presto/filterseq/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::presto=0.7.1
- bioconda::presto=0.7.9
32 changes: 13 additions & 19 deletions modules/nf-core/presto/filterseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ process PRESTO_FILTERSEQ {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/presto:0.7.1--pyhdfd78af_0':
'quay.io/biocontainers/presto:0.7.1--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/presto:0.7.9--pyhdfd78af_0':
'quay.io/biocontainers/presto:0.7.9--pyhdfd78af_0' }"

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

output:
tuple val(meta), path("*_quality-pass.fastq"), emit: reads
tuple val(meta), path("*_quality-pass.fastq.gz"), emit: reads
path "*_command_log.txt" , emit: logs
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('presto'), eval('FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1'), emit: versions_presto, topic: versions
path "*.tab" , emit: log_tab

when:
Expand All @@ -23,31 +23,25 @@ process PRESTO_FILTERSEQ {
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def log_prefix = reads.simpleName
"""
FilterSeq.py quality \\
-s $reads \\
--outname ${prefix} \\
--log ${reads.baseName}.log \\
--log ${log_prefix}.log \\
--nproc ${task.cpus} \\
$args > ${prefix}_command_log.txt

ParseLog.py -l ${reads.baseName}.log $args2 -f ID QUALITY

cat <<-END_VERSIONS > versions.yml
"${task.process}":
presto: \$( FilterSeq.py --version | awk -F' ' '{print \$2}' )
END_VERSIONS
"""
ParseLog.py -l ${log_prefix}.log $args2 -f ID QUALITY
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def log_prefix = reads.baseName.replaceFirst(/\.f(ast)?q$/, '')
"""
touch ${prefix}_quality-pass.fastq ${prefix}_quality-pass.fastq \\
${prefix}_command_log.txt ${prefix}.log ${prefix}.tab

cat <<-END_VERSIONS > versions.yml
"${task.process}":
presto: \$( FilterSeq.py --version | awk -F' ' '{print \$2}' )
END_VERSIONS
touch ${prefix}_quality-pass.fastq.gz \\
${prefix}_command_log.txt \\
${log_prefix}.log \\
${log_prefix}_table.tab
"""
}
52 changes: 34 additions & 18 deletions modules/nf-core/presto/filterseq/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "presto_filterseq"
description: Filter reads by quality score.
keywords:
Expand All @@ -14,9 +13,9 @@ tools:
documentation: "https://presto.readthedocs.io"
tool_dev_url: "https://bitbucket.org/kleinstein/presto"
doi: "10.1093/bioinformatics/btu138"
licence: ["AGPL v3"]
licence:
- "AGPL v3"
identifier: biotools:presto-measure

input:
- - meta:
type: map
Expand All @@ -25,42 +24,59 @@ input:
e.g. `[ id:'test', single_end:false ]`
- reads:
type: file
description: fastq file
pattern: "*.{fastq}"
description: compressed fastq file
pattern: "*.{fastq.gz}"
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ
- edam: http://edamontology.org/format_1930
output:
reads:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- "*_quality-pass.fastq":
- "*_quality-pass.fastq.gz":
type: file
description: filtered fastq file
pattern: "*.{fastq}"
description: filtered fastq.gz file
pattern: "*.{fastq.gz}"
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ
- edam: http://edamontology.org/format_1930
logs:
- "*_command_log.txt":
type: file
description: command logs
pattern: "*.txt"
ontologies: []
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
versions_presto:
- - ${task.process}:
type: string
description: The name of the process
- presto:
type: string
description: the name of the tool
- FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1:
type: eval
description: The expression to obtain the version of the tool
log_tab:
- "*.tab":
type: file
description: parsed log table
pattern: "*.tab"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- edam: http://edamontology.org/format_3475
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- presto:
type: string
description: the name of the tool
- FilterSeq.py --version | grep -o "[0-9][0-9.]*" | head -n 1:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@ggabernet"
maintainers:
- "@ggabernet"
- "@Vivian0105"
29 changes: 7 additions & 22 deletions modules/nf-core/presto/filterseq/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,31 @@ nextflow_process {

tag "modules"
tag "modules_nfcore"
tag "gunzip"
tag "presto"
tag "presto/filterseq"

test("homo_sapiens - fastq") {

setup {

run("GUNZIP") {
script "../../../gunzip/main.nf"
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_airrseq_umi_R1.fastq.gz', checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = GUNZIP.out.gunzip
input[0] = [
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_airrseq_umi_R1.fastq.gz', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions,
process.out.reads,
process.out.log_tab).match() },
{ assert snapshot(process.out.versions_presto).match("test_snap_versions") },
{ assert snapshot(process.out.reads,
process.out.log_tab).match("test_snap_output") },
{ assert path(process.out.log_tab.get(0)).getText().contains("QUALITY") },
{ assert path(process.out.logs.get(0)).getText().contains("PASS") }
)
}

}

}
36 changes: 24 additions & 12 deletions modules/nf-core/presto/filterseq/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
{
"homo_sapiens - fastq": {
"test_snap_output": {
"content": [
[
"versions.yml:md5,5f939545018a68e43b57c7dfc7ace1b8"
],
[
[
{
"id": "test",
"single_end": false
"id": "test"
},
"test_quality-pass.fastq:md5,36979cf434408b9cb5e8dc50692e2842"
"test_quality-pass.fastq.gz:md5,ef29c77b26f2123a6db36bc1c9a40d7d"
]
],
[
"test_airrseq_umi_R1_table.tab:md5,3b3f6ff09d5fb8c01a25294e0522ec5f"
"test_airrseq_umi_R1_table.tab:md5,eefa8e36013b462cb9a37be2654d67eb"
]
],
"timestamp": "2026-06-30T13:44:26.505405459",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
},
"test_snap_versions": {
"content": [
[
[
"PRESTO_FILTERSEQ",
"presto",
"0.7.9"
]
]
],
"timestamp": "2026-06-30T13:44:26.4964953",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.3"
},
"timestamp": "2024-01-25T18:01:03.38558"
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
}
}
Loading