annotate 0.6.1/modules/fastqc/main.nf @ 16:b90e5a7a3d4f

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