generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
project.yaml
212 lines (182 loc) · 7.18 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
version: "3.0"
expectations:
population_size: 5000
actions:
generate_study_population_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2019-09-01 to 2020-05-01 by month" --output-format feather
outputs:
highly_sensitive:
cohort: output/input_*.feather
generate_study_population_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2020-06-01 to 2021-02-01 by month" --output-format feather
outputs:
highly_sensitive:
cohort: output/input*.feather
generate_study_population_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2021-03-01 to 2021-09-01 by month" --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/inpu*.csv.gz
generate_study_definition_demographics_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition_demographics --index-date-range "2019-09-01 to 2020-05-01 by month" --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/input_demographics_*.csv.gz
generate_study_definition_demographics_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition_demographics --index-date-range "2020-06-01 to 2021-02-01 by month" --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/input_demographics*.csv.gz
generate_study_definition_demographics_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition_demographics --index-date-range "2021-03-01 to 2021-09-01 by month" --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/input_demographic*.csv.gz
generate_study_population_region:
run: cohortextractor:latest generate_cohort --study-definition study_definition_region --index-date-range "2019-09-01 to 2021-09-01 by month" --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/input_region*.csv.gz
generate_study_population_ethnicity:
run: cohortextractor:latest generate_cohort --study-definition study_definition_ethnicity --output-format feather
outputs:
highly_sensitive:
cohort: output/input_ethnicity.feather
# join_ethnicity_region:
# run: python:latest python analysis/join_ethnicity_region.py
# needs:
# [
# generate_study_population_1,
# generate_study_population_2,
# generate_study_population_3,
# generate_study_population_ethnicity,
# ]
# outputs:
# highly_sensitive:
# cohort: output/inp*.feather
filter_population:
run: python:latest python analysis/filter_population.py
needs: [generate_study_population_1, generate_study_population_2, generate_study_population_3]
outputs:
highly_sensitive:
cohort: output/input_filtered_*.feather
generate_demographics:
run: python:latest python analysis/demographics_summary.py
needs:
[
filter_population,
generate_study_population_ethnicity,
generate_study_definition_demographics_1,
generate_study_definition_demographics_2,
generate_study_definition_demographics_3,
generate_study_population_region
]
outputs:
moderately_sensitive:
demographics: output/demographics_summary*.csv
calculate_numerators:
run: python:latest python analysis/calculate_numerators.py
needs: [filter_population]
outputs:
highly_sensitive:
cohort: output/indicator_e_f_*.feather
# calculate_composite_indicators:
# run: python:latest python analysis/composite_indicators.py
# needs: [calculate_numerators, filter_population]
# outputs:
# moderately_sensitive:
# counts: output/*_composite_measure.csv
generate_measures:
run: cohortextractor:latest generate_measures --study-definition study_definition --output-dir=output
needs: [filter_population]
outputs:
moderately_sensitive:
measure_csv: output/measure_*_rate.csv
generate_measures_additional:
run: python:latest python analysis/calculate_measures.py
needs: [calculate_numerators, filter_population]
outputs:
moderately_sensitive:
measure_csv: output/measure*_rate.csv
generate_measures_region:
run: cohortextractor:latest generate_measures --study-definition study_definition_region --output-dir=output
needs: [generate_study_population_region]
outputs:
moderately_sensitive:
measure_csv: output/measure_msoa_rate.csv
measure_csv_region: output/measure_region_rate.csv
generate_region_counts:
run: python:latest python analysis/check_region.py
needs:
[
generate_study_population_region
]
outputs:
moderately_sensitive:
region_count: output/combined_count.csv
generate_summary_counts:
run: python:latest python analysis/summary_statistics.py
needs:
[
filter_population,
generate_measures,
generate_measures_additional,
calculate_numerators,
]
outputs:
moderately_sensitive:
patient_count: output/patient_count_*.json
practice_count: output/practice_count_*.json
summary: output/indicator_summary_statistics_*.json
produce_stripped_measures:
run: python:latest python analysis/stripped_measures.py
needs:
[
generate_measures,
generate_measures_additional
]
outputs:
moderately_sensitive:
measures: output/measure_stripped_*.csv
generate_plots:
run: python:latest python analysis/plot_measures.py
needs:
[
generate_measures,
generate_measures_additional
]
outputs:
moderately_sensitive:
counts: output/figures/plot_*.jpeg
combined: output/figures/combined_plot_*.png
medians: output/medians.json
generate_notebook:
run: jupyter:latest jupyter nbconvert /workspace/analysis/report.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs: [generate_plots, generate_summary_counts]
outputs:
moderately_sensitive:
notebook: output/report.html
# generate_dem_notebook:
# run: jupyter:latest jupyter nbconvert /workspace/analysis/demographic_report.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
# needs: [generate_plots]
# outputs:
# moderately_sensitive:
# notebook: output/demographic_report.html
# plot_Q1_comparisons:
# run: r:latest analysis/generate_demographic_slope_plot.R
# needs: [generate_plots]
# outputs:
# moderately_sensitive:
# plots: output/figures/SLOPE_*.png
# run_tests:
# run: python:latest python -m pytest --junit-xml=output/pytest.xml --verbose
# outputs:
# moderately_sensitive:
# log: output/pytest.xml
# test_population:
# run: python:latest python analysis/test_population.py
# needs: [filter_population]
# outputs:
# moderately_sensitive:
# counts: output/population_counts.csv
# count: output/patient_count_check.json