comparison 0.5.0/modules/fastqc/main.nf @ 1:365849f031fd

"planemo upload"
author kkonganti
date Mon, 05 Jun 2023 18:48:51 -0400
parents
children
comparison
equal deleted inserted replaced
0:a4b1ee4b68b1 1:365849f031fd
1 process FASTQC {
2 tag "$meta.id"
3 label 'process_low'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}fastqc${params.fs}0.11.9" : null)
6 conda (params.enable_conda ? "conda-forge::perl bioconda::fastqc=0.11.9" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :
9 'quay.io/biocontainers/fastqc:0.11.9--0' }"
10
11 input:
12 tuple val(meta), path(reads)
13
14 output:
15 tuple val(meta), path("*.html"), emit: html
16 tuple val(meta), path("*.zip") , emit: zip
17 path "versions.yml" , emit: versions
18
19 when:
20 task.ext.when == null || task.ext.when
21
22 script:
23 def args = task.ext.args ?: ''
24 // Add soft-links to original FastQs for consistent naming in pipeline
25 def prefix = task.ext.prefix ?: "${meta.id}"
26 if (meta.single_end) {
27 """
28 [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
29 fastqc $args --threads $task.cpus ${prefix}.fastq.gz
30
31 cat <<-END_VERSIONS > versions.yml
32 "${task.process}":
33 fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
34 END_VERSIONS
35 """
36 } else {
37 """
38 [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
39 [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
40 fastqc $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
41
42 cat <<-END_VERSIONS > versions.yml
43 "${task.process}":
44 fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
45 END_VERSIONS
46 """
47 }
48 }