This repository contains the analysis and manuscript materials for the Major Adverse Transplant Episode (MATE) after lung transplantation.
For the current Epic COSMOS analysis, MATE is present if any of the following occurs within the first year after lung transplantation:
- Retransplantation within 365 days of the index lung transplant.
- Index transplant hospitalization >90 days.
- Any dialysis/hemodialysis during days 91–365.
- At least 4 unplanned inpatient readmissions through day 365.
- Oxygen dependence / oxygen DME evidence on or after day 90.
This is the single MATE definition used in the current manuscript. Death is not included in the present COSMOS EHR phenotype because mortality ascertainment is not sufficiently reliable in this data source; the manuscript treats incorporation of death as part of future clinical validation.
The state-level source data are in:
state_mate_counts.csv
The publication figure is generated by:
make_mate_figure_publication.py
The script produces:
- Panel A: raw state-level MATE prevalence choropleth.
- Panel B: empirical-Bayes hierarchical beta-binomial state estimates with 95% posterior intervals.
- Red leader arrows for PA, TX, KY, and SC.
- The fitted state mean, between-state SD, rho, and model AIC comparison.
From the repository root:
python make_mate_figure_publication.py \
state_mate_counts.csv \
--outdir PLOTS_publication \
--stem MATE_geography_publication \
--font-scale 1.10 \
--state-labels allDependencies:
pip install numpy pandas scipy matplotlib geopandasThe script downloads and caches the official 2024 U.S. Census state-boundary file on first use. A local boundary ZIP can instead be supplied with --state-boundaries.
The retained publication files are:
PLOTS_publication/MATE_geography_publication.png
PLOTS_publication/MATE_geography_publication.pdf
PLOTS_publication/MATE_geography_publication.svg
Older exploratory figure scripts and intermediate plot copies are intentionally not retained.