-
Notifications
You must be signed in to change notification settings - Fork 145
/
main.nf.test
224 lines (210 loc) · 15.4 KB
/
main.nf.test
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
nextflow_pipeline {
name "Test Workflow main.nf"
script "main.nf"
tag "bismark"
tag "pipeline"
test("Bismark Single-End") {
when {
params {
aligner = "bismark"
save_reference = true
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
{ assert snapshot(path("$outputDir/bismark/deduplicated/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bam"),
path("$outputDir/bismark/deduplicated/SRR389222_trimmed_bismark_bt2.deduplicated.bam"),
path("$outputDir/bismark/methylation_calls/bedGraph/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_trimmed_bismark_bt2.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/mbias/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_trimmed_bismark_bt2.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_calls/").list(),
path("$outputDir/bismark/methylation_calls/splitting_report/Ecoli_1_val_1_bismark_bt2_pe.deduplicated_splitting_report.txt"),
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_trimmed_bismark_bt2.deduplicated_splitting_report.txt"),
path("$outputDir/bismark/reference_genome/BismarkIndex/").list(),
path("$outputDir/qualimap/Ecoli/genome_results.txt"),
path("$outputDir/qualimap/SRR389222/genome_results.txt")).match("single_end") },
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") },
{ assert new File("$outputDir/bismark/alignments/logs/Ecoli_1_val_1_bismark_bt2_PE_report.txt").exists() },
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_trimmed_bismark_bt2_SE_report.txt").exists() },
{ assert new File("$outputDir/bismark/reports/Ecoli_1_val_1_bismark_bt2_PE_report.html").exists() },
{ assert new File("$outputDir/bismark/reports/SRR389222_trimmed_bismark_bt2_SE_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.txt").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_1_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_2_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/SRR389222_fastqc.html").exists() },
{ assert new File("$outputDir/multiqc/bismark/multiqc_report.html").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_1.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_2.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/SRR389222.fastq.gz_trimming_report.txt").exists() }
)
}
}
test("Bismark Single-End With Index") {
when {
params {
aligner = "bismark"
bismark_index = "https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz"
cytosine_report = true
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
)
}
}
test("Bismark Single-End With RRBS") {
when {
params {
aligner = "bismark"
skip_trimming = true
save_reference = true
rrbs = true
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
{ assert snapshot(path("$outputDir/bismark/alignments/Ecoli_10K_methylated_R1_bismark_bt2_pe.bam"),
path("$outputDir/bismark/alignments/SRR389222.merged_bismark_bt2.bam"),
path("$outputDir/bismark/methylation_calls/bedGraph/Ecoli_10K_methylated_R1_bismark_bt2_pe.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222.merged_bismark_bt2.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/mbias/Ecoli_10K_methylated_R1_bismark_bt2_pe.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/mbias/SRR389222.merged_bismark_bt2.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/Ecoli_10K_methylated_R1_bismark_bt2_pe.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222.merged_bismark_bt2.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_calls/").list(),
path("$outputDir/bismark/methylation_calls/splitting_report/Ecoli_10K_methylated_R1_bismark_bt2_pe_splitting_report.txt"),
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222.merged_bismark_bt2_splitting_report.txt"),
path("$outputDir/bismark/reference_genome/BismarkIndex/").list(),
path("$outputDir/qualimap/Ecoli/genome_results.txt"),
path("$outputDir/qualimap/SRR389222/genome_results.txt")).match("single_end_rrbs") },
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_rrbs_software_versions") },
{ assert new File("$outputDir/bismark/alignments/logs/Ecoli_10K_methylated_R1_bismark_bt2_PE_report.txt").exists() },
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222.merged_bismark_bt2_SE_report.txt").exists() },
{ assert new File("$outputDir/bismark/reports/Ecoli_10K_methylated_R1_bismark_bt2_PE_report.html").exists() },
{ assert new File("$outputDir/bismark/reports/SRR389222.merged_bismark_bt2_SE_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.txt").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_1_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_2_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/SRR389222_fastqc.html").exists() },
{ assert new File("$outputDir/multiqc/bismark/multiqc_report.html").exists() }
)
}
}
test("Bismark Single-End With RRBS With Index") {
when {
params {
aligner = "bismark"
skip_trimming = true
rrbs = true
bismark_index = "https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz"
cytosine_report = true
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
)
}
}
test("Bismark Single-End NOMe-seq") {
when {
params {
aligner = "bismark"
nomeseq = true
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
{ assert snapshot(path("$outputDir/bismark/coverage2cytosine/coverage/Ecoli.NOMe.CpG.cov.gz"),
path("$outputDir/bismark/coverage2cytosine/coverage/Ecoli.NOMe.GpC.cov.gz"),
path("$outputDir/bismark/coverage2cytosine/coverage/SRR389222.NOMe.CpG.cov.gz"),
path("$outputDir/bismark/coverage2cytosine/coverage/SRR389222.NOMe.GpC.cov.gz"),
path("$outputDir/bismark/deduplicated/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bam"),
path("$outputDir/bismark/deduplicated/SRR389222_trimmed_bismark_bt2.deduplicated.bam"),
path("$outputDir/bismark/methylation_calls/bedGraph/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_trimmed_bismark_bt2.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/mbias/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_trimmed_bismark_bt2.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_calls/").list(),
path("$outputDir/bismark/methylation_calls/splitting_report/Ecoli_1_val_1_bismark_bt2_pe.deduplicated_splitting_report.txt"),
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_trimmed_bismark_bt2.deduplicated_splitting_report.txt"),
path("$outputDir/cat/SRR389222.merged.fastq.gz"),
path("$outputDir/qualimap/Ecoli/genome_results.txt"),
path("$outputDir/qualimap/SRR389222/genome_results.txt")).match("single_end_nomeseq") },
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_nomeseq_software_versions") },
{ assert new File("$outputDir/bismark/alignments/logs/Ecoli_1_val_1_bismark_bt2_PE_report.txt").exists() },
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_trimmed_bismark_bt2_SE_report.txt").exists() },
{ assert new File("$outputDir/bismark/reports/Ecoli_1_val_1_bismark_bt2_PE_report.html").exists() },
{ assert new File("$outputDir/bismark/reports/SRR389222_trimmed_bismark_bt2_SE_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.txt").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_1_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_2_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/SRR389222_fastqc.html").exists() },
{ assert new File("$outputDir/multiqc/bismark/multiqc_report.html").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_1.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_2.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/SRR389222.fastq.gz_trimming_report.txt").exists() }
)
}
}
test("Bismark Clip R1 - 2") {
when {
params {
aligner = "bismark"
em_seq = true
clip_r1 = 2
outdir = "$outputDir"
}
}
then {
assertAll(
{ assert workflow.success },
{ assert snapshot(path("$outputDir/bismark/deduplicated/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bam"),
path("$outputDir/bismark/deduplicated/SRR389222_trimmed_bismark_bt2.deduplicated.bam"),
path("$outputDir/bismark/methylation_calls/bedGraph/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_trimmed_bismark_bt2.deduplicated.bedGraph.gz"),
path("$outputDir/bismark/methylation_calls/mbias/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_trimmed_bismark_bt2.deduplicated.M-bias.txt"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"),
path("$outputDir/bismark/methylation_calls/methylation_calls/").list(),
path("$outputDir/bismark/methylation_calls/splitting_report/Ecoli_1_val_1_bismark_bt2_pe.deduplicated_splitting_report.txt"),
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_trimmed_bismark_bt2.deduplicated_splitting_report.txt"),
path("$outputDir/cat/SRR389222.merged.fastq.gz"),
path("$outputDir/qualimap/Ecoli/genome_results.txt"),
path("$outputDir/qualimap/SRR389222/genome_results.txt")).match("clip_r1") },
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("clip_r1_software_versions") },
{ assert new File("$outputDir/bismark/alignments/logs/Ecoli_1_val_1_bismark_bt2_PE_report.txt").exists() },
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_trimmed_bismark_bt2_SE_report.txt").exists() },
{ assert new File("$outputDir/bismark/reports/Ecoli_1_val_1_bismark_bt2_PE_report.html").exists() },
{ assert new File("$outputDir/bismark/reports/SRR389222_trimmed_bismark_bt2_SE_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.html").exists() },
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.txt").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_1_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/Ecoli_2_fastqc.html").exists() },
{ assert new File("$outputDir/fastqc/SRR389222_fastqc.html").exists() },
{ assert new File("$outputDir/multiqc/bismark/multiqc_report.html").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_1.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/Ecoli_2.fastq.gz_trimming_report.txt").exists() },
{ assert new File("$outputDir/trimgalore/logs/SRR389222.fastq.gz_trimming_report.txt").exists() }
)
}
}
}