This repo contains the code of the paper Enhancing Risk Stratification in Aortic Stenosis Using Echocardiography and Artificial Intelligence.
Specifically, this part of the code corresponds to the implementation of the complete pipeline to produce clusters of one modality of PROGRESSA.
This folder performs clustering on the progressa dataset. We draw in this folder the hypothesis that phenotypes of the aortic stenosis are fixed and independent of time, thus any visit is sufficient to determine whether a patient belong to one phenotype or not. We follow the intuition that only the disease severity increases with time. Thus, we focus in this experiment to cluster the patients using only their first visit.
We assess the clustering model by measuring how accurate they are regarding the clustering of other visits. Indeed, as we seek a model that clusters well the phenotype differences between patient, we can expect the best model to be stable throughout all visits of a single patient.
In summary:
- What we do:
- Clustering of patient's first visit with assessment using other visits
- One clustering per dataset
- What we do not:
- Multiple cluster assignment per patient, only one is given
The same process is individually applied to different modalities of the PROGRESSA dataset. The possible modalities are:
- The main database from PROGRESSA (called
progressa_main) - The proteomics data from PROGRESSA (called
progressa_proteo) - The concatenation of the proteomics and main modalities (called
progressa_complete)
To process the complete pipeline of clustering for one given modality, a snakefile is proposed and can be used with:
snakemake all --cores all --configfile configs/config_of_your_choice -p
The configuration files are located in the configs folder. Each configuration file defines 3 parameters for the process:
dataset: one ofprogressa_main,progressa_proteo, andprogressa_complete(see modalities described above).min_clusters: The lower bound on the number of clusters to find.max_clusters: The upper bound on the number of clusters to findmax_runs: the number of clustering runs to operate on the dataset. This results inmax_rundifferent models per architecture/GEMINI. Currently, only MLPs and logistic regression are made with the OvA and OvO GEMINIs, so this results in 4xmax_runsmodels for a fixed number of clusters.
The current configuration files all produce 1 clustering per number of clusters ranging from 5 to 10 based on the consensus of 4 setups x 30 runs = 120 models.
Each setup corresponds to a specific Sparse GEMINI model: logistic regression or MLP architecture combined with OvA or OvO MMD-GEMINI.
Once this pipeline was executed, a second pipeline can be started to produce the figures from the the results. To that end, the same configuration file as in the initial process can be used. Only the Snakefile differs:
snakemake all --cores all --configfile configs/config_of_your_choice -p --snakefile Snakefile_analysis
We provide a supervised model trained on the final clusters obtained during the execution of the pipeline above for the modality progressa_main.
The script can be found in supervised_model/analysis.py. Usage:
usage: analyse.py [-h] [--path_to_model_folder PATH_TO_MODEL_FOLDER]
[--sex {0,1}] [--severity {1,2,3,4}]
[--valve_phenotype {2,3,4}] [--insulin INSULIN]
[--weight WEIGHT] [--mean_gradient MEAN_GRADIENT]
[--vpeak VPEAK] [--vti VTI] [--qmean QMEAN]
[--ratio_E_e RATIO_E_E] [--stroke_volume STROKE_VOLUME]
[--glycemia GLYCEMIA] [--lvotd LVOTD] [--crp CRP]
optional arguments:
-h, --help show this help message and exit
I/O:
--path_to_model_folder PATH_TO_MODEL_FOLDER
Binary variables:
--sex {0,1} The sex of the patient (0=female, 1=male)
Categorical variables:
--severity {1,2,3,4} The severity of the patient AS (1=mild, 2=moderate,
3=severe, 4=critical)
--valve_phenotype {2,3,4}
The phenotype of the patient aortic valve
(2=bicuspid, 3=tricuspid, 4=unknown)
Continuous variables:
--insulin INSULIN
--weight WEIGHT
--mean_gradient MEAN_GRADIENT
--vpeak VPEAK
--vti VTI
--qmean QMEAN
--ratio_E_e RATIO_E_E
--stroke_volume STROKE_VOLUME
--glycemia GLYCEMIA
--lvotd LVOTD
--crp CRP
This model expects as input a folder containing weights of the logistic regression to use. The appropriate weights will be used depending on the presence of the CRP variable. All weights are currently provided in the folder model_weights.
To get insights on how this model was trained, you can take a look at the jupyter notebook ``
This work has been supported by MITACS Globalink (IT25650), Canadian Institutes of Health Research (#FDN-143225 and MOP-114997), Foundation of the Québec Heart and Lung Institute, Fonds de Recherche du Québec en Santé (FRQS), France Health Data Hub (HDH), and institutional research funds held by Drs Droit and Precioso.