annotate 0.7.0/modules/multiqc/main.nf @ 17:0e7a0053e4a6

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