generated from opensafely/research-template
/
project.yaml
2953 lines (2421 loc) · 130 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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: '3.0'
expectations:
population_size: 50000
actions:
### 1. Extract the cohort
## use the Measure function to allow data for different time periods to be extracted in the same study population: --index-date-range ""yyyy-mm-dd"" --output-format feather
generate_study_population_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2015-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2015-03-01.feather
generate_study_population_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2016-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2016-03-01.feather
generate_study_population_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2017-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2017-03-01.feather
generate_study_population_4:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2018-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2018-03-01.feather
generate_study_population_5:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2019-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2019-03-01.feather
generate_study_population_6:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2020-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2020-03-01.feather
generate_study_population_7:
run: cohortextractor:latest generate_cohort --study-definition study_definition_all --output-dir=output/data --index-date-range "2021-03-01" --output-format feather
outputs:
highly_sensitive:
cohort: output/data/input_all_2021-03-01.feather
generate_study_population_ethnicity:
run: cohortextractor:latest generate_cohort --study-definition study_definition_ethnicity --output-dir=output/data --output-format=feather
outputs:
highly_sensitive:
cohort: output/data/input_ethnicity.feather
join_ethnicity:
run: python:latest python analysis/join_ethnicity.py --output-dir=output/data --output-format feather
needs: [generate_study_population_1, generate_study_population_2, generate_study_population_3, generate_study_population_4, generate_study_population_5, generate_study_population_6, generate_study_population_7, generate_study_population_ethnicity]
outputs:
highly_sensitive:
cohort: output/data/input*.feather
generate_study_population_dm1:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2015-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2015-03-01.csv
generate_study_population_dm2:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2016-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2016-03-01.csv
generate_study_population_dm3:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2017-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2017-03-01.csv
generate_study_population_dm4:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2018-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2018-03-01.csv
generate_study_population_dm5:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2019-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2019-03-01.csv
generate_study_population_dm6:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2020-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2020-03-01.csv
generate_study_population_dm7:
run: cohortextractor:latest generate_cohort --study-definition study_definition_dm_meds --output-dir=output/data --index-date-range "2021-03-01"
outputs:
highly_sensitive:
cohort: output/data/input_dm_meds_2021-03-01.csv
### Develop yearly BMI data sets to de-duplicate data and calculate median BMI each year. Feather format to reduce data quantity.
join_meds:
run: r:latest analysis/add_medication.R --output-dir=output/data --output-format feather
needs: [join_ethnicity, generate_study_population_dm1, generate_study_population_dm2, generate_study_population_dm3, generate_study_population_dm4, generate_study_population_dm5, generate_study_population_dm6, generate_study_population_dm7]
outputs:
highly_sensitive:
cohort1: output/data/complete_meds_2015.feather
cohort2: output/data/complete_meds_2016.feather
cohort3: output/data/complete_meds_2017.feather
cohort4: output/data/complete_meds_2018.feather
cohort5: output/data/complete_meds_2019.feather
cohort6: output/data/complete_meds_2020.feather
cohort7: output/data/complete_meds_2021.feather
generate_BMI_2015_data:
run: r:latest analysis/BMI_2015.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2015.feather
cohort2: output/data/BMI_complete_long_2015.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2015.csv
generate_BMI_2016_data:
run: r:latest analysis/BMI_2016.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2016.feather
cohort2: output/data/BMI_complete_long_2016.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2016.csv
generate_BMI_2017_data:
run: r:latest analysis/BMI_2017.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2017.feather
cohort2: output/data/BMI_complete_long_2017.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2017.csv
generate_BMI_2019_data:
run: r:latest analysis/BMI_2019.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2019.feather
cohort2: output/data/BMI_complete_long_2019.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2019.csv
generate_BMI_2021_data:
run: r:latest analysis/BMI_2021.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2021.feather
cohort2: output/data/BMI_complete_long_2021.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2021.csv
generate_BMI_2018_data:
run: r:latest analysis/BMI_2018.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2018.feather
cohort2: output/data/BMI_complete_long_2018.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2018.csv
generate_BMI_2020_data:
run: r:latest analysis/BMI_2020.R --output-dir=output/data --output-format feather
needs: [join_meds]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median_2020.feather
cohort2: output/data/BMI_complete_long_2020.feather
moderately_sensitive:
table1: output/data/BMI_data_checks_2020.csv
# Append yearly data sets to produce a complete data set for analysis of change in trends
generate_complete_median_BMI_data:
run: r:latest analysis/BMI_median_combine_datasets.R --output-dir=output/data --output-format feather
needs: [generate_BMI_2015_data, generate_BMI_2016_data, generate_BMI_2017_data, generate_BMI_2018_data, generate_BMI_2019_data, generate_BMI_2020_data, generate_BMI_2021_data ]
outputs:
highly_sensitive:
cohort1: output/data/BMI_complete_median.feather
generate_complete_long_BMI_data:
run: r:latest analysis/BMI_complete_long.R --output-dir=output/data --output-format feather
needs: [generate_BMI_2015_data, generate_BMI_2016_data, generate_BMI_2017_data, generate_BMI_2018_data, generate_BMI_2019_data, generate_BMI_2020_data, generate_BMI_2021_data ]
outputs:
highly_sensitive:
cohort1: output/data/all_bmi_long.feather
generate_BMI_trajectories_data1:
run: r:latest analysis/BMI_change_1.R --output-dir=output/data --output-format feather
needs: [generate_complete_long_BMI_data]
outputs:
highly_sensitive:
cohort1: output/data/BMI_demog.feather
cohort2: output/data/BMI_all_long_sample.feather
generate_BMI_trajectories_data2:
run: r:latest analysis/BMI_change_2.R --output-dir=output/data --output-format feather
needs: [generate_BMI_trajectories_data1]
outputs:
highly_sensitive:
cohort1: output/data/BMI_trajectories.feather
generate_BMI_trajectories_data3:
run: r:latest analysis/BMI_change_3.R --output-dir=output/data --output-format feather
needs: [generate_BMI_trajectories_data2, generate_BMI_trajectories_data1]
outputs:
highly_sensitive:
cohort1: output/data/BMI_trajectories_final.feather
BMI_trajectories_demographics_correction:
run: r:latest analysis/BMI_change_demographic_correction.R --output-dir=output/data --output-format feather
needs: [generate_BMI_trajectories_data3, generate_complete_long_BMI_data]
outputs:
highly_sensitive:
cohort1: output/data/BMI_trajectories_final_demog.feather
moderately_sensitive:
table1: output/data/BMI_traj_demog.html
########################################
## POPULATION DEMOGRAPHICS
#######################################
demographics_analysis_pop:
run: r:latest analysis/pop_demographics/pop_demographics_total_pop.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/demographics_study_population.csv
demographics_had_bmi:
run: r:latest analysis/pop_demographics/pop_demographics_had_bmi.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/demographics_had_bmi.csv
demographics_t2dm:
run: r:latest analysis/pop_demographics/pop_demographics_t2dm.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/demographics_study_population_t2dm.csv
table2: output/data/demographics_had_bmi_t2dm.csv
demographics_t1dm:
run: r:latest analysis/pop_demographics/pop_demographics_t1dm.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/demographics_study_population_t1dm.csv
table2: output/data/demographics_had_bmi_t1dm.csv
demographics_hypertension:
run: r:latest analysis/pop_demographics/pop_demographics_hypertension.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/demographics_study_population_hypertension.csv
table2: output/data/demographics_had_bmi_hypertension.csv
demographics_bmi_change_all:
run: r:latest analysis/pop_demographics/pop_demographics_bmi_change_all.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/demographics_bmi_change_analysis_all.csv
demographics_bmi_change_lowbmiexc:
run: r:latest analysis/pop_demographics/pop_demographics_bmi_change_lowbmiexc.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/demographics_bmi_change_analysis_lowbmiexc.csv
demographics_bmi_change_t2dm:
run: r:latest analysis/pop_demographics/pop_demographics_bmi_change_t2dm.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/demographics_bmi_change_analysis_all_t2dm.csv
table2: output/data/demographics_bmi_change_analysis_lowbmiexc_t2dm.csv
demographics_bmi_change_t1dm:
run: r:latest analysis/pop_demographics/pop_demographics_bmi_change_t1dm.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/demographics_bmi_change_analysis_all_t1dm.csv
table2: output/data/demographics_bmi_change_analysis_lowbmiexc_t1dm.csv
demographics_bmi_change_hypertension:
run: r:latest analysis/pop_demographics/pop_demographics_bmi_change_hypertension.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/demographics_bmi_change_analysis_all_hypertension.csv
table2: output/data/demographics_bmi_change_analysis_lowbmiexc_hypertension.csv
#########################################################
## TOP DECILE: BMI_ CHANGE
##########################################################
topdecile_bmi_change_univariate:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_univariate.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_univariate_lowbmiexc.csv
table2: output/data/change_deciles_lowbmiexc.csv
table3: output/data/change_90th_counts_lowbmiexc.csv
topdecile_bmi_change_counts_correction:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_counts.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_counts_lowbmiexc_corrected.csv
topdecile_bmi_change_age_adjusted:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_age_adjusted.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_age_adjusted_lowbmiexc.csv
table2: output/data/change_90th_wald_age.csv
topdecile_bmi_change_sex_adjusted:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_sex_adjusted.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_sex_adjusted_lowbmiexc.csv
table2: output/data/change_90th_wald_sex.csv
topdecile_bmi_change_age_sex_adjusted:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_age_sex_adjusted.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_age_sex_adjusted_lowbmiexc.csv
table2: output/data/change_90th_wald_age_sex.csv
topdecile_bmi_change_age_sex_imd_adjusted:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_ageseximd_adjusted.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_age_sex_imd_adjusted_lowbmiexc.csv
## hypertension
topdecile_bmi_change_hypertension:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_hypertension.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_univariate_lowbmiexc_hypertension.csv
table2: output/data/change_deciles_lowbmiexc_hypertension.csv
table3: output/data/change_90th_counts_lowbmiexc_hypertension.csv
table4: output/data/change_90th_age_adj_lowbmiexc_hypertension.csv
table5: output/data/change_90th_sex_adj_lowbmiexc_hypertension.csv
table6: output/data/change_90th_agesex_adj_lowbmiexc_hypertension.csv
topdecile_bmi_change_T1DM:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_T1DM.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_univariate_lowbmiexc_T1DM.csv
table2: output/data/change_deciles_lowbmiexc_T1DM.csv
table3: output/data/change_90th_counts_lowbmiexc_T1DM.csv
table4: output/data/change_90th_age_adj_lowbmiexc_T1DM.csv
table5: output/data/change_90th_sex_adj_lowbmiexc_T1DM.csv
table6: output/data/change_90th_agesex_adj_lowbmiexc_T1DM.csv
topdecile_bmi_change_T2DM:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_T2DM.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_univariate_lowbmiexc_T2DM.csv
table2: output/data/change_deciles_lowbmiexc_T2DM.csv
table3: output/data/change_90th_counts_lowbmiexc_T2DM.csv
table4: output/data/change_90th_age_adj_lowbmiexc_T2DM.csv
table5: output/data/change_90th_sex_adj_lowbmiexc_T2DM.csv
table6: output/data/change_90th_agesex_adj_lowbmiexc_T2DM.csv
topdecile_bmi_change_T2DM_ageseximd:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_T2DM_ageseximd.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_ageseximd_adj_lowbmiexc_T2DM.csv
topdecile_bmi_change_T2DM_redact:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_T2DM_redact.R --output-dir=output/data
needs: [topdecile_bmi_change_T2DM, topdecile_bmi_change_T2DM_ageseximd]
outputs:
moderately_sensitive:
table1: output/data/change_90th_univariate_lowbmiexc_T2DM_r.csv
table2: output/data/change_deciles_lowbmiexc_T2DM_r.csv
table3: output/data/change_90th_counts_lowbmiexc_T2DM_r.csv
table4: output/data/change_90th_age_adj_lowbmiexc_T2DM_r.csv
table5: output/data/change_90th_sex_adj_lowbmiexc_T2DM_r.csv
table6: output/data/change_90th_agesex_adj_lowbmiexc_T2DM_r.csv
table7: output/data/change_90th_ageseximd_adj_lowbmiexc_T2DM_r.csv
topdecile_bmi_change_T2DM_imd_and_eth:
run: r:latest analysis/bmi_trajectory/top_decile_change/top_decile_change_imd_adjusted_T2DM.R --output-dir=output/data
needs: [bmi_trajectory_change_summary]
outputs:
moderately_sensitive:
table1: output/data/change_90th_imd_adj_lowbmiexc_T2DM.csv
table2: output/data/change_90th_eth_adj_lowbmiexc_T2DM.csv
##################################################################
### >> HAD_BMI ANALYSIS
######################################################################
# who had_bmi measured:
generate_had_bmi_proportion_2019:
run: r:latest analysis/had_bmi_proportions_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_2019.csv
generate_had_bmi_proportion_2020:
run: r:latest analysis/had_bmi_proportions_2020.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_2020.csv
generate_had_bmi_proportion_2021:
run: r:latest analysis/had_bmi_proportions_2021.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_2021.csv
## Look at odds of having BMI across the years
had_bmi_2019_2021_models1:
run: r:latest analysis/had_bmi_check/had_bmi_all_years_models.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/had_bmi_2019_21_models_1.csv
had_bmi_2019_2021_models1_counts:
run: r:latest analysis/had_bmi_check/had_bmi_all_years_models_counts.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/had_bmi_2019_21_models_1_counts.csv
table2: output/data/had_bmi_2019_21_models_1_demographics.csv
had_bmi_2019_2021_models1_counts_round:
run: r:latest analysis/had_bmi_check/had_bmi_models_counts_round.R --output-dir=output/data
needs: [had_bmi_2019_2021_models1_counts]
outputs:
moderately_sensitive:
table1: output/data/had_bmi_2019_21_models_1_demographics_round.csv
had_bmi_2019_2021_models_comorbidities:
run: r:latest analysis/had_bmi_check/had_bmi_all_years_comorbidities_models.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/had_bmi_2019_21_comorbidity_models.csv
table2: output/data/had_bmi_2019_21_comorbidity_models_counts.csv
had_bmi_2019_2021_proportions:
run: r:latest analysis/had_bmi_check/had_bmi_all_years_prop_chi.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_2019_2021.csv
table2: output/data/proportion_had_bmi_2019_2021_chisquare.csv
had_bmi_2019_2020_smoking_proportions:
run: r:latest analysis/had_bmi_check/had_bmi_smoking_prop.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_2019_2021_smoking.csv
table2: output/data/proportion_had_bmi_2019_2021_chisquare_smoking.csv
## check the output from the cohort extractor 'had_bmi'
had_bmi_proportion_2019_check:
run: r:latest analysis/had_bmi_check/had_bmi_check_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_had_bmi_check_2019.csv
table2: output/data/had_bmi_numbers_check.csv
#########################################################
## PROPORTION OBESE ANALYSIS
generate_obese_proportion_2019:
run: r:latest analysis/obese_proportions_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_obese_2019.csv
generate_obese_proportion_2020:
run: r:latest analysis/obese_proportions_2020.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_obese_2020.csv
generate_obese_proportion_2021:
run: r:latest analysis/obese_proportions_2021.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/proportion_obese_2021.csv
######################################################################################
# >> Median BMI Analysis
#######################################################################################
# generate summary stats of median BMI by exposures
generate_median_summary_stats:
run: r:latest analysis/BMI_median_summary_stats.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_bmi_summary_table_demographic.csv
table2: output/data/median_bmi_summary_table_covariates.csv
## tables of median BMI and range
generate_median_bmi_range_2015:
run: r:latest analysis/median_range_bmi/median_range_2015.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2015.csv
generate_median_bmi_range_2016:
run: r:latest analysis/median_range_bmi/median_range_2016.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2016.csv
generate_median_bmi_range_2017:
run: r:latest analysis/median_range_bmi/median_range_2017.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2017.csv
generate_median_bmi_range_2018:
run: r:latest analysis/median_range_bmi/median_range_2018.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2018.csv
generate_median_bmi_range_2019:
run: r:latest analysis/median_range_bmi/median_range_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2019.csv
generate_median_bmi_range_2020:
run: r:latest analysis/median_range_bmi/median_range_2020.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2020.csv
generate_median_bmi_range_2021:
run: r:latest analysis/median_range_bmi/median_range_2021.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2021.csv
combine_median_range_BMI:
run: r:latest analysis/median_range_bmi/combine_median_range_BMI.R --output-dir=output/data
needs: [generate_median_bmi_range_2021, generate_median_bmi_range_2020, generate_median_bmi_range_2019, generate_median_bmi_range_2018, generate_median_bmi_range_2017, generate_median_bmi_range_2016, generate_median_bmi_range_2015]
outputs:
moderately_sensitive:
table1: output/data/median_range_bmi_2015_2021.csv
generate_median_bmi_range_smoking:
run: r:latest analysis/median_range_bmi/median_range_smoking.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/median_complete_smoking_status.csv
## Proportion Obese
proportion_obese_2015:
run: r:latest analysis/proportion_obese/proportion_obese_2015.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2015.csv
proportion_obese_2016:
run: r:latest analysis/proportion_obese/proportion_obese_2016.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2016.csv
proportion_obese_2017:
run: r:latest analysis/proportion_obese/proportion_obese_2017.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2017.csv
proportion_obese_2018:
run: r:latest analysis/proportion_obese/proportion_obese_2018.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2018.csv
proportion_obese_2019:
run: r:latest analysis/proportion_obese/proportion_obese_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2019.csv
proportion_obese_2020:
run: r:latest analysis/proportion_obese/proportion_obese_2020.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2020.csv
proportion_obese_2021:
run: r:latest analysis/proportion_obese/proportion_obese_2021.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2021.csv
redact_proportion_obese:
run: r:latest analysis/proportion_obese/proportion_obese_redact.R --output-dir=output/data
needs: [proportion_obese_2021, proportion_obese_2020, proportion_obese_2019, proportion_obese_2018, proportion_obese_2017, proportion_obese_2016, proportion_obese_2015]
outputs:
moderately_sensitive:
table1: output/data/obese_2015_redact.csv
table2: output/data/obese_2016_redact.csv
table3: output/data/obese_2017_redact.csv
table4: output/data/obese_2018_redact.csv
table5: output/data/obese_2019_redact.csv
table6: output/data/obese_2020_redact.csv
table7: output/data/obese_2021_redact.csv
## Proportion Obese
proportion_weight_categories_2015:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2015.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2015.csv
proportion_weight_categories_2016:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2016.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2016.csv
proportion_weight_categories_2017:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2017.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2017.csv
proportion_weight_categories_2018:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2018.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2018.csv
proportion_weight_categories_2019:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2019.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2019.csv
proportion_weight_categories_2020:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2020.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2020.csv
proportion_weight_categories_2021:
run: r:latest analysis/proportion_weight_categories/proportion_weight_categories_2021.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2021.csv
redact_weight_categories:
run: r:latest analysis/proportion_weight_categories/redact_weightcategories.R --output-dir=output/data
needs: [proportion_weight_categories_2015, proportion_weight_categories_2016, proportion_weight_categories_2017, proportion_weight_categories_2018, proportion_weight_categories_2019, proportion_weight_categories_2020, proportion_weight_categories_2021]
outputs:
moderately_sensitive:
table1: output/data/weight_categories_2015_redact.csv
table2: output/data/weight_categories_2016_redact.csv
table3: output/data/weight_categories_2017_redact.csv
table4: output/data/weight_categories_2018_redact.csv
table5: output/data/weight_categories_2019_redact.csv
table6: output/data/weight_categories_2020_redact.csv
table7: output/data/weight_categories_2021_redact.csv
proportion_obese_2019_2021:
run: r:latest analysis/proportion_weight_categories/proportion_obese_models.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2019_21_models_1.csv
proportion_obese_2019_2021_comorbidities:
run: r:latest analysis/proportion_weight_categories/proportion_obese_comorbidities_models.R --output-dir=output/data
needs: [generate_complete_median_BMI_data]
outputs:
moderately_sensitive:
table1: output/data/obese_2019_21_comorbidity_models.csv
########## BMI_trajectory_data
proportion_complete_bmi_trajectory:
run: r:latest analysis/proportion_complete_BMI_trajectory.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
moderately_sensitive:
table1: output/data/complete_bmi_trajectories_proportions.csv
bmi_change_plots:
run: r:latest analysis/BMI_change_plot.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
moderately_sensitive:
table1: output/data/short_bmi_change_summary.csv
chart1: output/bmi_change_plot.png
chart2: output/bmi_change_plot_age.png
chart3: output/bmi_change_plot_counts.png
chart4: output/bmi_change_plot_age_precovid_counts.png
chart5: output/bmi_change_plot_age_postcovid_counts.png
bmi_change_extremes:
run: r:latest analysis/BMI_change_check_extremes.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
moderately_sensitive:
table1: output/data/short_bmi_change_extremes.csv
bmi_timeinterval_check:
run: r:latest analysis/check_timeintervals_BMI_change.R --output-dir=output/data
needs: [generate_BMI_trajectories_data3]
outputs:
moderately_sensitive:
table1: output/data/bmi_timeinterval_check.csv
table2: output/data/time1_error.csv
pandemic_bmi_changes:
run: r:latest analysis/BMI_change_pandemic.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
moderately_sensitive:
table1: output/data/prepandemic_bmi_change_per_year.csv
table2: output/data/postpandemic_bmi_change_per_year.csv
pandemic_bmi_trajectory_plots:
run: r:latest analysis/BMI_change_postcovid_plots.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
highly_sensitive:
table1: output/data/BMI_trajectory_data.feather
table2: output/data/BMI_trajectory_data_filtered.feather
moderately_sensitive:
chart1: output/precovid_stable_bmi.png
chart2: output/precovid_slow_inc_bmi.png
chart3: output/precovid_mod_inc_bmi.png
chart4: output/precovid_rapid_inc_bmi.png
## violin plots to see distribution before filtering
postcovid_BMI_change_plots:
run: r:latest analysis/bmi_change_postcovid_distribution_plots.R --output-dir=output/data
needs: [pandemic_bmi_trajectory_plots]
outputs:
moderately_sensitive:
chart1: output/SMI_postcovid_trajectory.png
chart2: output/region_postcovid_trajectory.png
chart3: output/precovid_traj_postcovid_trajectory.png
chart4: output/bmi_postcovid_trajectory.png
chart5: output/LD_postcovid_trajectory.png
chart6: output/imd_postcovid_trajectory.png
chart7: output/hypertension_postcovid_trajectory.png
chart8: output/ethnic_postcovid_trajectory.png
chart9: output/diabetes2_postcovid_trajectory.png
chart10: output/diabetes1_postcovid_trajectory.png
chart11: output/depression_postcovid_trajectory.png
chart12: output/age_postcovid_trajectory.png
## stacked column charts showing proportion in different BMI change categories
bmi_change_category_proportion_plots:
run: r:latest analysis/BMI_change_category_prop_plots.R --output-dir=output/data
needs: [BMI_trajectories_demographics_correction]
outputs:
highly_sensitive:
table1: output/data/BMI_trajectory_data_long.feather
moderately_sensitive:
chart1: output/category_bmi_change_depression.png
chart2: output/category_bmi_change_ethnicity.png
chart3: output/category_bmi_change_learning_diff.png
chart4: output/category_bmi_change_region.png
chart5: output/category_bmi_change_sex.png
chart6: output/category_bmi_change_serious_mental.png
chart7: output/category_bmi_change_t1dm.png
chart8: output/category_bmi_change_t2dm.png
chart9: output/category_bmi_change_imd.png
chart10: output/category_bmi_change_hypertension.png
## description proportions in each change group
bmi_change_groups_description:
run: r:latest analysis/bmi_trajectory/BMI_change_category_description.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/precovid_bmichange_description.csv
table2: output/data/postcovid_bmichange_description.csv
## logistic regression predictors of rapid bmi change in pre and post covid period
bmi_change_univariate:
run: r:latest analysis/BMI_change_rapid_univariate.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_univariate.csv
table2: output/data/rapid_bmi_change_popcharac.csv
bmi_change_age_adjusted:
run: r:latest analysis/BMI_change_rapid_age_model.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_age_adjusted.csv
## Predictors of rapid bmi change with cancer and low pre pandemic weight removed.
bmi_change_univariate_lowbmiexcluded:
run: r:latest analysis/BMI_change_rapid_lowbmi_excluded_univariate.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_univariate.csv
table2: output/data/rapid_bmi_change_cancerandlowbmi_removed_popcharac.csv
bmi_change_age_adjusted_lowbmiexcluded:
run: r:latest analysis/BMI_change_rapid_lowbmi_excluded_age_models.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_age_adjusted.csv
### RAPID CHANGE BMI - ADJUSTED MODELS
bmi_rapid_change_sex_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_sex_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_sex_adjusted.csv
bmi_rapid_change_imd_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_imd_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_imd_adjusted.csv
bmi_rapid_change_ethnic_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_ethnic_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_ethnic_adjusted.csv
bmi_rapid_change_sexage_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiec_sexage_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_sexage_adjusted.csv
bmi_rapid_change_imdsexage_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_imdsexage_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_imdsexage_adjusted.csv
bmi_rapid_change_imdsexageethnic_adjusted_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_imdsexageethnic_adj.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs:
moderately_sensitive:
table1: output/data/rapid_bmi_change_cancerandlowbmi_removed_imdsexageethnic_adjusted.csv
bmi_rapid_change_missinganalysis_lowbmiexcluded:
run: r:latest analysis/bmi_trajectory/rapid_bmi_change/rapid_change_cancerlowbmiexc_missinganalysis.R --output-dir=output/data
needs: [bmi_change_category_proportion_plots]
outputs: