generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
151 lines (120 loc) · 4.36 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
######################################
# This script defines the project pipeline - it specifies the execution orders for all the code in this
# repo using a series of actions.
######################################
version: '3.0'
expectations:
population_size: 100000
actions:
# Generate study population and extract baseline characteristics at Sep 3, 2022
generate_study_pop_baseline:
run: cohortextractor:latest generate_cohort
--study-definition study_definition_baseline
--output-dir=feather
--output-format=feather
outputs:
highly_sensitive:
cohort: output/input_baseline.feather
# Data cleaning, defining exclusions, saving final study pop
data_process_baseline:
run: r:latest analysis/processing/data_process_baseline.R
needs: [generate_study_pop_baseline]
outputs:
highly_sensitive:
cohort: output/cohort/cohort_*.csv
moderately_sensitive:
descriptive: output/descriptive/total_*.csv
# Extract outcomes pre-campaign (index date = Sep 3)
outcomes_sep:
run: cohortextractor:latest generate_cohort
--study-definition study_definition_outcomes_1
--index-date-range "2022-09-03"
--output-dir=feather
--output-format=feather
needs: [data_process_baseline]
outputs:
highly_sensitive:
cohort: output/index/input_*.feather
# Extract outcomes mid-campaign (index date = Oct 15)
outcomes_oct:
run: cohortextractor:latest generate_cohort
--study-definition study_definition_outcomes_1
--index-date-range "2022-10-15"
--output-dir=feather
--output-format=feather
needs: [data_process_baseline]
outputs:
highly_sensitive:
cohort: output/index/input*.feather
# Extract outcomes during-campaign (index date = Nov 26)
outcomes_nov:
run: cohortextractor:latest generate_cohort
--study-definition study_definition_outcomes_2
--index-date-range "2022-11-26 to 2023-01-31 by week"
--output-dir=feather
--output-format=feather
needs: [data_process_baseline]
outputs:
highly_sensitive:
cohort: output/index/inpu*.feather
# Data cleaning of outcome data (control periods)
data_process_outcomes_1:
run: r:latest analysis/processing/data_process_outcomes_1.R
needs: [outcomes_sep, outcomes_oct]
outputs:
highly_sensitive:
outcomes: output/cohort/outcomes*.csv
# Data cleaning of outcome data (Nov onward)
data_process_outcomes_2:
run: r:latest analysis/processing/data_process_outcomes_2.R
needs: [outcomes_nov]
outputs:
highly_sensitive:
outcomes: output/cohort/outcome*.csv
# Plots of COVID booster uptake by age
booster_uptake:
run: r:latest analysis/descriptive/cumulative_vax_byage.R
needs: [data_process_baseline]
outputs:
moderately_sensitive:
rates_csv: output/cumulative_rates/final_*.csv
plot: output/cumulative_rates/plot_*.png
# Aggregate data by age
aggregate_outcomes_byage:
run: r:latest analysis/processing/aggregate_outcomes.R
needs: [data_process_outcomes_1, data_process_outcomes_2]
outputs:
moderately_sensitive:
outcomes: output/covid_outcomes/by_start_date/outcomes_*.csv
# no_patients: output/descriptive/total_n_by_date.csv
# Outcome plots #
# plot_outcomes:
# run: r:latest analysis/descriptive/plot_outcomes_byage.R
# needs: [aggregate_outcomes_byage]
# outputs:
# moderately_sensitive:
# plot: output/covid_outcomes/figures/plot_*.png
# ITT analysis #
itt_analysis:
run: r:latest analysis/statistical_analysis/itt_analysis.R
needs: [aggregate_outcomes_byage]
outputs:
moderately_sensitive:
measures_csv: output/covid_outcomes/predicted_*.csv
plot: output/covid_outcomes/figures/plot_pred*.png
# Discontinuity of demographics
# demographics:
# run: r:latest analysis/descriptive/demographics_byage.R
# needs: [generate_study_pop_baseline, data_process_baseline]
# outputs:
# moderately_sensitive:
# measures_csv: output/descriptive/demographics_*.csv
# Flu vaccine uptake #
# flu_vax:
# run: r:latest analysis/descriptive/flu_vax_byage.R
# needs: [generate_study_pop]
# outputs:
# moderately_sensitive:
# measure_csv: output/cumulative_rates/flu_*.csv
# plot: output/cumulative_rates/plot_flu_vax_byage.png
# IV analysis #