annotate 0.4.0/modules/multiqc/main.nf @ 101:ce6d9548fe89

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