annotate 0.3.0/modules/multiqc/main.nf @ 97:8d7f482c64de

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