This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qc.nf
84 lines (64 loc) · 1.77 KB
/
qc.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env nextflow
nextflow.preview.dsl=2
/* ############################################################################
* Default parameter values.
* ############################################################################
*/
params.sequences = 'sequences'
params.outdir = 'results'
/* ############################################################################
* Define workflow processes.
* ############################################################################
*/
process fastp {
publishDir "${params.outdir}", mode:'link'
input:
tuple val(sample), path(first_fastq), path(second_fastq)
output:
path "${sample}_fastp.json", emit: data
path "${sample}_fastp.html", emit: report
"""
fastp --in1 ${first_fastq} \
--in2 ${second_fastq} \
--json ${sample}_fastp.json \
--html ${sample}_fastp.html \
--report_title '${sample} fastp Report'
"""
}
process fastqc {
publishDir "${params.outdir}", mode:'link'
input:
path fastq
output:
path "${fastq.getSimpleName()}_fastqc.zip", emit: data
path "${fastq.getSimpleName()}_fastqc.html", emit: report
"""
fastqc ${fastq}
"""
}
process multiqc {
publishDir "${params.outdir}", mode:'link'
input:
path '*'
output:
path 'multiqc_data', emit: data
path 'multiqc_report.html', emit: report
"""
multiqc .
"""
}
/* ############################################################################
* Define named workflows to be included elsewhere.
* ############################################################################
*/
workflow qc {
take:
fastq_triples
fastq_singles
main:
fastp(fastq_triples)
fastqc(fastq_singles)
multiqc(fastp.out.data.mix(fastp.out.report, fastqc.out.data, fastqc.out.report).collect())
emit:
multiqc.out.report
}