TL;DR
This paper introduces pyPheWAS Explorer, a user-friendly, interactive visualization tool that simplifies the complex process of phenome-wide association studies (PheWAS) using electronic health records (EHRs). It addresses the current lack of accessible tools by providing a graphical interface for data exploration, model building, and result interpretation, making PheWAS more approachable for researchers.
What Problem Does This Paper Address?
Phenome-wide association studies (PheWAS) are powerful for uncovering associations between genetic variants or medical conditions and a wide range of phenotypes derived from electronic health records (EHRs). However, existing PheWAS tools often require significant command-line expertise and lack integrated visualization for the entire analysis pipeline, from input assessment to final results. This creates a steep learning curve and hinders researchers, especially those new to PheWAS or who prefer visual exploration. The paper aims to bridge this gap by offering an intuitive, end-to-end graphical interface that democratizes PheWAS analysis.
Methods
The pyPheWAS Explorer workflow is divided into three main phases:
- Input and Preprocessing: This phase automatically handles the transformation of longitudinal EHR data into phenotype feature matrices. It maps ICD codes to a standardized set of 1866 "PheCodes" and then aggregates these PheCodes for each patient using one of three methods:
- Binary Aggregation: Indicates the presence (1) or absence (0) of a PheCode.
- Count Aggregation: Records the total number of occurrences of a PheCode.
- Duration Aggregation: Measures the time span over which a PheCode was present.
- Model Building: This interactive phase allows users to select their target variable (e.g., a disease or genetic variant) and potential covariates from their demographic data. Crucially, it provides tools to:
- Examine Individual Variables: Visualize distributions and correlations of potential variables with the target.
- Compare Paired Variables: Assess inter-covariate relationships using joint distributions and statistical tests to check for independence, a key assumption for regression models.
- Select Aggregation Method: Choose between binary, count, or duration aggregation for PheCodes.
- Specify Regression Type: The tool automatically selects logistic regression for binary outcomes and linear regression for count or duration outcomes.
- Model Evaluation: After running the PheWAS model, users are presented with three linked visualizations for interpreting the results:
- Volcano Plot: Provides an overview of effect size versus statistical significance for all PheCodes.
- Effect Size Plot: Displays PheCode-target associations for PheCodes exceeding a selected significance threshold (Bonferroni or FDR), color-coded by PheCode category.
- Data Table: Offers detailed information including PheCode category, regression coefficient, P-value, and subject counts, sorted by significance.
The novelty lies in the integrated, interactive graphical interface that allows users to explore inputs, build models with covariate selection and assumption checking, and visualize results all within a single tool.
Datasets
The paper uses a deidentified EHR dataset from the Vanderbilt University Medical Center's Synthetic Derivative for their case study. This dataset includes 3487 attention deficit hyperactivity disorder (ADHD) subjects, identified by specific ICD-9-CM and ICD-10-CM codes, matched one-to-one with non-ADHD controls based on biological sex and minimum age at visit. A synthetic dataset was also used for performance benchmarking, as detailed in the supplementary material.
Key Insights and Ideas
- Democratizing PheWAS: The core idea is to make complex PheWAS analysis accessible to a broader audience, including clinical experts and researchers who may not be proficient in command-line tools.
- Interactive Exploration is Key: The tool emphasizes interactive exploration at every stage, from understanding demographic variable distributions to examining covariate independence and visualizing PheWAS results.
- Covariate Assumption Checking: The ability to visually and statistically assess the independence of covariates before building the PheWAS model is a significant advantage, helping to avoid model biases.
- Uncovering Novel Associations: The case study demonstrated that
pyPheWAS Explorercould reveal known ADHD comorbidities and also highlight potentially less obvious associations (e.g., dermatologic, endocrine/metabolic, and respiratory conditions) that warrant further investigation, especially when using duration aggregation.
Key Results
- The
pyPheWAS Explorersuccessfully identified known comorbidities of ADHD, such as anxiety disorder, mood disorders, and pervasive developmental disorders, in their case study. - The tool also highlighted potentially novel associations with conditions like acne, abnormal weight gain, and bronchitis, which remained significant even when considering the duration of the phenotype.
- Performance benchmarks showed reasonable startup times (around 56 seconds for building feature matrices on the ADHD cohort) and very fast processing for variable comparisons (around 5 seconds) and binary PheWAS regressions (around 105 seconds), indicating efficiency for exploratory analysis.
Limitations and Future Work
- Data Preparation: The authors acknowledge that preparing EHR data for the Explorer is not trivial and still requires some command-line familiarity for the underlying
pyPheWASpackage. - Reproducibility: Extending an analysis to a new dataset currently requires reloading and repeating steps, which could be improved for better reproducibility.
- User-Centered Evaluation: The authors suggest that a formal user-centered evaluation is needed to further assess the tool's practical efficacy.
- Future Directions: The paper suggests packaging
pyPheWAS Explorerinto a standard application to enable non-technical clinical experts to easily interact with PheWAS models. They also envision its deployment in institutional EHR repositories for data exploration and hypothesis generation.
Summary updated