Genetic dyslipidemia

A Multimodal, Explainable Dyslipidemia Risk Workbench: Synthetic Polygenic–Monogenic Integration, Tendon Phenotype, and Interactive Web Deployment

A Multimodal, Explainable Dyslipidemia Risk Workbench: Synthetic Polygenic–Monogenic Integration, Tendon Phenotype, and Interactive Web Deployment

Summary

This multimodal research workbench explores 10-year ASCVD risk by uniquely integrating conventional clinical factors with polygenic risk scores, monogenic variant flags, and Achilles tendon phenotype metrics (e.g., thickness and xanthoma presence). Utilizing an explainable XGBoost model trained on a simulated dyslipidemia cohort, the project generates both global and patient-level SHAP values to elucidate complex risk architectures. An interactive web dashboard, powered by a FastApi backend, empowers users to visualize therapeutic trajectories, explore personalized risk fingerprints, and dynamically recalculate clinical outcomes on-demand.

Abstract

Background: Familial hypercholesterolemia (FH) and related dyslipidemias arise from both monogenic variants and polygenic burden, with Achilles tendon xanthomas and tendon thickening serving as clinically important but underused phenotypes for risk assessment. Recent work also shows that polygenic risk scores (PRS) for coronary artery disease (CAD) and LDL cholesterol modulate risk even among FH carriers, yet practical, interpretable tools that combine clinical, genetic, and tendon data remain rare. Parallel advances in machine learning (ML) and SHapley Additive exPlanations (SHAP) have improved risk prediction interpretability in cardiovascular medicine.

Objective: To design and implement an end-to-end, research-oriented workbench that (1) simulates a multimodal dyslipidemia cohort (clinical, polygenic, monogenic, tendon phenotype), (2) trains an explainable ML model for 10-year ASCVD risk, and (3) delivers interactive web-based visual analytics and a live API suitable for translational research and health informatics prototyping.

Methods: We constructed a synthetic “cardio_synthetic_multimodal” dataset with 27 features, including age, body mass index (BMI), blood pressure, categorical lipids and glycemia, lifestyle factors, binary flags for typical FH genes (LDLR, APOB, PCSK9, LPL, LMNA), four PRSs (LDL, triglycerides, apolipoprotein B, CAD), counts of pathogenic and VUS variants, and Achilles tendon measures (thickness, softness score, fat fraction, xanthoma presence). A binary 10-year ASCVD outcome was simulated. We split into training/validation/test sets, fitted an XGBoost classifier, and quantified performance via AUROC. Global and patient-level SHAP values were calculated. LDL and triglyceride therapy trajectories were simulated under three treatment scenarios. A FastAPI backend serving the trained model was containerized with Docker and deployed to Render.com; a SvelteKit + Chart.js frontend consumed cohort and patient JSON exports and called the live API for on-demand recalculation.

Results: The gradient boosting model achieved AUROC ≈ 0.81 on validation and ≈ 0.80 on test data, indicating good discrimination in the synthetic setting. Global SHAP values showed systolic blood pressure, age, diastolic blood pressure, and cholesterol category as among the most influential features, with non-trivial contributions from PRSs and Achilles tendon measurements. Patient-level SHAP plots and radar “risk fingerprints” highlighted individualized risk architecture. Therapy trajectory charts illustrated LDL and triglyceride responses to intensification strategies. The deployed API allowed live recalculation of risk from the browser, with latency up to ~20–50 seconds on Render’s free tier due to cold starts.

Conclusions: This project delivers a complete, reproducible template for integrating monogenic and polygenic risk, tendon phenotype, and explainable ML into an interactive web environment. While based on synthetic data and not clinically validated, the stack and patterns are directly reusable for real FH/dyslipidemia cohorts, multicenter PRS studies, or tendon-imaging registries, and can support method development in cardiovascular risk modeling, translational informatics, and decision support.

1. Hypothesis and Objectives

Hypothesis
A multimodal model that jointly ingests:
· conventional clinical risk factors,
· polygenic risk scores for lipids and CAD,
· monogenic FH-like variant flags, and
· quantitative Achilles tendon metrics
can (a) reproduce plausible risk patterns in a synthetic dyslipidemia cohort, (b) be made interpretable via SHAP, and (c) be exposed through an interactive web interface in a way that is directly extensible to real-world research data.

