Abstract
Distinguishing Pneumocystis jirovecii pneumonia (PJP) from colonization (PJC) is crucial due to overlapping symptoms but different treatments. This study aims to evaluate whether peripheral blood parameters can serve as a non-invasive tool for distinguishing PJP from PJC. We retrospectively enrolled 174 patients with PJP and 61 with PJC from the First Affiliated Hospital of Sun Yat-sen University (April 2022–March 2024). Peripheral blood parameters were analyzed and compared between groups. Normally distributed variables were assessed using Student’s t-test, while non-parametric data were analyzed with the Wilcoxon rank-sum test. A diagnostic model was subsequently developed based on significant hematological indicators. Utilizing a significance threshold of p < 0.05, red blood cell (RBC) and lymphocyte percentage (Lym%), while excluding neutrophil percentage (Neu%), procalcitonin (PCT), and lactic dehydrogenase (LDH) were used to build a random forest diagnostic model. The optimal XGBoost model achieved an AUC of 0.9991 internally and 0.787 in external validation. A web-based tool was developed to assist diagnosis. The findings of this study offer an effective tool for clinical practice, enabling physicians to accurately diagnose and differentiate between PJP and PJC, guiding appropriate treatment for patients.
Similar content being viewed by others
Acknowledgements
Not applicable.
Funding
This work is funded by Guangdong Provincial Center for Disease Control and Prevention Supports Talent Projects (0720240122); Noncommunicable Chronic Diseases-National Science and Technology Major Project (2024ZD0533100 & 2024ZD0533106); Basic and Applied Basic Research Foundation of Guangdong Province (2023A1515012526 & 2024A1515012332).
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Ethical approval
Not applicable.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Ye, Q., Xiang, B., Pan, J. et al. A diagnostic model for discrimination between Pneumocystis jirovecii pneumonia and colonization based on multiple parameters. Sci Rep (2026). https://doi.org/10.1038/s41598-026-48520-4
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-48520-4


