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
7 changes: 7 additions & 0 deletions modules/nf-core/flumut/run/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::flumut=0.6.5"
45 changes: 45 additions & 0 deletions modules/nf-core/flumut/run/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process FLUMUT_RUN {
tag "${meta.id}"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "quay.io/biocontainers/flumut:0.6.5--pyhdfd78af_0"

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

output:
tuple val(meta), path("*.tsv"), emit: tsv
tuple val(meta), path("*.xlsm"), emit: xlsm

tuple val("${task.process}"), val('flumut'), eval("flumut --all-versions"), topic: versions, emit: versions_flumut

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
flumut \\
${args} \\
-x ${prefix}.xlsm \\
-m ${prefix}_markers.tsv \\
-M ${prefix}_mutations.tsv \\
-l ${prefix}_literature.tsv \\
${fasta}
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo ${args}

touch \\
${prefix}.xlsm \\
${prefix}_markers.tsv \\
${prefix}_mutations.tsv \\
${prefix}_literature.tsv
"""
}
85 changes: 85 additions & 0 deletions modules/nf-core/flumut/run/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "flumut_run"
description: Run the FluMut tool to search for molecular markers with potential
impact on the biological characteristics of Influenza A viruses of the A(H5N1)
subtype.
keywords:
- FluMut
- mutations
- surveillance
- H5N1
- Avian Influenza Virus
tools:
- "flumut":
description: "A tool to search for molecular markers with potential impact on
the biological characteristics of Influenza A viruses of the A(H5N1) subtype."
homepage: "https://github.com/izsvenezie-virology/FluMut"
documentation: "https://izsvenezie-virology.github.io/FluMut/"
tool_dev_url: "https://github.com/izsvenezie-virology/FluMut"
doi: "10.1093/ve/veaf011"
licence:
- "AGPL v3-or-later"
identifier: biotools:flumut
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- fasta:
type: file
description: The FASTA containing al the sequences to be analyzed
pattern: "*.{fa,fasta,fas}"
ontologies:
- edam: "http://edamontology.org/format_1929"
output:
tsv:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.tsv":
type: file
description: TSV files containing results
pattern: "*.tsv"
ontologies:
- edam: "http://edamontology.org/format_3475"
xlsm:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.xlsm":
type: file
description: Excel file containing results
pattern: "*.{xlsm}"
ontologies:
- edam: "http://edamontology.org/format_3468"
versions_flumut:
- - ${task.process}:
type: string
description: The name of the process
- flumut:
type: string
description: The name of the tool
- flumut --all-versions:
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- flumut:
type: string
description: The name of the tool
- flumut --all-versions:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@EdoardoGiussani"
- "@AlexSartori"
maintainers:
- "@EdoardoGiussani"
- "@AlexSartori"
61 changes: 61 additions & 0 deletions modules/nf-core/flumut/run/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
nextflow_process {

name "Test Process FLUMUT_RUN"
script "../main.nf"
process "FLUMUT_RUN"

tag "modules"
tag "modules_nfcore"
tag "flumut"
tag "flumut/run"

test("H5N1_2.3.4.4b_Italy - fasta") {
when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/virus/influenza/fasta/H5N1_2.3.4.4b_Italy.fa', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.tsv,
file(process.out.xlsm[0][1]).name,
process.out.findAll { key, val -> key.startsWith('versions') }
).match() }
)
}

}

test("H5N1_2.3.4.4b_Italy - fasta - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/virus/influenza/fasta/H5N1_2.3.4.4b_Italy.fa', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
98 changes: 98 additions & 0 deletions modules/nf-core/flumut/run/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"H5N1_2.3.4.4b_Italy - fasta - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
[
"test_literature.tsv:md5,d41d8cd98f00b204e9800998ecf8427e",
"test_markers.tsv:md5,d41d8cd98f00b204e9800998ecf8427e",
"test_mutations.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
[
{
"id": "test"
},
"test.xlsm:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
"FLUMUT_RUN",
"flumut",
"FluMut: 0.6.5\nFluMutDB: 6.6, released on 2026-03-17"
]
],
"tsv": [
[
{
"id": "test"
},
[
"test_literature.tsv:md5,d41d8cd98f00b204e9800998ecf8427e",
"test_markers.tsv:md5,d41d8cd98f00b204e9800998ecf8427e",
"test_mutations.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"versions_flumut": [
[
"FLUMUT_RUN",
"flumut",
"FluMut: 0.6.5\nFluMutDB: 6.6, released on 2026-03-17"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct.

]
],
"xlsm": [
[
{
"id": "test"
},
"test.xlsm:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
}
],
"timestamp": "2026-05-22T12:11:02.098163186",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.04.6"
}
},
"H5N1_2.3.4.4b_Italy - fasta": {
"content": [
[
[
{
"id": "test"
},
[
"test_literature.tsv:md5,8999b029cb5cfcde7a4281cbcb3285c9",
"test_markers.tsv:md5,cbdc33bff11829875d7a88c3bd8d0303",
"test_mutations.tsv:md5,5c2d23a12a8fe807c237d952753daf3a"
]
]
],
"test.xlsm",
{
"versions_flumut": [
[
"FLUMUT_RUN",
"flumut",
"FluMut: 0.6.5\nFluMutDB: 6.6, released on 2026-03-17"
]
]
}
],
"timestamp": "2026-05-22T12:10:54.114556478",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.04.6"
}
}
}
Loading