Apply suggestions from code review by @drpatelh

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
Abhinav Sharma 2020-12-08 18:57:14 +05:30 committed by GitHub
parent 5949bfc15b
commit b56a0322ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 16 deletions

View file

@ -5,28 +5,28 @@ params.options = [:]
def options = initOptions(params.options)
process MULTIQC {
tag "multiqc"
label 'process_medium'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename: filename, options: params.options, publish_dir: getSoftwareName(task.process), publish_id: '') }
conda(params.enable_conda ? "bioconda::multiqc=1.9" : null)
conda (params.enable_conda ? "bioconda::multiqc=1.9" : null)
container "quay.io/biocontainers/multiqc:1.9--pyh9f0ad1d_0"
input:
path multiqc_config
path multiqc_custom_config
path('fastqc/*')
path multiqc_files
output:
path "*multiqc_report.html", emit: report
path "*_data", emit: data
path "*_plots", optional: true, emit: plots
path "*_data" , emit: data
path "*_plots" , optional:true, emit: plots
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
def custom_config = params.multiqc_config ? "--config $multiqc_custom_config" : ''
"""
multiqc -f $options.args $custom_config .
multiqc --version | sed -e "s/multiqc, version //g" > ${software}.version.txt
"""
}

View file

@ -28,16 +28,16 @@ params:
Run the module with Conda using the software specified
via the `conda` directive
input:
- generic_report:
- multiqc_files:
type: file
description: |
List of report, for example the html and zip output of FastQC
List of reports / files recognised by MultiQC, for example the html and zip output of FastQC
output:
- dir:
- data:
type: dir
description: MultiQC data dir
pattern: "multiqc_data"
- html:
- report:
type: file
description: MultiQC report file
pattern: "multiqc_report.html"

View file

@ -31,6 +31,6 @@ workflow test_paired_end {
emit:
html = FASTQC_PE.out.html
zip = FASTQC_PE.out.zip
zip = FASTQC_PE.out.zip
}

View file

@ -6,15 +6,13 @@ include { MULTIQC } from '../../../software/multiqc/main.nf' addParams(options:
include { test_paired_end } from '../fastqc/main.nf' addParams(options: [publish_dir: 'test_paired_end'])
ch_multiqc_config = file("$launchDir/tests/software/multiqc/multiqc_config.yml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty()
workflow test_multiqc {
test_paired_end()
input = [
ch_multiqc_config,
ch_multiqc_custom_config.collect().ifEmpty([]),
test_paired_end.out.zip.collect { it[1] }.ifEmpty([])
ch_multiqc_config
.mix(test_paired_end.out.zip.collect { it[1] }.ifEmpty([]))
]
MULTIQC(*input)