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