annotate 0.4.0/modules/fastqc/main.nf @ 101:ce6d9548fe89

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