generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
project.yaml
75 lines (59 loc) · 2.28 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
version: '3.0'
expectations:
population_size: 10000
actions:
# actions to plot TPP-STP size
generate_cohort_stppop:
run: cohortextractor:latest generate_cohort --study-definition study_definition_1_stppop --output-dir=output/cohorts
outputs:
highly_sensitive:
cohort: output/cohorts/input_1_stppop.csv
plot_stppop:
run: r:latest analysis/1-plot-stppop.R
needs: [generate_cohort_stppop]
outputs:
moderately_sensitive:
log: output/logs/log-1-plot-stppop.txt
figure1: output/plots/plot_stppop_map.png
figure2: output/plots/plot_stppop_bar.png
# actions to plot deaths over time
generate_cohort_deaths:
run: cohortextractor:latest generate_cohort --study-definition study_definition_2_deaths --output-dir=output/cohorts
outputs:
highly_sensitive:
cohort: output/cohorts/input_2_deaths.csv
plot_deaths:
run: r:latest analysis/2-plot-deaths.R
needs: [generate_cohort_deaths]
outputs:
moderately_sensitive:
log: output/logs/log-2-plot-deaths.txt
figure: output/plots/plot_deaths.png
# actions to plot gp activity over time
generate_cohort_activity:
run: cohortextractor:latest generate_cohort --study-definition study_definition_3_activity --index-date-range "2020-01-01 to 2020-09-01 by month" --output-dir=output/measures
outputs:
highly_sensitive:
cohort: output/measures/input_3_activity_*.csv
generate_measures_activity:
run: cohortextractor:latest generate_measures --study-definition study_definition_3_activity --output-dir=output/measures
needs: [generate_cohort_activity]
outputs:
moderately_sensitive:
measure_csv: output/measures/measure_*.csv
plot_activity:
run: r:latest analysis/3-plot-activity.R
needs: [generate_measures_activity]
outputs:
moderately_sensitive:
log: output/logs/log-3-plot-activity.txt
figure: output/plots/plot_*.png
run_all:
needs: [plot_stppop, plot_deaths, plot_activity]
# In order to be valid this action needs to define a run commmand and
# some output. We don't really care what these are but the below seems to
# do the trick.
run: cohortextractor:latest --version
outputs:
moderately_sensitive:
whatever: project.yaml