annotate 0.2.1/modules/fastqc/main.nf @ 87:34d411a7bd4f

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