Skip to content
zeroknowledgediscoveryPublic

About

Major Adverse Transplant Event

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MATE: Major Adverse Transplant Episode

This repository contains the analysis and manuscript materials for the Major Adverse Transplant Episode (MATE) after lung transplantation.

MATE definition used in the manuscript

For the current Epic COSMOS analysis, MATE is present if any of the following occurs within the first year after lung transplantation:

  1. Retransplantation within 365 days of the index lung transplant.
  2. Index transplant hospitalization >90 days.
  3. Any dialysis/hemodialysis during days 91–365.
  4. At least 4 unplanned inpatient readmissions through day 365.
  5. 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.

State-level analysis

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.

Regenerate the manuscript figure

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 all

Dependencies:

pip install numpy pandas scipy matplotlib geopandas

The 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.

Publication figure outputs

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.

About

Major Adverse Transplant Event

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages