generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
119 lines (103 loc) · 4.63 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
version: '3.0'
expectations:
population_size: 1000
actions:
generate_study_population_monthly_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2017-04-01 to 2018-04-01 by month" --output-dir=output/monthly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/monthly/input_*.csv.gz
generate_study_population_monthly_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2018-05-01 to 2019-04-01 by month" --output-dir=output/monthly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/monthly/input*.csv.gz
generate_study_population_monthly_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2019-05-01 to 2020-04-01 by month" --output-dir=output/monthly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/monthly/inpu*.csv.gz
generate_study_population_monthly_4:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2020-05-01 to 2021-04-01 by month" --output-dir=output/monthly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/monthly/inp*.csv.gz
generate_study_population_monthly_5:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2021-05-01 to 2022-03-01 by month" --output-dir=output/monthly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/monthly/in*.csv.gz
generate_study_population_weekly_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition_weekly --index-date-range "2021-04-01 to 2021-09-02 by week" --output-dir=output/weekly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/weekly/input_*.csv.gz
generate_study_population_weekly_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition_weekly --index-date-range "2021-09-09 to 2022-04-14 by week" --output-dir=output/weekly --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/weekly/input*.csv.gz
generate_study_population_dob:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dob --output-dir=output --output-format csv.gz
outputs:
highly_sensitive:
cohort: output/input_dob.csv.gz
join_cohorts_monthly:
run: >
cohort-joiner:v0.0.9
--lhs output/monthly/input_20*.csv.gz
--rhs output/input_dob.csv.gz
--output-dir output/monthly/joined
needs: [
generate_study_population_monthly_1,
generate_study_population_monthly_2,
generate_study_population_monthly_3,
generate_study_population_monthly_4,
generate_study_population_monthly_5,
generate_study_population_dob]
outputs:
highly_sensitive:
cohort: output/monthly/joined/input_20*.csv.gz
get_age_months:
run: >
python:latest python analysis/get_age_months.py
needs: [join_cohorts_monthly, generate_study_population_dob]
outputs:
highly_sensitive:
cohort: output/monthly/joined/input_2*.csv.gz
generate_measures:
run: cohortextractor:latest generate_measures
--study-definition study_definition
--output-dir=output/monthly
needs: [
generate_study_population_monthly_1,
generate_study_population_monthly_2,
generate_study_population_monthly_3,
generate_study_population_monthly_4,
generate_study_population_monthly_5,
]
outputs:
moderately_sensitive:
measure_csv: output/monthly/measure_*_rate.csv
generate_measures_weekly:
run: cohortextractor:latest generate_measures
--study-definition study_definition_weekly
--output-dir=output/weekly
needs: [generate_study_population_weekly_1, generate_study_population_weekly_2]
outputs:
moderately_sensitive:
measure_csv: output/weekly/measure_*_rate.csv
generate_plots:
run: python:latest python analysis/plots.py
needs: [generate_measures, generate_measures_weekly]
outputs:
moderately_sensitive:
counts: output/*/plot_*.png
deciles_charts: output/*/deciles_chart_*.png
measure_csv: output/*/redacted/measure_*_rate.csv
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]
outputs:
moderately_sensitive:
notebook: output/report.html