Newer
Older
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
// multiqc generate nice html report combining lots of differents bioinformatics
// tools report.
//
// EXAMPLE:
/*
include { multiqc }
from './nf_modules/multiqc/main'
addParams(
multiqc_out: "QC/"
)
multiqc(
report_a
.mix(
report_b,
report_c,
report_d
container_url = "lbmc/multiqc:${version}"
params.multiqc = ""
workflow multiqc {
take:
report
main:
if (it instanceof List){
if(it.size() > 1) {
it[1]
} else {
it[0]
}
} else {
it
}
}
.unique()
.set { report_cleaned }
multiqc_default(report_cleaned.collect())
emit:
report = multiqc_default.out.report
}
container = "${container_url}"
label "big_mem_mono_cpus"
Laurent Modolo
committed
if (params.multiqc_out != "") {
publishDir "results/${params.multiqc_out}", mode: 'copy'
}
Laurent Modolo
committed
path report
output:
path "*multiqc_*", emit: report
script:
"""
multiqc ${params.multiqc} -f .