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
14 changes: 1 addition & 13 deletions modules/nf-core/variantbam/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,23 @@ process VARIANTBAM {

output:
tuple val(meta), path("*.bam"), emit: bam
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('VariantBam'), val('1.4.4a'), emit: versions_variant, topic: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.4.4a' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
variant \\
$bam \\
-o ${prefix}.bam \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
variantbam: $VERSION
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.4.4a' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
variantbam: $VERSION
END_VERSIONS
"""
}
43 changes: 31 additions & 12 deletions modules/nf-core/variantbam/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: variantbam
description: Filtering, downsampling and profiling alignments in BAM/CRAM formats
description: Filtering, downsampling and profiling alignments in BAM/CRAM
formats
keywords:
- filter
- bam
Expand All @@ -9,13 +10,14 @@ keywords:
- subsample bam
tools:
- variantbam:
description: Filtering and profiling of next-generational sequencing data using
region-specific rules
description: Filtering and profiling of next-generational sequencing data
using region-specific rules
homepage: https://github.com/walaj/VariantBam
documentation: https://github.com/walaj/VariantBam#table-of-contents
tool_dev_url: https://github.com/walaj/VariantBam
doi: 10.1093/bioinformatics/btw111
licence: ["Apache-2.0"]
licence:
- "Apache-2.0"
identifier: biotools:variantbam
input:
- - meta:
Expand All @@ -27,7 +29,9 @@ input:
type: file
description: BAM/CRAM file
pattern: "*.{bam,cram}"
ontologies: []
ontologies:
- edam: http://edamontology.org/format_2572 # BAM
- edam: http://edamontology.org/format_3462 # CRAM
output:
bam:
- - meta:
Expand All @@ -39,14 +43,29 @@ output:
type: file
description: Filtered or downsampled BAM file
pattern: "*.{bam}"
ontologies: []
ontologies:
- edam: http://edamontology.org/format_2572 # BAM
versions_variant:
- - ${task.process}:
type: string
description: The name of the process
- VariantBam:
type: string
description: The name of the tool
- 1.4.4a:
type: string
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
- VariantBam:
type: string
description: The name of the tool
- 1.4.4a:
type: string
description: The expression to obtain the version of the tool
authors:
- "@bjohnnyd"
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/variantbam/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }

)
}
Expand All @@ -49,7 +49,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand Down
52 changes: 18 additions & 34 deletions modules/nf-core/variantbam/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sarscov2 - bam - stub": {
"content": [
{
"0": [
"bam": [
[
{
"id": "test",
Expand All @@ -11,33 +11,25 @@
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,45eda67e09904edc15da264601a307a8"
],
"bam": [
"versions_variant": [
[
{
"id": "test",
"single_end": false
},
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
"VARIANTBAM",
"VariantBam",
"1.4.4a"
]
],
"versions": [
"versions.yml:md5,45eda67e09904edc15da264601a307a8"
]
}
],
"timestamp": "2026-05-21T12:31:49.678638817",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-20T15:10:11.678956173"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"sarscov2 - bam": {
"content": [
{
"0": [
"bam": [
[
{
"id": "test",
Expand All @@ -46,27 +38,19 @@
"test.bam:md5,fb5b383bb40e3d07cc092e8f97efd5a9"
]
],
"1": [
"versions.yml:md5,45eda67e09904edc15da264601a307a8"
],
"bam": [
"versions_variant": [
[
{
"id": "test",
"single_end": false
},
"test.bam:md5,fb5b383bb40e3d07cc092e8f97efd5a9"
"VARIANTBAM",
"VariantBam",
"1.4.4a"
]
],
"versions": [
"versions.yml:md5,45eda67e09904edc15da264601a307a8"
]
}
],
"timestamp": "2026-05-21T12:31:43.305016973",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-20T15:08:05.260576622"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
Loading