Skip to content
Snippets Groups Projects
main.nf 758 B
Newer Older
version = "0.11.5"
container_url = "lbmc/fastqc:${version}"

params.fastqc_fastq = ""
process fastqc_fastq {
  container = "${container_url}"
  label "big_mem_mono_cpus"
  tag "$file_id"
  if (params.fastqc_fastq_out != "") {
    publishDir "results/${params.fastqc_fastq_out}", mode: 'copy'
  }

  input:
  tuple val(file_id), path(reads)

  output:
  tuple val(file_id), path("*.{zip,html}"), emit: report
  if (reads.size() == 2)
  """
  fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ \
    ${params.fastqc_fastq} \
    ${reads[0]} ${reads[1]}
  """
  else if (reads.size() == 1)
  """
    fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ ${params.fastqc_fastq} ${reads[0]}
  """
}