Primary objectives

  1. Construct a synthetic but biologically plausible dyslipidemia/ASCVD risk dataset that encodes clinical, polygenic, monogenic, and tendon phenotypes.
  2. Train an explainable gradient boosting model (XGBoost) for 10-year ASCVD risk and quantify performance.
  3. Derive global and patient-level SHAP explanations and integrate them into interactive visual analytics.
  4. Implement therapy-trajectory simulations for LDL-C and triglycerides to visualize treatment scenarios.
  5. Deploy the model via a FastAPI + Docker + Render.com backend and a SvelteKit + Chart.js frontend, enabling live, interactive exploration.

2. Background

2.1 Dyslipidemia, familial hypercholesterolemia, and tendon xanthomas

Familial hypercholesterolemia (FH) is a common genetic disorder of LDL-cholesterol metabolism driven by variants in genes such as LDLR, APOB, and PCSK9, and sometimes LPL and LMNA. Tendon xanthomas, especially of the Achilles tendon, are a classic sign of FH and are strongly associated with markedly elevated LDL-C and increased cardiovascular risk. Ultrasonography-based Achilles tendon thickness (ATT) and “softness” have emerged as non-invasive markers for diagnosis and risk assessment, and changes in ATT may track response to LDL-lowering therapy.

Despite this, Achilles tendon imaging is not uniformly implemented across guidelines, and FH remains underdiagnosed. This motivates methodological and tooling work to better represent tendon phenotype alongside genetic and traditional risk factors.

2.2 Polygenic risk and interaction with LDL-C

Recent large-scale biobank studies show that the risk associated with LDL-C is modulated by polygenic risk: individuals with high PRS for CAD may experience greater event rates for the same LDL exposure than those with low PRS. Scientific statements now describe PRS as potentially useful for stratifying CAD risk and informing preventive strategies, though clinical implementation remains early.

2.3 Machine learning and SHAP in cardiovascular risk prediction

Several recent studies have used ML models (e.g., gradient boosting, random forests, support vector machines) to predict cardiovascular outcomes and then applied SHAP to interpret feature contributions. These works show that SHAP can highlight key predictors such as chronic kidney disease, hypertension, sedentary time, and biochemical markers, enabling interpretable risk stratification.

However, most models do not integrate tendon imaging features or explicit monogenic vs polygenic labels. The present project focuses not on novel clinical findings but on architecting a reusable, transparent system that would be appropriate for such integrated analyses when real data are available.

3. Methods

3.1 Data schema and simulation

We defined a 27-feature schema with the following groups:

Clinical and lifestyle
· age_years
· bmi (kg/m²)
· sbp_mmHg, dbp_mmHg
· cholesterol_cat (ordinal category for LDL-C)
· glucose_cat (glycemic category)
· smoking_status (binary or ordinal)
· alcohol_intake (ordinal)
· physical_activity (ordinal)

Monogenic variant flags and variant counts
· has_ldlr_p_lp
· has_apob_p_lp
· has_pcsk9_p_lp
· has_lpl_p_lp
· has_lmna_p_lp
· n_pathogenic_variants_dyslipidemia
· n_vus_dyslipidemia

Polygenic risk scores (z-scores)
· prs_ldl_z
· prs_tg_z
· prs_apob_z
· prs_cad_z

Achilles tendon phenotype
· achilles_thickness_mm
· achilles_softness_score
· achilles_fat_fraction_pct
· achilles_xanthoma_present

Outcome
· has_cvd (binary label: approximate 10-year ASCVD event status, simulated)

A synthetic dataset (cardio_synthetic_multimodal.csv) was created such that distributions loosely resemble real-world dyslipidemia populations (e.g., higher LDL-C and Achilles thickness in monogenic flag carriers; positive correlation between PRS and lipid traits), but without using any real patient data.

3.2 Model development

We split the dataset into training, validation, and test partitions, and trained a gradient boosting model (XGBoost) with standard hyperparameters chosen for stability rather than aggressive optimization. A simplified version of the training code is:

