mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Apply suggestions from code review by @drpatelh
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
5949bfc15b
commit
b56a0322ab
4 changed files with 14 additions and 16 deletions
|
@ -5,7 +5,6 @@ params.options = [:]
|
|||
def options = initOptions(params.options)
|
||||
|
||||
process MULTIQC {
|
||||
tag "multiqc"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
|
@ -15,18 +14,19 @@ process MULTIQC {
|
|||
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 "*.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
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue