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
22 changes: 6 additions & 16 deletions modules/nf-core/graphmap2/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process GRAPHMAP2_ALIGN {

output:
tuple val(meta), path("*.sam"), emit: sam
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('graphmap2'), eval("graphmap2 2>&1 | sed -n 's/Version: v//p'"), emit: versions_graphmap2, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,29 +26,19 @@ process GRAPHMAP2_ALIGN {
"""
graphmap2 \\
align \\
-t $task.cpus \\
-r $fasta \\
-i $index \\
-d $reads \\
-t ${task.cpus} \\
-r ${fasta} \\
-i ${index} \\
-d ${reads} \\
-o ${prefix}.sam \\
$args

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

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

"""
touch ${prefix}.sam

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

}
32 changes: 24 additions & 8 deletions modules/nf-core/graphmap2/align/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: graphmap2_align
description: A versatile pairwise aligner for genomic and spliced nucleotide sequences
description: A versatile pairwise aligner for genomic and spliced nucleotide
sequences
keywords:
- align
- fasta
Expand All @@ -12,7 +13,8 @@ tools:
A versatile pairwise aligner for genomic and spliced nucleotide sequences.
homepage: https://github.com/lbcb-sci/graphmap2
documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:Graphmap2
input:
- - meta:
Expand Down Expand Up @@ -46,13 +48,27 @@ output:
description: Alignment in SAM format
pattern: "*.sam"
ontologies: []
versions_graphmap2:
- - ${task.process}:
type: string
description: The name of the process
- graphmap2:
type: string
description: The name of the tool
- "graphmap2 2>&1 | sed -n 's/Version: v//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
- graphmap2:
type: string
description: The name of the tool
- "graphmap2 2>&1 | sed -n 's/Version: v//p'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@yuukiiwa"
- "@drpatelh"
Expand Down
15 changes: 4 additions & 11 deletions modules/nf-core/graphmap2/align/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ nextflow_process {
"""
input[0] = [
[id:'test'],
[file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)]
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true)
input[2] = GRAPHMAP2_INDEX.out.index
Expand All @@ -40,11 +40,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.versions,
// sam(process.out.sam[0][1]).getSamLinesMD5() htsjdk.samtools.SAMFormatException: Error parsing text SAM file. MAPQ must be zero if RNAME is not specified
file(process.out.sam[0][1]).name
).match() }
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["sam"])).match() }
)
}
}
Expand All @@ -57,7 +53,7 @@ nextflow_process {
"""
input[0] = [
[id:'test'],
[file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)]
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists:true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true)
input[2] = GRAPHMAP2_INDEX.out.index
Expand All @@ -67,10 +63,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
59 changes: 30 additions & 29 deletions modules/nf-core/graphmap2/align/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,53 @@
"sarscov2 - fastq - fasta - index -- stub": {
"content": [
{
"0": [
"sam": [
[
{
"id": "test"
},
"test.sam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,0c397959d073e21ab58ceed89978f8bb"
],
"sam": [
"versions_graphmap2": [
[
{
"id": "test"
},
"test.sam:md5,d41d8cd98f00b204e9800998ecf8427e"
"GRAPHMAP2_ALIGN",
"graphmap2",
"0.6.3"
]
],
"versions": [
"versions.yml:md5,0c397959d073e21ab58ceed89978f8bb"
]
},
{
"GRAPHMAP2_ALIGN": {
"graphmap2": "0.6.3"
}
}
],
"timestamp": "2026-05-11T21:53:33.81849412",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-14T11:52:49.613989705"
"nf-test": "0.9.5",
"nextflow": "26.03.2"
}
},
"sarscov2 - fastq - fasta - index": {
"content": [
[
"versions.yml:md5,0c397959d073e21ab58ceed89978f8bb"
],
"test.sam"
{
"sam": [
[
{
"id": "test"
},
"test.sam"
]
],
"versions_graphmap2": [
[
"GRAPHMAP2_ALIGN",
"graphmap2",
"0.6.3"
]
]
}
],
"timestamp": "2026-05-11T21:53:19.638775357",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-14T11:52:41.96001224"
"nf-test": "0.9.5",
"nextflow": "26.03.2"
}
}
}
20 changes: 5 additions & 15 deletions modules/nf-core/graphmap2/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ process GRAPHMAP2_INDEX {
path fasta

output:
path "*.gmidx" , emit: index
path "versions.yml" , emit: versions
path "*.gmidx", emit: index
tuple val("${task.process}"), val('graphmap2'), eval("graphmap2 2>&1 | sed -n 's/Version: v//p'"), emit: versions_graphmap2, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,25 +21,15 @@ process GRAPHMAP2_INDEX {
"""
graphmap2 \\
align \\
-t $task.cpus \\
-t ${task.cpus} \\
-I \\
$args \\
-r $fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//')
END_VERSIONS
${args} \\
-r ${fasta}
"""

stub:

"""
touch ${fasta}.gmidx

cat <<-END_VERSIONS > versions.yml
"${task.process}":
graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//')
END_VERSIONS
"""
}
32 changes: 24 additions & 8 deletions modules/nf-core/graphmap2/index/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: graphmap2_index
description: A versatile pairwise aligner for genomic and spliced nucleotide sequences
description: A versatile pairwise aligner for genomic and spliced nucleotide
sequences
keywords:
- index
- fasta
Expand All @@ -10,7 +11,8 @@ tools:
A versatile pairwise aligner for genomic and spliced nucleotide sequences.
homepage: https://github.com/lbcb-sci/graphmap2
documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:Graphmap2
input:
- fasta:
Expand All @@ -25,13 +27,27 @@ output:
description: Index file in gmidx format
pattern: "*.gmidx"
ontologies: []
versions_graphmap2:
- - ${task.process}:
type: string
description: The name of the process
- graphmap2:
type: string
description: The name of the tool
- "graphmap2 2>&1 | sed -n 's/Version: v//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
- graphmap2:
type: string
description: The name of the tool
- "graphmap2 2>&1 | sed -n 's/Version: v//p'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@yuukiiwa"
- "@drpatelh"
Expand Down
6 changes: 2 additions & 4 deletions modules/nf-core/graphmap2/index/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ nextflow_process {
process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand All @@ -36,15 +35,14 @@ nextflow_process {
process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
Loading
Loading