annotate 0.6.1/modules/multiqc/main.nf @ 11:749faef1caa9

"planemo upload"
author kkonganti
date Tue, 05 Sep 2023 11:51:40 -0400
parents
children
rev   line source
kkonganti@11 1 process MULTIQC {
kkonganti@11 2 label 'process_micro'
kkonganti@11 3 tag 'MultiQC'
kkonganti@11 4
kkonganti@11 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}multiqc${params.fs}1.14" : null)
kkonganti@11 6 conda (params.enable_conda ? 'bioconda::multiqc=1.14 conda-forge::spectra conda-forge::lzstring' : null)
kkonganti@11 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@11 8 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' :
kkonganti@11 9 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }"
kkonganti@11 10
kkonganti@11 11 input:
kkonganti@11 12 path multiqc_files
kkonganti@11 13
kkonganti@11 14 output:
kkonganti@11 15 path "*multiqc*"
kkonganti@11 16 path "*multiqc_report.html", emit: report
kkonganti@11 17 path "*_data" , emit: data
kkonganti@11 18 path "*_plots" , emit: plots, optional: true
kkonganti@11 19 path "versions.yml" , emit: versions
kkonganti@11 20
kkonganti@11 21 when:
kkonganti@11 22 task.ext.when == null || task.ext.when
kkonganti@11 23
kkonganti@11 24 script:
kkonganti@11 25 def args = task.ext.args ?: ''
kkonganti@11 26 """
kkonganti@11 27 cp ${params.projectconf}${params.fs}multiqc${params.fs}${params.pipeline}_mqc.yml cpipes_mqc_config.yml
kkonganti@11 28 sed -i -e 's/Workflow_Name_Placeholder/${params.pipeline}/g; s/Workflow_Version_Placeholder/${params.workflow_version}/g' cpipes_mqc_config.yml
kkonganti@11 29 sed -i -e 's/CPIPES_Version_Placeholder/${workflow.manifest.version}/g; s%Workflow_Output_Placeholder%${params.output}%g' cpipes_mqc_config.yml
kkonganti@11 30 sed -i -e 's%Workflow_Input_Placeholder%${params.input}%g' cpipes_mqc_config.yml
kkonganti@11 31
kkonganti@11 32 multiqc --interactive -c cpipes_mqc_config.yml -f $args .
kkonganti@11 33
kkonganti@11 34 cat <<-END_VERSIONS > versions.yml
kkonganti@11 35 "${task.process}":
kkonganti@11 36 multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
kkonganti@11 37 END_VERSIONS
kkonganti@11 38
kkonganti@11 39 sedver=""
kkonganti@11 40
kkonganti@11 41 if [ "${workflow.containerEngine}" != "null" ]; then
kkonganti@11 42 sedver=\$( sed --help 2>&1 | sed -e '1!d; s/ (.*\$//' )
kkonganti@11 43 else
kkonganti@11 44 sedver=\$( echo \$(sed --version 2>&1) | sed 's/^.*(GNU sed) //; s/ Copyright.*\$//' )
kkonganti@11 45 fi
kkonganti@11 46
kkonganti@11 47 cat <<-END_VERSIONS >> versions.yml
kkonganti@11 48 sed: \$sedver
kkonganti@11 49 END_VERSIONS
kkonganti@11 50 """
kkonganti@11 51 }