forked from epi2me-labs/wf-amplicon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
160 lines (154 loc) · 6.21 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
# 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",
"filter-all",
"de-novo",
"ref-no-reads",
"ref-single-read",
"de-novo-no-reads",
"de-novo-single-read",
]
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
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs
- 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
--reads_downsampling_size 2000
--combine_results
NF_PROCESS_FILES: >
main.nf
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,concatTSVs
- 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
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs
- if: $MATRIX_NAME == "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
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,alignReads,bamstats,concatMosdepthResultFiles,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,mosdepth,subsetRefFile,concatTSVs
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
--drop_frac_longest_reads 0.05
NF_PROCESS_FILES: >
main.nf
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,racon
- 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
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,subsetRefFile,concatTSVs
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
modules/local/variant-calling.nf
NF_IGNORE_PROCESSES: downsampleBAMforMedaka,downsampleReads,subsetReads,medakaConsensus,medakaVariant,mergeBAMs,mergeVCFs,subsetRefFile,concatTSVs
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
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,medakaConsensus,miniasm,mosdepthPerBase,mosdepthWindows,racon,spoa,trimAndQC
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
modules/local/de-novo.nf
NF_IGNORE_PROCESSES: downsampleReads,subsetReads,subsetRefFile,concatTSVs,medakaConsensus,miniasm,mosdepthPerBase,mosdepthWindows,racon,spoa,trimAndQC
AFTER_NEXTFLOW_CMD: "grep 'only a limited report is available' $$PWD/$$CI_PROJECT_NAME/*html"