Machine learning model for differentiating Pneumocystis jirovecii pneumonia from colonization and analyzing mortality risk in non-HIV patients using BALF metagenomic sequencing
Open Access
- 1 October 2025
- journal article
- research article
- Published by Springer Nature in BMC Infectious Diseases
- Vol. 25 (1) , 1-14
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.Keywords
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:
- Consensus guidelines for diagnosis, prophylaxis and management of Pneumocystis jirovecii pneumonia in patients with haematological and solid malignancies, 2014Internal Medicine Journal, 2014
- Incidence of Pneumocystis jiroveci Pneumonia among Groups at Risk in HIV-negative PatientsThe American Journal of Medicine, 2014
- Pneumocystis jiroveci pneumonia in immunocompromised patients: Delayed diagnosis and poor outcomes in non-HIV-infected individualsJournal of Microbiology, Immunology and Infection, 2014
- Pneumocystis Pneumonia in Patients Treated With RituximabChest, 2013
- Pneumocystis jiroveci Pneumonia: High-Resolution CT Findings in Patients With and Without HIV InfectionAmerican Journal of Roentgenology, 2012
- Outcomes of Moderate-to-Severe Pneumocystis Pneumonia Treated with Adjunctive Steroid in Non-HIV-Infected PatientsAntimicrobial Agents and Chemotherapy, 2011
- Quantitative PCR to diagnosePneumocystispneumonia in immunocompromised non-HIV patientsEuropean Respiratory Journal, 2011
- Blood (1->3)- -D-Glucan as a Diagnostic Test for HIV-Related Pneumocystis jirovecii PneumoniaClinical Infectious Diseases, 2011
- Clinical Utility of Serum .BETA.-D-Glucan and KL-6 Levels in Pneumocystis jirovecii PneumoniaInternal Medicine, 2009
- Pneumocystis jirovecii colonisation in patients with interstitial lung diseaseClinical Microbiology and Infection, 2006