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