Observed performance in the synthetic cohort:
· Validation AUROC ≈ 0.81
· Test AUROC ≈ 0.80

These values quantify internal discrimination on the simulated data and are not indicative of clinical performance.

3.3 Explainability: global and patient-level SHAP

We applied TreeExplainer from the SHAP library to the trained XGBoost model:

Per-patient SHAP summaries (top K features by |SHAP| value) were stored into each patient JSON:

Global feature importances (mean |SHAP|) and patient-level SHAP lists were exported in cohort_summary.json and patients/.json.

3.4 Simulation of LDL-C and TG therapy trajectories

To create longitudinal structure, we simulated LDL-C and triglyceride trajectories at months 0, 3, 6, 12, 24, and 36 for three therapy scenarios:

  1. Current therapy
  2. High-intensity statin
  3. High-intensity statin + PCSK9 inhibitor

Baseline LDL and TG were functions of cholesterol category, BMI, PRSs, and monogenic variant counts, plus noise. We then applied multiplicative therapy factors over time to model pharmacodynamic response:

These simulated curves are conceptual and meant to visually mimic expected therapeutic effects in a teaching / prototyping context, not to represent empirical dose-response data.

3.5 Backend: FastAPI, model loading, and CORS

We implemented a minimal FastAPI backend that loads the pickled model (xgb_risk_model.pkl) and exposes a /predict endpoint. The key code fragment:

The backend is containerized via Docker and deployed to Render.com. Cold starts on the free tier can add 20–50 seconds of latency when the service has been idle.

3.6 Frontend: SvelteKit + Chart.js dashboard

The frontend uses SvelteKit and Chart.js as follows:
· Static JSON files under static/data/json/cohort/ and …/patients/ provide cohort-level summaries and patient-level inputs/outputs.
· Chart.js components in src/lib/components/charts/Genetic_dyslipidemia/ render:
· Global SHAP (Figure 1)
· Risk distribution histogram (Figure 2)
· Polygenic vs monogenic scatter (Figure 3)
· Monogenic vs polygenic bar chart (Figure 4)
· Achilles thickness histogram (Figure 5)
· Achilles thickness vs CVD status scatter (Figure 6)
· Patient risk fingerprint radar (Figure 7)
· Patient-level SHAP bar chart (Figure 8)
· LDL-C trajectories (Figure 9)
· TG trajectories (Figure 10)

A simplified Svelte + Chart.js pattern:

3.7 Tech stack summary

Data and ML
· Python 3.11
· Google Colab Pro (runtime)
· pandas, numpy, scikit-learn
· xgboost
· shap

Backend and deployment
· FastAPI
· Uvicorn
· joblib
· Docker
· Render.com (Docker Web Service, free tier)

Frontend and visualization
· SvelteKit
· mdsvex / .svx content integration
· Chart.js (multiple chart types, pastel palette, outlined markers)

4. Results

Genetic Dyslipidemia Risk Explorer

Global Feature Importance (SHAP)

Risk Distribution

Polygenic vs Monogenic Patterning

LDL trajectories by therapy (simulated)

Achilles tendon thickness distribution (cohort)

CVD vs Achilles Tendon Thickness (Cohort)

Monogenic vs Polygenic Count (Cohort)

4.1 Model performance in the synthetic cohort

The XGBoost model achieved:
· Validation AUROC ≈ 0.8065
· Test AUROC ≈ 0.7963

These values reflect good discrimination on the simulated multimodal feature space. Calibration was not extensively tuned in this synthetic version; further work could add isotonic or Platt scaling if applied to real data.

4.2 Global feature importance and tendon phenotype

Mean |SHAP| values showed:
· sbp_mmHg with the largest contribution (≈0.82 in the normalized SHAP scale in this run)
· age_years as the next major driver
· dbp_mmHg, cholesterol_cat, and BMI as notable contributors
· PRS variables (prs_ldl_z, prs_tg_z, prs_apob_z, prs_cad_z) with small but non-zero influence
· Achilles tendon thickness, softness score, and fat fraction contributing at a similar magnitude to some PRSs
· Monogenic indicator flags with relatively small global SHAP values, reflecting their low prevalence but potentially strong effects in specific individuals

