This R script relates to the manuscript "Juvenile idiopathic arthritis polygenic risk scores are associated with cardiovascular phenotypes in early adulthood". It details the ALSPAC variables used in this analysis, details of data cleaning and variable recoding, but excludes the variable extraction.
The analysis requires four main stages:
- Extraction of ALSPAC data
- Cleaning of ALSPAC data
- Data exploration and summarisation
- Regression analysis
A dataframe of ALSPAC offspring is generated from the ALSAPC cohort profile file. Analysis variables were also extracted from core ALSPAC files. Variables are coded as covariates ("covs"), cardiovascular ("cardio"), immunological ("immuno"), anthropometric ("anthro") or negative control ("negcon") variables. Polygenic risk scores and ALSPAC genetic principal components (PCs) were imported which were generated PRSice2.
Data is coded according to participant age - 7yrs ("stage3"), 9yrs ("stage4"), 11yrs ("stage5), 13yrs ("stage6"), 15yrs ("stage7"), 17yrs ("stage8") and 24yrs ("stage9"). Extreme outlier values (greater than three times the interquartile range) were removed
Descriptive statistics for the cohort were generated and histograms for continuous variables were inspected
Linear and logistic regression analysis with and without covariates was undertaken and comprises:
- Association between JIA PRS and positive/negative control variables using an unadjusted model, or models adjusted for genetic PCs, genetic PCs/age and genetic PC/age/sex.
- Association between JIA PRS and cardiovascular phenotypes at age 24yrs
- Sensitivity analyses:
- Association between JIA PRS and cardiovascular phenotypes at age 24yrs with MHC removal
- Association between JIA PRS and cardiovascular phenotypes at age 24yrs with participants with autoimmune disorders excluded
- Association between JIA PRS and cardiovascular phenotypes at age 24yrs using PRS scores with different P value thresholds
- Longitudinal analysis of the association between JIA PRS and cardiovascular variables from age 7yrs to age 24yr