Update MULTIQC for an additional custom config (#2063)

* Update main.nf

* Update meta.yml

* Re-add logos as not staged in a way that works with MultiQC config files

* Add support for secondary custom configs
This commit is contained in:
James A. Fellows Yates 2022-09-15 13:53:15 +02:00 committed by GitHub
parent 8572bc8865
commit 4b1d4bf401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View file

@ -9,6 +9,7 @@ process MULTIQC {
input: input:
path multiqc_files, stageAs: "?/*" path multiqc_files, stageAs: "?/*"
path(multiqc_config) path(multiqc_config)
path(extra_multiqc_config)
path(multiqc_logo) path(multiqc_logo)
output: output:
@ -23,11 +24,13 @@ process MULTIQC {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def config = multiqc_config ? "--config $multiqc_config" : '' def config = multiqc_config ? "--config $multiqc_config" : ''
def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : ''
""" """
multiqc \\ multiqc \\
--force \\ --force \\
$config \\
$args \\ $args \\
$config \\
$extra_config \\
. .
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml

View file

@ -22,6 +22,10 @@ input:
type: file type: file
description: Optional config yml for MultiQC description: Optional config yml for MultiQC
pattern: "*.{yml,yaml}" pattern: "*.{yml,yaml}"
- extra_multiqc_config:
type: file
description: Second optional config yml for MultiQC. Will override common sections in multiqc_config.
pattern: "*.{yml,yaml}"
- multiqc_logo: - multiqc_logo:
type: file type: file
description: Optional logo file for MultiQC description: Optional logo file for MultiQC

View file

@ -13,7 +13,7 @@ workflow test_multiqc {
] ]
FASTQC ( input ) FASTQC ( input )
MULTIQC ( FASTQC.out.zip.collect { it[1] }, [], [] ) MULTIQC ( FASTQC.out.zip.collect { it[1] }, [], [], [] )
} }
workflow test_multiqc_fn_collision { workflow test_multiqc_fn_collision {
@ -29,7 +29,7 @@ workflow test_multiqc_fn_collision {
FASTQC2 ( fqc_input ) FASTQC2 ( fqc_input )
mqc_input = mqc_input.mix(FASTQC2.out.zip.collect { it[1] }) mqc_input = mqc_input.mix(FASTQC2.out.zip.collect { it[1] })
MULTIQC ( mqc_input, [], [] ) MULTIQC ( mqc_input, [], [], [] )
} }
workflow test_multiqc_config { workflow test_multiqc_config {
@ -41,5 +41,5 @@ workflow test_multiqc_config {
mqc_input = Channel.empty() mqc_input = Channel.empty()
FASTQC ( input ) FASTQC ( input )
MULTIQC ( FASTQC.out.zip.collect { it[1] }, mqc_config, [] ) MULTIQC ( FASTQC.out.zip.collect { it[1] }, mqc_config, [], [] )
} }