[Figure 1. Global Feature Importance (Mean |SHAP| Values) – placeholder]

4.3 Risk distribution and genetic architecture

The risk histogram (Figure 2) shows a right-skewed distribution with most synthetic individuals at low to intermediate predicted risk and a smaller tail at high risk.

The polygenic vs monogenic scatter (Figure 3) plots PRS LDL-C vs BMI, visually separating monogenic carriers (pastel red with dark red outline) from polygenic/mixed individuals (pastel blue). In the synthetic design, monogenic carriers tend to cluster at higher LDL PRS and higher BMI, mimicking a “double hit” scenario, though this pattern is not calibrated to any specific biobank.

The monogenic vs polygenic bar chart (Figure 4) summarizes how many individuals in the synthetic cohort fall into each genetic architecture category, using color theming consistent with Figure 3.

4.4 Tendon xanthoma-like phenotype and CVD status

Achilles tendon thickness histogram (Figure 5) demonstrates the spread of tendon measurements; the simulation allows overlapping ranges between monogenic and polygenic individuals so the figure resembles real-world ambiguity, where cutoff values are debated.

The Achilles thickness vs CVD status scatter plot (Figure 6) presents binary CVD outcome on the y-axis and tendon thickness on the x-axis. In the synthetic model, higher thickness is probabilistically associated with higher CVD incidence, aligning with observational findings that tendon xanthomas correlate with increased cardiovascular risk in FH.

4.5 Patient-level explanations and risk fingerprints

For an individual patient (e.g., “PT_559811”), the radar chart (Figure 7) overlays key clinical, genetic, and tendon dimensions to visualize the personalized risk profile. The corresponding SHAP bar chart (Figure 8) lists the top 6 features ranked by absolute SHAP value; bars pointing right (positive SHAP) increase risk, while bars pointing left (negative SHAP) decrease it. This combination of structural and explanatory views can support case-based discussions.

4.6 Therapy trajectory simulation

The LDL-C trajectory chart (Figure 9) displays time-course simulations under three therapy scenarios; curves for high-intensity statin plus PCSK9 inhibitor show the largest sustained LDL decline, matching what is reported in interventional FH literature (conceptually, not numerically).

The TG trajectory chart (Figure 10) shows analogous trends for triglycerides. Here, baseline TG is driven more strongly by BMI, PRS_TG, and noise, illustrating that even synthetic models can be used to stress-test analytical pipelines that will later ingest real pharmacodynamic data.

4.7 Live API interaction and latency

A “Recalculate via API” section in the Svelte dashboard uses the following pattern:

From the UI, pressing the button sends the patient’s current clinical, genetic, and tendon feature set to the Render-hosted API. On the free tier, cold starts can introduce 20–50 seconds of delay; this is explicitly documented in the UI info box. Once the response arrives, the recalculated probability and risk class are displayed, and the user can visually interpret the new risk in the context of Figures 1, 7, 8, 9, and 10.

5. Discussion

5.1 Relation to current literature

The synthetic model architecture mirrors several contemporary research themes:
· Use of Achilles tendon imaging (thickness, elasticity, calcification) as a diagnostic and risk tool in FH.
· Importance of tendon xanthomas and tendon thickening as specific markers of severe dyslipidemia and elevated cardiovascular risk.
· Integration of polygenic risk scores into coronary artery disease risk assessment and clinical decision-making.
· Application of ML models with SHAP explanations in cardiovascular prediction tasks, improving interpretability and enabling identification of key modifiable risk factors.

The present system does not introduce new biological findings; rather, it builds a full technology stack that is consistent with these trends and ready to be attached to real datasets.

5.2 Utility as a research and informatics workbench

Because all inputs, transformations, and visualizations are explicit and code-driven, the system is suitable for:
· Rapid prototyping of new feature sets (e.g., adding coronary artery calcium scores, liver fat fraction, or medication adherence metrics).
· Testing alternative model classes (e.g., LightGBM, neural networks, survival models) while retaining the same SHAP and visualization layers.
· Evaluating new tendon imaging measures (e.g., elastography-based stiffness, ultrasound texture features) by plugging in additional columns.
· Experimenting with PRS definitions (different SNP panels, ancestry-specific scores) and observing their SHAP profiles and impact on risk trajectories.

