kkonganti@11: process MULTIQC { kkonganti@11: label 'process_micro' kkonganti@11: tag 'MultiQC' kkonganti@11: kkonganti@11: module (params.enable_module ? "${params.swmodulepath}${params.fs}multiqc${params.fs}1.14" : null) kkonganti@11: conda (params.enable_conda ? 'bioconda::multiqc=1.14 conda-forge::spectra conda-forge::lzstring' : null) kkonganti@11: container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? kkonganti@11: 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : kkonganti@11: 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" kkonganti@11: kkonganti@11: input: kkonganti@11: path multiqc_files kkonganti@11: kkonganti@11: output: kkonganti@11: path "*multiqc*" kkonganti@11: path "*multiqc_report.html", emit: report kkonganti@11: path "*_data" , emit: data kkonganti@11: path "*_plots" , emit: plots, optional: true kkonganti@11: path "versions.yml" , emit: versions kkonganti@11: kkonganti@11: when: kkonganti@11: task.ext.when == null || task.ext.when kkonganti@11: kkonganti@11: script: kkonganti@11: def args = task.ext.args ?: '' kkonganti@11: """ kkonganti@11: cp ${params.projectconf}${params.fs}multiqc${params.fs}${params.pipeline}_mqc.yml cpipes_mqc_config.yml kkonganti@11: sed -i -e 's/Workflow_Name_Placeholder/${params.pipeline}/g; s/Workflow_Version_Placeholder/${params.workflow_version}/g' cpipes_mqc_config.yml kkonganti@11: sed -i -e 's/CPIPES_Version_Placeholder/${workflow.manifest.version}/g; s%Workflow_Output_Placeholder%${params.output}%g' cpipes_mqc_config.yml kkonganti@11: sed -i -e 's%Workflow_Input_Placeholder%${params.input}%g' cpipes_mqc_config.yml kkonganti@11: kkonganti@11: multiqc --interactive -c cpipes_mqc_config.yml -f $args . kkonganti@11: kkonganti@11: cat <<-END_VERSIONS > versions.yml kkonganti@11: "${task.process}": kkonganti@11: multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) kkonganti@11: END_VERSIONS kkonganti@11: kkonganti@11: sedver="" kkonganti@11: kkonganti@11: if [ "${workflow.containerEngine}" != "null" ]; then kkonganti@11: sedver=\$( sed --help 2>&1 | sed -e '1!d; s/ (.*\$//' ) kkonganti@11: else kkonganti@11: sedver=\$( echo \$(sed --version 2>&1) | sed 's/^.*(GNU sed) //; s/ Copyright.*\$//' ) kkonganti@11: fi kkonganti@11: kkonganti@11: cat <<-END_VERSIONS >> versions.yml kkonganti@11: sed: \$sedver kkonganti@11: END_VERSIONS kkonganti@11: """ kkonganti@11: }