Machine learning model for differentiating Pneumocystis jirovecii pneumonia from colonization and analyzing mortality risk in non-HIV patients using BALF metagenomic sequencing

Authors:

Abstract
To identify predictors and risk factors for Pneumocystis jirovecii pneumonia (PJP) in non-HIV immunocompromised patients. Retrospective analysis of 301 non-HIV patients with P. jirovecii in bronchoalveolar lavage fluid (BALF) using metagenomic next-generation sequencing (mNGS) identified PJP (n = 161) and P. jirovecii colonization (PJC, n = 140) groups, evaluated XGBoost for prediction, applied SHAP for insights, and assessed 28-day mortality risks. We assessed five machine learning algorithms, selecting XGBoost as the final predictive model, and applied SHapley Additive exPlanations (SHAP) analysis for interpretability. We assessed 28-day mortality risks. and performed subgroup survival analyses. The XGBoost model achieved an area under the curve (AUC) of 0.9000 in distinguishing PJP from PJC. Key predictors included serum (1–3)-β-D-glucan (BDG) levels, log-transformed reads for P. jirovecii, CD4+ T cell count, and respiratory support. Significant risk factors for 28-day mortality in PJP patients included the use of decreased PaO2/FiO2 ratios (final OR: 0.98, P < 0.001), lower platelet counts (final OR: 0.98, P = 0.057), lower CD3+ (final OR: 0.99, P = 0.034), as was a lower CD4+ T cell count (final OR: 0.98, P = 0.023). Patients with immune-mediated diseases had the worst survival rates. Corticosteroids failed to improve survival, regardless of patients having good or poor oxygenation status. Co-infections, particularly those with multiple pathogens, were associated with the most adverse outcomes. The study underscores mNGS for P. jirovecii detection, XGBoost’s effectiveness in PJP differentiation, and the importance of identifying predictors and mortality risks in clinical management, noting worse outcomes in immune-mediated disease patients and co-infections, with corticosteroids not improving survival.
Funding Information
  • 1.3.5 project for disciplines of excellence (No. ZYJC21007)
  • 1.3.5 Project of High Altitude Medicine (No. GYYX24003)
  • 1.3.5 Project for Artificial Intelligence (No. ZYAI24039)
  • West China Hospital, Sichuan University , Key Research and Development Program of Sichuan Province (No. 2023YFS0031)
  • National Natural Science Foundation of China (No. 82370192, U24A20680)
  • West China Hospital, Sichuan University, National Key Research and Development Program of China (No. 2022YFC2502600, 2022YFC2502603)

This publication has 40 references indexed in Scilit: