Code to accompany the manuscript "Data-driven prioritization of 360 environmental factors and clinical biomarkers reveals fragility of associations in risk for COVID-19 infection in the UK". Please look at the Code Overview section below for the order in which scripts should be run to generate key figures. XWAS code is inspired by scripts from github repos chiragjp/xwas and chiragjp/dhs_india/xwas. VoE code is inspired by scripts from chiragjp/voe.
Access to UK Biobank data is granted by following the steps described at the UK Biobank website [https://www.ukbiobank.ac.uk/principles-of-access/]
Please email sivateja_tangirala@hms.harvard.edu with any questions.
Code flow:
Processing data -> Running Models -> Processing Results
A. Set directory paths
- Set the working directory to a path that you specify (as to where the input data is stored and data saved to)
- For example, we would run the command "Rscript xxxx.R user_specified_path" on the command line(xxxx and user_specified_path are placeholders)
B. Run ProcessingData
scripts (gather and process input data)
C. Run RunningModels
scripts (implement poisson regression models)
D. Run ProcessingResults
scripts (process raw results from analyses and generate visualizations)
Reproduce Main Figures (run scripts in the same order listed below) :
- UKB_COVID_exposures_data_input_07_17_20.R
- covid_input_process_hosp_death_data_script_07_17_20_updated.R
- process_biomarkers_infectious_factors_input_data_07_17_20.R
- Baseline_COVID_EWAS_AutoScript_07_17_20.R
- sources Baseline_EWAS_Logistic_Functions_Script.R
- process_COVID_EWAS_results_updated_07_17_20.R
- UKB_COVID_exposures_data_input_05_17_21.R
- covid_input_process_hosp_death_data_script_06_17_21.R
- process_biomarkers_infectious_factors_input_data_06_17_21.R
- Baseline_COVID_EWAS_AutoScript_06_17_21.R
- sources Baseline_EWAS_Logistic_Functions_Script.R
- process_COVID_EWAS_results_updated_06_17_21.R
- Interaction_exposure_instance_Baseline_COVID_EWAS_AutoScript.R
- sources Interaction_Exposure_Instance_Effect_Baseline_EWAS_Logistic_Functions_Script.R
- process_interaction_exposure_instance_results_script.R