trimming_single.nf 505 Bytes
Newer Older
1
2
3
4
5
log.info "fastq files : ${params.fastq}"

Channel
  .fromPath( params.fastq )
  .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
6
  .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
7
8
9
  .set { fastq_files }

process trimming {
10
  tag "$file_id"
11
12

  input:
13
  set file_id, file(reads) from fastq_files
14
15

  output:
16
  set file_id, "*_trim.fastq.gz" into fastq_files_cut
17
18
19
20

  script:
  """
  cutadapt -q 20,20 \
21
22
  -o ${file_id}_trim.fastq.gz \
  ${reads} > ${file_id}_report.txt
23
24
25
  """
}