-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
274 lines (266 loc) · 11.5 KB
/
.gitlab-ci.yml
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# Include shared CI
include:
- project: "epi2melabs/ci-templates"
file: "wf-containers.yaml"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq
--reference test_data/reference.fasta
--threads 2
--combine_results
AFTER_NEXTFLOW_CMD: |
! grep 'No reads left after pre-processing' .nextflow.log &&
! grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html
CI_FLAVOUR: "new"
docker-run:
tags: []
# Define a 1D job matrix to inject a variable named MATRIX_NAME into
# the CI environment, we can use the value of MATRIX_NAME to determine
# which options to apply as part of the rules block below
# NOTE There is a slightly cleaner way to define this matrix to include
# the variables, but it is broken when using long strings! See CW-756
parallel:
matrix:
- MATRIX_NAME:
[
"ref",
"ref-sample_sheet",
"ref-with-spaces",
"ref-filter-all",
"de-novo",
"de-novo-spoa-max-len-2000", # CW-3864
"de-novo-filter-all", # CW-4520
"ref-no-reads",
"ref-single-read",
"de-novo-no-reads",
"de-novo-single-read",
"ref-mergeVCFs-single-barcode", # CW-3611
"ref-no-basecall-model",
"ref-override-basecaller-cfg",
"de-novo-no-basecall-model",
"de-novo-override-basecaller-cfg",
]
rules:
# NOTE As we're overriding the rules block for the included docker-run
# we must redefine this CI_COMMIT_BRANCH rule to prevent docker-run
# being incorrectly scheduled for "detached merge request pipelines" etc.
- if: ($CI_COMMIT_BRANCH == null || $CI_COMMIT_BRANCH == "dev-template")
when: never
- if: $MATRIX_NAME == "ref"
variables:
# use default workflow opts defined above
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
- if: $MATRIX_NAME == "ref-sample_sheet"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq
--reference test_data/reference.fasta
--sample_sheet test_data/sample_sheet.csv
--threads 2
--combine_results
--igv
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,concatTSVs,catFastqIntoFasta
- if: $MATRIX_NAME == "ref-with-spaces"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq
--reference 'test_data/ref with (parens) and spaces.fa'
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
- if: $MATRIX_NAME == "ref-filter-all"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq
--reference test_data/reference.fasta
--min_read_qual 20
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,alignReads,bamstats,concatMosdepthResultFiles,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,mosdepth,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
AFTER_NEXTFLOW_CMD: |
grep 'No reads left after pre-processing' .nextflow.log &&
grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html
- if: $MATRIX_NAME == "de-novo"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-denovo
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,racon,configure_igv
# make sure we got outputs for both barcodes
AFTER_NEXTFLOW_CMD: |
ls -p $$CI_PROJECT_NAME | grep -q barcode01/ &&
ls -p $$CI_PROJECT_NAME | grep -q barcode02/
- if: $MATRIX_NAME == "de-novo-spoa-max-len-2000"
variables:
# we run with a higher `--force_spoa_length_threshold` so that the SPOA
# process is attempted on both barcodes, but due to
# `--spoa_max_allowed_read_length 2000` SPOA actually won't be run on
# barcode02 and there won't be a consensus for it
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-denovo
--force_spoa_length_threshold 6000
--spoa_max_allowed_read_length 2000
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,racon,configure_igv
# make sure we only got outputs for barcode01
AFTER_NEXTFLOW_CMD: |
ls -p $$CI_PROJECT_NAME | grep -q barcode01/ &&
ls -p $$CI_PROJECT_NAME | grep -vq barcode02/
- if: $MATRIX_NAME == "de-novo-filter-all"
# this tests that no de-novo QC section was added to the report when there
# were no reads left after filtering
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-denovo
--max_read_length 1
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: catFastqIntoFasta,concatTSVs,configure_igv,downsampleReads,medakaStitch,miniasm,mosdepthPerBase,mosdepthWindows,racon,spoa,trimAndQC,publish
AFTER_NEXTFLOW_CMD: "! grep 'Quality Control' $$PWD/$$CI_PROJECT_NAME/*html"
- if: $MATRIX_NAME == "ref-no-reads"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-no-reads
--reference test_data/reference.fasta
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
AFTER_NEXTFLOW_CMD: |
grep 'No reads left after pre-processing' .nextflow.log &&
grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html
- if: $MATRIX_NAME == "ref-single-read"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-single-read
--reference test_data/reference.fasta
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
AFTER_NEXTFLOW_CMD: grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html
- if: $MATRIX_NAME == "de-novo-no-reads"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-no-reads
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,medakaConsensus,medakaStitch,miniasm,mosdepthPerBase,mosdepthWindows,racon,spoa,trimAndQC,catFastqIntoFasta,configure_igv,publish
AFTER_NEXTFLOW_CMD: |
grep 'No reads left after pre-processing' .nextflow.log &&
grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html
- if: $MATRIX_NAME == "de-novo-single-read"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-single-read
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,medakaConsensus,medakaStitch,miniasm,mosdepthPerBase,mosdepthWindows,racon,spoa,trimAndQC,catFastqIntoFasta,configure_igv,publish
AFTER_NEXTFLOW_CMD: "grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html"
- if: $MATRIX_NAME == "ref-mergeVCFs-single-barcode"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq/barcode01
--reference test_data/reference.fasta
--threads 2
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
- if: $MATRIX_NAME == "ref-no-basecall-model"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-no-basecall-model
--reference test_data/reference.fasta
NF_IGNORE_PROCESSES: catFastqIntoFasta,concatTSVs,downsampleReads
ASSERT_NEXTFLOW_FAILURE: 1
ASSERT_NEXTFLOW_FAILURE_REXP: Found no basecall model information in the input data for sample .*\. Please provide it with the `--override_basecaller_cfg` parameter.
- if: $MATRIX_NAME == "ref-override-basecaller-cfg"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq
--reference test_data/reference.fasta
--override_basecaller_cfg [email protected]
--combine_results
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetRefFile,concatTSVs,catFastqIntoFasta,configure_igv
AFTER_NEXTFLOW_CMD: grep "Overriding basecall model with '[email protected]'." .nextflow.log
- if: $MATRIX_NAME == "de-novo-no-basecall-model"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-denovo-no-basecall-model
NF_IGNORE_PROCESSES: downsampleReads
ASSERT_NEXTFLOW_FAILURE: 1
ASSERT_NEXTFLOW_FAILURE_REXP: Found no basecall model information in the input data for sample .*\. Please provide it with the `--override_basecaller_cfg` parameter.
- if: $MATRIX_NAME == "de-novo-override-basecaller-cfg"
variables:
NF_WORKFLOW_OPTS: >
-executor.\$$local.memory 16GB
--fastq test_data/fastq-denovo-no-basecall-model
--override_basecaller_cfg [email protected]
--combine_results
--igv
NF_PROCESS_FILES: >
main.nf
lib/common.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,racon
AFTER_NEXTFLOW_CMD: grep "Overriding basecall model with '[email protected]'." .nextflow.log