5.3 Potential applications in health informatics

In health informatics, such a system can serve as:
· A sandbox for developing clinical dashboards that combine structured EHR fields, genetic data, and imaging-derived phenotypes.
· A didactic tool for explaining to clinicians how monogenic FH, polygenic burden, and tendon xanthomas interact to shape risk.
· A testbed for policy or workflow prototypes in which PRS and tendon imaging are incorporated into routine care, as explored in recent PRS implementation studies.

Because the model is exposed via an API and the front-end is static and portable, the same pattern could be reused within hospital networks (with appropriate security and privacy controls) or research collaborations to visualize cohort-level genetic architecture and individualized explanations.

5.4 Limitations

Key limitations include:
· Entirely synthetic data: no real patient data were used, so performance metrics and visual distributions are illustrative only.
· Simplified outcome: the binary CVD label is not derived from time-to-event data, competing risks, or multi-endpoint models.
· Simplified therapy trajectories: LDL-C and TG curves are mechanistic cartoons, not fitted to actual pharmacodynamic series.
· No external validation: the system architecture is general, but any real-data deployment would require rigorous validation, calibration, and bias assessment.
· No privacy/security modeling: the current deployment uses a public API endpoint and is meant for demonstration; real clinical deployments would need strict access controls, logging, and compliance with regulatory frameworks.

Despite these limitations, the core value lies in the architecture: once connected to real FH registries, tendon imaging cohorts, or PRS-enriched biobanks, the same code paths can be used for genuine analysis.

6. Why this model and stack are useful

6.1 For translational and clinical research

· Provides a ready-made template for multimodal risk modeling that aligns with how FH and dyslipidemias are actually investigated (clinical + genetics + tendon imaging).
· Enables patient-level explanation via SHAP, which is increasingly recommended for high-stakes ML models in healthcare.
· Supports what-if exploration: researchers can perturb BMI, blood pressure, PRS values, or tendon thickness in the JSON and see how risk and SHAP patterns change.
· Can be extended to include treatment sequences, adherence patterns, or lipid-lowering intensity scores, supporting comparative effectiveness and decision aid research.

6.2 For health informatics and decision support prototyping

· Demonstrates how to integrate a Python ML model with a production-like API and a modern web frontend using SvelteKit and Chart.js.
· Shows how to build explainable dashboards that clinicians can interact with, including risk fingerprints, SHAP bars, and therapy trajectories.
· Offers a pattern for deploying in a low-cost environment (Render.com), useful for early-stage informatics projects and academic prototypes.
· The explicit CORS configuration and JSON schema make integration with other systems (e.g., FHIR-based backends, EHR sandboxes) feasible with modest effort.

6.3 Educational value

· Can be used in graduate courses or workshops to illustrate:
· Data engineering for multimodal clinical genetics
· ML model training and evaluation (AUROC, SHAP)
· API deployment with Docker + FastAPI
· Frontend integration and visualization design for biomedical data

Students and trainees can replace the synthetic CSV with anonymized real datasets and follow the same pipeline.

7. Conclusions

We implemented an end-to-end, explainable dyslipidemia risk workbench that unifies clinical variables, polygenic risk scores, monogenic variant flags, and Achilles tendon phenotype into a single synthetic dataset; trains an XGBoost model with SHAP-based interpretability; simulates LDL-C and triglyceride therapy trajectories; and delivers all outputs through an interactive SvelteKit + Chart.js frontend backed by a FastAPI model server deployed on Render.

Although the present implementation uses only synthetic data and is not suitable for clinical use, the architecture, code structure, and interaction patterns are directly applicable to real-world FH and dyslipidemia studies, cardiovascular genetic registries, and health-informatics dashboards seeking to integrate imaging, genetics, and machine learning.

This model and stack are therefore useful as:
· A research scaffold for integrated polygenic–monogenic–tendon risk modeling.
· A health informatics prototype for explainable, API-driven clinical dashboards.
· An educational platform for training the next generation of clinicians, bioinformaticians, and data scientists in responsible, interpretable cardiovascular ML.


© Balaji Ramanathan