annotate 0.7.0/modules/fastqc/main.nf @ 20:133571bf891f

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