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
37 changes: 18 additions & 19 deletions modules/nf-core/minia/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ process MINIA {

conda "${moduleDir}/environment.yml"
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.

can you update the version number in this file as well please

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/minia:3.2.6--h9a82719_0' :
'biocontainers/minia:3.2.6--h9a82719_0' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d1/d1127b772f97ea9d62cb853d174a8e82be7e8e8598933d49b2061cb0550e276f/data' :
'community.wave.seqera.io/library/minia:3.2.6--92bae1756baab1ef' }"

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

output:
tuple val(meta), path('*.contigs.fa'), emit: contigs
tuple val(meta), path('*.unitigs.fa'), emit: unitigs
tuple val(meta), path('*.h5') , emit: h5
path "versions.yml" , emit: versions
tuple val(meta), path('*.contigs.fa.gz'), emit: contigs
tuple val(meta), path('*.unitigs.fa.gz'), emit: unitigs
tuple val(meta), path('*.h5') , emit: h5
tuple val(meta), path("*-minia.log") , emit: log
tuple val("${task.process}"), val("minia"), eval("minia -v | sed -n 's/Minia version //p'"), topic: versions, emit: versions_minia

when:
task.ext.when == null || task.ext.when
Expand All @@ -29,24 +30,22 @@ process MINIA {
$args \\
-nb-cores $task.cpus \\
-in input_files.txt \\
-out $prefix

cat <<-END_VERSIONS > versions.yml
"${task.process}":
minia: \$(echo \$(minia --version 2>&1 | grep Minia) | sed 's/^.*Minia version //;')
END_VERSIONS
-out $prefix > ${prefix}-minia.log 2>&1

if [ -f ${prefix}.contigs.fa ]; then
gzip -cn ${prefix}.contigs.fa > ${prefix}.contigs.fa.gz
fi
if [ -f ${prefix}.unitigs.fa ]; then
gzip -cn ${prefix}.unitigs.fa > ${prefix}.unitigs.fa.gz
fi
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.contigs.fa
touch ${prefix}.unitigs.fa
echo "" | gzip > ${prefix}.contigs.fa.gz
echo "" | gzip > ${prefix}.unitigs.fa.gz
touch ${prefix}.h5

cat <<-END_VERSIONS > versions.yml
"${task.process}":
minia: \$(echo \$(minia --version 2>&1 | grep Minia) | sed 's/^.*Minia version //;')
END_VERSIONS
touch ${prefix}-minia.log
"""
}
70 changes: 50 additions & 20 deletions modules/nf-core/minia/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,90 @@ tools:
a human genome on a desktop computer in a day. The output of Minia is a set of contigs.
homepage: https://github.com/GATB/minia
documentation: https://github.com/GATB/minia
licence: ["AGPL-3.0-or-later"]
licence:
- "AGPL-3.0-or-later"
identifier: biotools:minia
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- reads:
type: file
description: Input reads in FastQ format
pattern: "*.{fastq.gz, fastq}"
ontologies: []
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ
output:
contigs:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.contigs.fa":
e.g. [ id:'test' ]
- "*.contigs.fa.gz":
type: file
description: The assembled contigs
pattern: "*.contigs.fa"
ontologies: []
pattern: "*.contigs.fa.gz"
ontologies:
- edam: http://edamontology.org/format_3989
unitigs:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.unitigs.fa":
e.g. [ id:'test' ]
- "*.unitigs.fa.gz":
type: file
description: The assembled unitigs
pattern: "*.unitigs.fa"
ontologies: []
pattern: "*.unitigs.fa.gz"
ontologies:
- edam: http://edamontology.org/format_3989
h5:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- "*.h5":
type: file
description: Minia output h5 file
pattern: "*{.h5}"
description: Minia assembly graph in binary h5 format
pattern: "*.h5"
ontologies: []

log:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- "*-minia.log":
type: file
description: Minia assembly log file
pattern: "*-minia.log"
ontologies: []
versions_minia:
- - ${task.process}:
type: string
description: The name of the process
- minia:
type: string
description: The name of the tool
- minia -v | sed -n 's/Minia 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
- minia:
type: string
description: The name of the tool
- minia -v | sed -n 's/Minia version //p':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@drpatelh"
- "@kevinmenden"
Expand Down
41 changes: 37 additions & 4 deletions modules/nf-core/minia/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,39 @@ nextflow_process {
tag "modules_nfcore"
tag "minia"

test("test-minia") {
test("sarscov2 - fastq - se") {

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

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert path(process.out.contigs[0][1]).linesGzip.any { it.contains('AAA') } },
{ assert path(process.out.unitigs[0][1]).linesGzip.any { it.contains('CCC') } },
{ assert snapshot(
file(process.out.contigs[0][1]).name,
file(process.out.unitigs[0][1]).name,
file(process.out.h5[0][1]).name,
file(process.out.log[0][1]).name,
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
)
}
}

test("sarscov2 - fastq - pe") {

when {
process {
Expand All @@ -29,13 +61,14 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert file(process.out.contigs[0][1]).text.contains('AAA') },
{ assert file(process.out.unitigs[0][1]).text.contains('CCC') },
{ assert path(process.out.contigs[0][1]).linesGzip.any { it.contains('AAA') } },
{ assert path(process.out.unitigs[0][1]).linesGzip.any { it.contains('CCC') } },
{ assert snapshot(
file(process.out.contigs[0][1]).name,
file(process.out.unitigs[0][1]).name,
file(process.out.h5[0][1]).name,
process.out.versions,
file(process.out.log[0][1]).name,
process.out.findAll { key, val -> key.startsWith('versions') },
).match()
}
)
Expand Down
85 changes: 68 additions & 17 deletions modules/nf-core/minia/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,18 +1,45 @@
{
"test-minia": {
"sarscov2 - fastq - se": {
"content": [
"test.contigs.fa",
"test.unitigs.fa",
"test.contigs.fa.gz",
"test.unitigs.fa.gz",
"test.h5",
"test-minia.log",
{
"versions_minia": [
[
"MINIA",
"minia",
"3.2.5"
]
]
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2026-03-27T16:29:27.70699655"
},
"sarscov2 - fastq - pe": {
"content": [
"test.contigs.fa.gz",
"test.unitigs.fa.gz",
"test.h5",
"test-minia.log",
[
"versions.yml:md5,242f8593f9ee8955fb73580c78f30200"
[
"MINIA",
"minia",
"3.2.5"
]
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2024-09-05T19:56:44.252673"
"timestamp": "2026-03-27T16:29:33.61312516"
},
"test-minia-stub": {
"content": [
Expand All @@ -22,15 +49,15 @@
{
"id": "test"
},
"test.contigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.contigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
[
{
"id": "test"
},
"test.unitigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.unitigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"2": [
Expand All @@ -42,14 +69,26 @@
]
],
"3": [
"versions.yml:md5,242f8593f9ee8955fb73580c78f30200"
[
{
"id": "test"
},
"test-minia.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"4": [
[
"MINIA",
"minia",
"3.2.5"
]
],
"contigs": [
[
{
"id": "test"
},
"test.contigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.contigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"h5": [
Expand All @@ -60,23 +99,35 @@
"test.h5:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"log": [
[
{
"id": "test"
},
"test-minia.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"unitigs": [
[
{
"id": "test"
},
"test.unitigs.fa:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.unitigs.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"versions": [
"versions.yml:md5,242f8593f9ee8955fb73580c78f30200"
"versions_minia": [
[
"MINIA",
"minia",
"3.2.5"
]
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.3",
"nextflow": "25.10.4"
},
"timestamp": "2024-09-05T19:52:02.585904"
"timestamp": "2026-03-27T16:29:38.952052332"
}
}
Loading