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

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