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