annotate 0.3.0/modules/fastqc/main.nf @ 92:295c2597a475

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