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
33 changes: 13 additions & 20 deletions modules/nf-core/qualimap/bamqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,30 @@ process QUALIMAP_BAMQC {

def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs'
def memory = (task.memory.mega*0.8).intValue() + 'M'
def regions = gff ? "--gff $gff" : ''
def regions = gff ? "--gff ${gff}" : ''

def strandedness = 'non-strand-specific'
if (meta.strandedness == 'forward') {
strandedness = 'strand-specific-forward'
} else if (meta.strandedness == 'reverse') {
strandedness = 'strand-specific-reverse'
}
"""
unset DISPLAY
mkdir -p tmp
export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp
qualimap \\
--java-mem-size=$memory \\
--java-mem-size=${memory} \\
bamqc \\
$args \\
-bam $bam \\
$regions \\
-p $strandedness \\
$collect_pairs \\
-outdir $prefix \\
-nt $task.cpus
${args} \\
-bam ${bam} \\
${regions} \\
${collect_pairs} \\
-outdir ${prefix} \\
-nt ${task.cpus}
"""

stub:
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p $prefix/css
mkdir $prefix/images_qualimapReport
mkdir $prefix/raw_data_qualimapReport
cd $prefix/css
mkdir -p ${prefix}/css
mkdir ${prefix}/images_qualimapReport
mkdir ${prefix}/raw_data_qualimapReport
cd ${prefix}/css
touch agogo.css
touch basic.css
touch bgtop.png
Expand Down
3 changes: 2 additions & 1 deletion modules/nf-core/qualimap/bamqc/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tools:
homepage: http://qualimap.bioinfo.cipf.es/
documentation: http://qualimap.conesalab.org/doc_html/index.html
doi: 10.1093/bioinformatics/bts503
licence: ["GPL-2.0-only"]
licence:
- "GPL-2.0-only"
identifier: biotools:qualimap
input:
- - meta:
Expand Down
28 changes: 10 additions & 18 deletions modules/nf-core/qualimap/bamqc/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,19 @@ nextflow_process {
when {
process {
"""
gff = []

input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
input[0] = [
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
])
input[1] = gff
]
input[1] = []
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file("${process.out.results[0][1]}/qualimapReport.html").name,
path("${process.out.results[0][1]}/genome_results.txt"),
process.out.findAll {key, value -> key.startsWith("versions")})
.match() }
{ assert snapshot(sanitizeOutput(process.out, unstableKeys:["results"])).match() }
)
}
}
Expand All @@ -40,21 +34,19 @@ nextflow_process {
when {
process {
"""
gff = []

input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
input[0] = [
[ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
])
input[1] = gff
]
input[1] = []
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
100 changes: 17 additions & 83 deletions modules/nf-core/qualimap/bamqc/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,6 @@
"homo_sapiens [bam] - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
[
[
"agogo.css:md5,d41d8cd98f00b204e9800998ecf8427e",
"ajax-loader.gif:md5,d41d8cd98f00b204e9800998ecf8427e",
"basic.css:md5,d41d8cd98f00b204e9800998ecf8427e",
"bgfooter.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"bgtop.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"comment-bright.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"comment-close.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"comment.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"doctools.js:md5,d41d8cd98f00b204e9800998ecf8427e",
"down-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"down.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"file.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"jquery.js:md5,d41d8cd98f00b204e9800998ecf8427e",
"minus.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"plus.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"pygments.css:md5,d41d8cd98f00b204e9800998ecf8427e",
"qualimap_logo_small.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"report.css:md5,d41d8cd98f00b204e9800998ecf8427e",
"searchtools.js:md5,d41d8cd98f00b204e9800998ecf8427e",
"underscore.js:md5,d41d8cd98f00b204e9800998ecf8427e",
"up-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"up.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"websupport.js:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"genome_results.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
[
"genome_coverage_0to50_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_coverage_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_coverage_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_coverage_quotes.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_gc_content_per_window.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_homopolymer_indels.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_insert_size_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_insert_size_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_mapping_quality_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_mapping_quality_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_reads_clipping_profile.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_reads_content_per_read_position.png:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_uniq_read_starts_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"qualimapReport.html:md5,d41d8cd98f00b204e9800998ecf8427e",
[
"coverage_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"coverage_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"duplication_rate_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"genome_fraction_coverage.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"homopolymer_indels.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"insert_size_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"insert_size_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"mapped_reads_clipping_profile.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"mapped_reads_gc-content_distribution.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"mapped_reads_nucleotide_content.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"mapping_quality_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e",
"mapping_quality_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
]
],
"1": [
[
"QUALIMAP_BAMQC",
"qualimap",
"2.3"
]
],
"results": [
[
{
Expand Down Expand Up @@ -150,17 +77,24 @@
]
}
],
"timestamp": "2026-08-10T17:20:29.62252359",
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.3"
},
"timestamp": "2026-02-13T22:03:27.280522"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"homo_sapiens [bam]": {
"content": [
"qualimapReport.html",
"genome_results.txt:md5,45103d63ba82df2b905eb04819c32dd3",
{
"results": [
[
{
"id": "test",
"single_end": false
},
"test"
]
],
"versions_qualimap": [
[
"QUALIMAP_BAMQC",
Expand All @@ -170,10 +104,10 @@
]
}
],
"timestamp": "2026-08-10T17:20:21.098222842",
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.3"
},
"timestamp": "2026-02-13T22:12:46.38879"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
38 changes: 10 additions & 28 deletions modules/nf-core/qualimap/bamqccram/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ process QUALIMAP_BAMQCCRAM {

output:
tuple val(meta), path("${prefix}"), emit: results
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('qualimap'), eval("qualimap -h | sed -n 's/^QualiMap v.//p'"), topic: versions, emit: versions_qualimap
tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,47 +27,28 @@ process QUALIMAP_BAMQCCRAM {

def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs'
def memory = (task.memory.mega*0.8).intValue() + 'M'
def regions = gff ? "--gff $gff" : ''
def regions = gff ? "--gff ${gff}" : ''

def strandedness = 'non-strand-specific'
if (meta.strandedness == 'forward') {
strandedness = 'strand-specific-forward'
} else if (meta.strandedness == 'reverse') {
strandedness = 'strand-specific-reverse'
}
"""
unset DISPLAY
mkdir -p tmp
export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp

samtools view -hb -T ${fasta} ${cram} |
qualimap \\
--java-mem-size=$memory \\
--java-mem-size=${memory} \\
bamqc \\
$args \\
${args} \\
-bam /dev/stdin \\
$regions \\
-p $strandedness \\
$collect_pairs \\
-outdir $prefix \\
-nt $task.cpus

cat <<-END_VERSIONS > versions.yml
"${task.process}":
qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
${regions} \\
${collect_pairs} \\
-outdir ${prefix} \\
-nt ${task.cpus}
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
52 changes: 45 additions & 7 deletions modules/nf-core/qualimap/bamqccram/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tools:
homepage: http://qualimap.bioinfo.cipf.es/
documentation: http://qualimap.conesalab.org/doc_html/index.html
doi: 10.1093/bioinformatics/bts503
licence: ["GPL-2.0-only"]
licence:
- "GPL-2.0-only"
identifier: biotools:qualimap
input:
- - meta:
Expand Down Expand Up @@ -58,13 +59,50 @@ output:
type: directory
description: Qualimap results dir
pattern: "*/*"
versions_qualimap:
- - ${task.process}:
type: string
description: The name of the process
- qualimap:
type: string
description: The name of the tool
- qualimap -h | sed -n 's/^QualiMap v.//p':
type: eval
description: The expression to obtain the version of the tool

versions_samtools:
- - ${task.process}:
type: string
description: The name of the process
- samtools:
type: string
description: The name of the tool
- samtools version | sed '1!d;s/.* //':
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
- qualimap:
type: string
description: The name of the tool
- qualimap -h | sed -n 's/^QualiMap v.//p':
type: eval
description: The expression to obtain the version of the tool

- - ${task.process}:
type: string
description: The name of the process
- samtools:
type: string
description: The name of the tool
- samtools version | sed '1!d;s/.* //':
type: eval
description: The expression to obtain the version of the tool

authors:
- "@FriederikeHanssen"
maintainers:
Expand Down
Loading
Loading