Skip to content
Snippets Groups Projects
Select Git revision
  • e3de37bcd7a2d1798bb5c98ca45bbe430982a6c8
  • 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

fastp_paired.nf

Blame
  • Laurent Modolo's avatar
    0d0e5587
    History
    fastp_paired.nf 786 B
    params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
    
    log.info "fastq files : ${params.fastq}"
    
    Channel
      .fromFilePairs( params.fastq )
      .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
      .set { fastq_files }
    
    process fastp_fastq {
      tag "$pair_id"
      publishDir "results/fastq/fastp/", mode: 'copy'
    
      input:
      set pair_id, file(reads) from fastq_files
    
      output:
        file "*.{zip,html}" into fastp_report
        set pair_id, file "*.fastq.gz" fastq_trim_files
    
      script:
    """
    fastp --thread ${task.cpus} \
    --qualified_quality_phred 20 \
    --disable_length_filtering \
    --detect_adapter_for_pe \
    --in1 ${reads[0]} \
    --in2 ${reads[1]} \
    --out1 ${pair_id}_R1_trim.fastq.gz \
    --out2 ${pair_id}_R2_trim.fastq.gz \
    --html ${pair_id}.html \
    --report_title ${pair_id}
    """
    }