Skip to content
Snippets Groups Projects
Select Git revision
  • 8e1543d2fb5ccfa48147145b799c198472f46683
  • master default protected
  • dev
  • v2.0.0
  • v0.4.0
  • v0.3.0
  • v0.2.9
  • v0.2.8
  • v0.2.7
  • v0.2.6
  • v0.1.0
  • v0.2.5
  • v0.2.4
  • v0.2.3
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.2
18 results

multiqc_single.nf

Blame
  • Laurent Modolo's avatar
    231fd9e6
    History
    multiqc_single.nf 841 B
    params.fastq = "$baseDir/data/fastq/*.fastq"
    
    log.info "fastq files : ${params.fastq}"
    
    Channel
      .fromPath( params.fastq )
      .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
      .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
      .set { fastq_files }
    
    process fastqc_fastq {
      tag "$file_id"
      publishDir "results/fastq/fastqc/", mode: 'copy'
      cpus = 1
    
      input:
        set file_id, file(reads) from fastq_files
    
      output:
        file "*.{zip,html}" into fastqc_report
    
      script:
    """
    fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ ${reads}
    """
    }
    
    process multiqc {
      tag "$report[0].baseName"
      publishDir "results/fastq/multiqc/", mode: 'copy'
      cpus = 1
    
      input:
        file report from fastqc_report.collect()
    
      output:
        file "*multiqc_*" into multiqc_report
    
      script:
    """
    multiqc -f .
    """
    }