Separating the genetics of disease, treatment and treatment response using graphical modeling and large-scale electronic health records

Małgorzata Borczyk, Nick Machnik, Jacek Hajto, I. Krätschmer, Paula Konowalska, Bartosz Baszkiewicz, Michał Korostyński, Matthew R. RobinsonmedRxiv 2025 · DOI

Abstract Genetic variants affect baseline health and biomarker values, which in turn impact both the therapy selected for an individual and the magnitude of change induced by the medication. Here, we propose an approach for complex longitudinal repeated measures biobank data, which separates genetic effects for disease from the genetic effects for medication usage and those for treatment response. For 211,845 individuals, we construct a pre-post study design from 1,420,443 repeated blood pressure (BP) measurements and 1,117,900 prescription records for common BP influencing drugs, using electronic health records. We model these jointly alongside 8,430,446 imputed single nucleotide polymorphism (SNP) markers and 17,852 whole-exome sequence loss-of-function (LoF) variants, all within a single novel graphical modeling framework. We identify pharmacogenetic candidate SNPs and LoF variants in genes SLC35F2, PKD1 and KCNIP4 , which are associated with angiotensin receptor blocker therapy and response after controlling for hypertensive disease status. We additionally detect and replicate established clinically relevant variants for statin treatment across multiple biobanks. We find that genetic variation for BP is predominantly shaped prior to the age of 50, but that hundreds of independent loci associate with age-specific BP changes through life. Finally, once post-treatment measures are conditioned on pre-treatment measures and therapy, we find no evidence for genetic variants influencing treatment-response, despite power to detect a genetic variant that contributes > 0.017% of explained variance. Our graphical modeling and pre-post study design provides a robust way of detecting time-, treatment- and treatment response-specific genetic associations within large-scale biobank studies.

Introduction

In pharmacogenomics, identifying genetic variants that predict drug response is a primary objective. However, real-world data from Electronic Health Records (EHRs) present a significant challenge known as "triple entanglement." Genetic variants influence baseline disease status (e.g., hypertension), which in turn dictates treatment selection by clinicians. Simultaneously, genetics may also influence the actual physiological response to that treatment. Standard association studies often struggle to disentangle these factors, leading to ambiguity regarding whether a variant affects the disease, the treatment choice, or the response itself. This study introduces a novel graphical modeling framework to unmix these signals using large-scale longitudinal biobank data.

Methods

Graphical Modeling and CI-GWAS

The researchers developed an extension of the Conditional Independence GWAS (CI-GWAS) algorithm. This approach uses graphical modeling to test for conditional independence between genetic variants and traits across time. By ordering variables chronologically, the model can isolate specific effects. For example, to identify a genetic effect on treatment response, the algorithm tests the association between a SNP and a post-treatment measurement only after conditioning on the pre-treatment measurement and the specific therapy administered.

Longitudinal repeated measures design for blood pressure (BP) and treatment (Tx) across multiple time points.

Study Design and Data Integration

The study utilized data from 211,845 UK Biobank participants, incorporating 1,420,443 repeated BP measurements and 1,117,900 prescription records for six major drug classes (ACE inhibitors, ARBs, Beta-blockers, CCBs, diuretics, and statins). These phenotypic data were modeled alongside 8,430,446 imputed SNPs and 17,852 whole-exome sequence loss-of-function (LoF) variants. To integrate continuous BP data with binary prescription data, the authors employed heterologous correlation matrices, placing all variables on a comparable liability scale.

The graphical modeling framework used to test SNP-trait relationships conditioned on relevant prior variables.

Results

The "Response Mirage"

A striking finding of the study is the lack of evidence for common genetic variants influencing the magnitude of blood pressure change in response to medication. Once post-treatment measures were conditioned on baseline health and the assigned therapy, no significant response-specific SNPs were detected. This was despite the study having sufficient power to detect variants explaining as little as 0.017% of the variance, suggesting that treatment response for common cardio-metabolic drugs may be less genetically determined by common variants than previously hypothesized.

Genetics of Treatment Selection and Novel Candidates

While response-specific signals were elusive, the model identified several variants associated with the usage of specific drugs, independent of baseline BP. Novel pharmacogenetic candidates were identified in genes SLC35F2, PKD1, and KCNIP4, specifically associated with angiotensin receptor blocker (ARB) therapy. For instance, variants in KCNIP4 might relate to side effects that lead to medication switching. The robustness of the model was further validated by the successful detection and replication of known clinically relevant variants for statin treatment (e.g., in APOE, LDLR, and PCSK9) in both the UK Biobank and the FinnGen cohort.

Age-Specific Genetic Architecture

The analysis revealed that the genetic architecture of blood pressure is largely established before the age of 50, with SNP heritability remaining relatively stable across age groups (ranging from 0.179 to 0.190). However, the study identified hundreds of independent loci that specifically associate with age-related changes in BP, independent of the initial baseline, highlighting a dynamic genetic influence throughout the life course.

Discussion

This research demonstrates that graphical modeling and a pre-post study design can effectively separate the genetic components of disease, treatment, and response in large-scale biobank studies. The findings suggest that much of the perceived "response" in clinical data may actually be a reflection of baseline disease genetics and treatment selection bias. Future work using even larger datasets or focusing on rare variants may be necessary to uncover high-impact response mutations that common SNPs do not capture.

Summary updated

Abstract

Abstract Genetic variants affect baseline health and biomarker values, which in turn impact both the therapy selected for an individual and the magnitude of change induced by the medication. Here, we propose an approach for complex longitudinal repeated measures biobank data, which separates genetic effects for disease from the genetic effects for medication usage and those for treatment response. For 211,845 individuals, we construct a pre-post study design from 1,420,443 repeated blood pressure (BP) measurements and 1,117,900 prescription records for common BP influencing drugs, using electronic health records. We model these jointly alongside 8,430,446 imputed single nucleotide polymorphism (SNP) markers and 17,852 whole-exome sequence loss-of-function (LoF) variants, all within a single novel graphical modeling framework. We identify pharmacogenetic candidate SNPs and LoF variants in genes SLC35F2, PKD1 and KCNIP4 , which are associated with angiotensin receptor blocker therapy and response after controlling for hypertensive disease status. We additionally detect and replicate established clinically relevant variants for statin treatment across multiple biobanks. We find that genetic variation for BP is predominantly shaped prior to the age of 50, but that hundreds of independent loci associate with age-specific BP changes through life. Finally, once post-treatment measures are conditioned on pre-treatment measures and therapy, we find no evidence for genetic variants influencing treatment-response, despite power to detect a genetic variant that contributes > 0.017% of explained variance. Our graphical modeling and pre-post study design provides a robust way of detecting time-, treatment- and treatment response-specific genetic associations within large-scale biobank studies.
BibTeX
@misc{borczyk2025separating,
  author = {Małgorzata Borczyk and Nick Machnik and Jacek Hajto and I. Krätschmer and Paula Konowalska and Bartosz Baszkiewicz and Michał Korostyński and Matthew R. Robinson},
  title = {{Separating the genetics of disease, treatment and treatment response using graphical modeling and large-scale electronic health records}},
  year = {2025},
  doi = {10.1101/2025.04.29.25326633},
  howpublished = {medRxiv},
}
Figure