generated from opensafely/research-template
/
project.yaml
331 lines (282 loc) · 10 KB
/
project.yaml
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
version: '3.0'
expectations:
population_size: 100000
actions:
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## DO NOT EDIT project.yaml or study_definition_1-6.py DIRECTLY
## These files are created by create-project.R
## Edit and run create-project.R to update the project.yaml
## Edit study_definition_k.py and run create-project.R to update
## study_definition_1-6.py
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## ####################################
## study definition
## ####################################
## generate dummy data for study_definition
dummy_data_vax:
run: r:latest analysis/dummy_data_vax.R
outputs:
moderately_sensitive:
dummy_data: analysis/dummy_data_vax.feather
## study definition
generate_study_population:
run: cohortextractor:latest generate_cohort --study-definition study_definition_vax
--output-format feather
dummy_data_file: analysis/dummy_data_vax.feather
needs:
- dummy_data_vax
outputs:
highly_sensitive:
cohort: output/input_vax.feather
## ####################################
## preprocessing
## ####################################
## process data from study_definition
data_input_process:
run: r:latest analysis/preprocess/data_input_process.R
needs:
- dummy_data_vax
- generate_study_population
outputs:
highly_sensitive:
data_wide_vax_dates: output/data/data_wide_vax_dates.rds
data_processed: output/data/data_processed.rds
moderately_sensitive:
data_properties: output/tables/data_*_tabulate.txt
## apply eligiblity criteria from boxes a and b
data_eligible_ab:
run: r:latest analysis/preprocess/data_eligible_ab.R
needs:
- data_input_process
outputs:
highly_sensitive:
data_eligible_a: output/data/data_eligible_a.rds
data_eligible_b: output/data/data_eligible_b.rds
moderately_sensitive:
eligibility_count_ab: output/tables/eligibility_count_ab.csv
group_age_ranges: output/lib/group_age_ranges.csv
## ####################################
## second_vax_period
## ####################################
## identify second vaccination time periods
## create dataset for identifying second vaccination time periods
data_2nd_vax_dates:
run: r:latest analysis/second_vax_period/data_2nd_vax_dates.R
needs:
- data_input_process
- data_eligible_ab
outputs:
highly_sensitive:
data_vax_plot: output/second_vax_period/data/data_vax_plot.rds
second_vax_period_dates_rds: output/second_vax_period/data/second_vax_period_dates.rds
moderately_sensitive:
second_vax_period_dates_txt: output/second_vax_period/tables/second_vax_period_dates.txt
## plot second vaccination time periods
plot_2nd_vax_dates:
run: r:latest analysis/second_vax_period/plot_2nd_vax_dates.R
needs:
- data_eligible_ab
- data_2nd_vax_dates
outputs:
moderately_sensitive:
plots_by_region: output/second_vax_period/images/plot_by_region_*.png
## apply eligiblity criteria from boxes c, d and e
data_eligible_cde:
run: r:latest analysis/preprocess/data_eligible_cde.R
needs:
- data_input_process
- data_eligible_ab
- data_2nd_vax_dates
outputs:
highly_sensitive:
data_eligible_e_vax: output/data/data_eligible_e_vax.rds
data_eligible_e_unvax: output/data/data_eligible_e_unvax.rds
data_eligible_e: output/data/data_eligible_e.csv
moderately_sensitive:
eligibility_count_cde: output/tables/eligibility_count_cde.csv
## ####################################
## study definition ever and k
## ####################################
## study definition ever
generate_ever_data:
run: cohortextractor:latest generate_cohort --study-definition study_definition_ever
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_ever.feather
## study definition for period 1
generate_input_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition_1
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_1.feather
## study definition for period 2
generate_input_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition_2
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_2.feather
## study definition for period 3
generate_input_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition_3
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_3.feather
## study definition for period 4
generate_input_4:
run: cohortextractor:latest generate_cohort --study-definition study_definition_4
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_4.feather
## study definition for period 5
generate_input_5:
run: cohortextractor:latest generate_cohort --study-definition study_definition_5
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_5.feather
## study definition for period 6
generate_input_6:
run: cohortextractor:latest generate_cohort --study-definition study_definition_6
--output-format feather
needs:
- data_eligible_cde
outputs:
highly_sensitive:
cohort: output/input_6.feather
## ####################################
## process covariates data
## ####################################
## (includes anytest_date)
data_covariates_process:
run: r:latest analysis/preprocess/data_covariates_process.R
needs:
- data_input_process
- data_eligible_cde
- generate_ever_data
- generate_input_1
- generate_input_2
- generate_input_3
- generate_input_4
- generate_input_5
- generate_input_6
outputs:
highly_sensitive:
data_covariates: output/data/data_covariates.rds
## min and max follow-up dates for plots
data_min_max_fu:
run: r:latest analysis/comparisons/data_min_max_fu.R
needs:
- data_input_process
- data_covariates_process
outputs:
highly_sensitive:
data_min_max_fu: output/lib/data_min_max_fu.rds
## ####################################
## subsequent vaccination
## ####################################
## plot cumulative incidence of subsequent vaccination
plot_cumulative_incidence:
run: r:latest analysis/subsequent_vax/plot_cumulative_incidence.R
needs:
- data_input_process
- data_eligible_cde
outputs:
moderately_sensitive:
ci_vax: output/subsequent_vax/images/ci_vax.png
survtable: output/subsequent_vax/tables/survtable_redacted.csv
## ####################################
## table 1 for report
## ####################################
## create table 1 for all and for each subgroup
table1:
run: r:latest analysis/report/table1.R
needs:
- data_input_process
- data_eligible_cde
- data_covariates_process
outputs:
moderately_sensitive:
eligibility_count_p1: output/tables/eligibility_count_p1.csv
table_csv: output/report/tables/table1_*_REDACTED.csv
table_html: output/report/tables/table1_*_REDACTED.html
## ####################################
## process time to event data
## ####################################
## process tte data
data_tte_process_BNT162b2:
run: r:latest analysis/comparisons/data_tte_process.R BNT162b2
needs:
- data_input_process
- data_covariates_process
outputs:
highly_sensitive:
data_tte_brand_outcome: output/tte/data/data_tte_BNT162b2*.rds
moderately_sensitive:
event_counts: output/tte/tables/event_counts_BNT162b2.csv
data_tte_process_ChAdOx1:
run: r:latest analysis/comparisons/data_tte_process.R ChAdOx1
needs:
- data_input_process
- data_covariates_process
outputs:
highly_sensitive:
data_tte_brand_outcome: output/tte/data/data_tte_ChAdOx1*.rds
moderately_sensitive:
event_counts: output/tte/tables/event_counts_ChAdOx1.csv
data_tte_process_both:
run: r:latest analysis/comparisons/data_tte_process.R both
needs:
- data_input_process
- data_covariates_process
outputs:
highly_sensitive:
data_tte_brand_outcome: output/tte/data/data_tte_both*.rds
moderately_sensitive:
event_counts: output/tte/tables/event_counts_both.csv
## ####################################
## apply models
## ####################################
## BNT162b2; 65+ years; anytest
## preflight checks
preflight_BNT162b2_1_anytest:
run: r:latest analysis/comparisons/preflight.R BNT162b2 1 anytest
needs:
- data_input_process
- data_covariates_process
- data_tte_process_BNT162b2
outputs:
highly_sensitive:
model_input: output/preflight/data/model_input_BNT162b2_1_anytest*.rds
moderately_sensitive:
eventcheck_table: output/preflight/tables/eventcheck_BNT162b2_1_anytest*.html
preflight_report: output/preflight/tables/preflight_report_BNT162b2_1_anytest*.txt
## apply cox model
apply_model_cox_BNT162b2_1_anytest:
run: r:latest analysis/comparisons/apply_model_cox_update.R BNT162b2 1 anytest
needs:
- preflight_BNT162b2_1_anytest
outputs:
highly_sensitive:
modelnumber: output/models_cox/data/model*_BNT162b2_1_anytest*.rds
model_tidy_rds: output/models_cox/data/modelcox_tidy_BNT162b2_1_anytest*.rds
model_glance_rds: output/models_cox/data/modelcox_glance_BNT162b2_1_anytest*.rds
moderately_sensitive:
model_tidy_txt: output/models_cox/data/modelcox_tidy_BNT162b2_1_anytest.txt
model_glance_txt: output/models_cox/data/modelcox_glance_BNT162b2_1_anytest.txt