Skip to main content
Annals of Transplantation logoLink to Annals of Transplantation
. 2026 Mar 17;31:e952235. doi: 10.12659/AOT.952235

Development and Validation of a Machine Learning-Based Nomogram for Predicting Severe Pneumocystis jirovecii Pneumonia in Kidney Transplant Recipients

Shuo Wang 1,2,A,E, Chuanyou Xia 1,B,F, Yuchong Zhu 1,2,B,C, Guanbao Tang 1,D, Yunchao Wang 1,C, Lingquan Meng 1,F, Xiaoming Zhang 1,D, Jianning Wang 1,E, Jiwei Yang 1,A,E,✉
PMCID: PMC13005421  PMID: 41840841

Abstract

Background

Pneumocystis jirovecii pneumonia (PJP) is a life-threatening opportunistic infection in kidney transplant recipients (KTRs). Early identification of patients liable to progress to severe disease is critical for improving prognosis. This study aimed to construct and validate a machine learning-based nomogram for predicting the risk of severe PJP in KTRs using routine clinical indicators.

Material/Methods

A retrospective cohort of 169 KTRs diagnosed with PJP was analyzed. Severe PJP was defined as cases requiring intensive care unit (ICU) admission or death. The cohort was randomized into training (n=120) and testing (n=49) sets. Three machine learning algorithms (Boruta, RFE, and LASSO) were utilized for feature selection. A multivariate logistic regression model was established and visualized as a nomogram. Model performance was evaluated via area under the ROC curve (AUC), calibration plots, and decision curve analysis (DCA). Kaplan-Meier analysis was performed to assess risk stratification.

Results

Four key predictors were identified: procalcitonin (PCT), (1→3)-β-D-glucan (G_test), C-reactive protein (CRP), and the time from kidney transplantation to PJP onset (Time KT to PJP). Notably, shorter post-transplant time and elevated biomarkers were associated with greater severity. The nomogram demonstrated robust discrimination with AUCs of 0.935 (training) and 0.886 (testing), alongside excellent calibration. DCA confirmed a significant clinical net benefit. Furthermore, Kaplan-Meier analysis revealed that patients stratified as high-risk by the model had significantly lower survival rates compared to the low-risk group (P<0.0001).

Conclusions

We developed a practical nomogram incorporating 4 accessible indicators to accurately predict severe PJP in KTRs. This tool facilitates the early identification of high-risk patients, enabling timely, individualized interventions and the rational allocation of medical resources.

Keywords: Kidney Transplantation, Machine Learning, Nephrology, Nomograms, Pneumocystis jirovecii, Risk Assessment

Introduction

As the first-line treatment for end-stage renal disease, kidney transplantation (KT) greatly improves the survival and quality of life of patients. However, to avoid graft rejection, KTRs must take lifelong immunosuppressive therapy (usually including calcineurin inhibitors, antimetabolites, and glucocorticoids), which simultaneously induce profound and persistent impairment of cellular and humoral immunity [1,2]. This iatrogenic immunosuppressive state makes KTRs prone to many opportunistic infections. Among them, PJP has become one of the most common and fatal post-transplant diseases after KT [3]. PJP has an extremely slow onset, and fever, dry cough, progressive dyspnea, and hypoxemia are the main clinical manifestations. The disease develops rapidly, and critically ill patients are admitted to the ICU for treatment. The mortality rate can reach 50%. Although sulfonamide-based prophylaxis is widely used in clinical practice, some patients still developed breakthrough infections after discontinuation of prophylaxis or because of drug intolerance, which led to a poor prognosis [4–6]. Currently, the lack of reliable and easily available biomarkers for early risk stratification and the heterogeneity of clinical courses of PJP further aggravate the difficulties in treating PJP [7].

In the past few years, researchers have focused on PJP risk factors and constructed machine learning models to predict the risk of PJP onset [8,9]. Additionally, although there have been a few studies that attempted to establish models to predict PJP severity, most of them used only 2 variable selection methods or even only 2 algorithms (eg, logistic regression). These methods have poor robustness in variable selection and inadequate control of multicollinearity [10]. Therefore, based on the clinical data and laboratory data from KTRs with PJP, we collected the baseline demographic data and hematological indicators at hospital admission and constructed a multivariate predictive model by using 3 variable screening methods (Boruta algorithm, RFE, and LASSO). Finally, we visualized the model as a nomogram with the objectives of early identifying high-risk PJP patients who are likely to progress to severe PJP or death, quantifying the risk of adverse events in PJP patients after KT, rationally allocating health care resources, and ultimately improving the prognosis of patients.

Material and Methods

Study Design and Participants

This was a single-center retrospective cohort study encompassing 169 KTRs diagnosed with PJP that occurred between June 2019 and September 2025 in Shandong Provincial Qianfoshan Hospital. All included patients received regular follow-up at the study center after KT. Moreover, all KTRs received a standardized PJP prophylaxis strategy at the study center (Shandong Provincial Qianfoshan Hospital): low-dose oral trimethoprim-sulfamethoxazole (TMP-SMX) routinely used within 12 months after KT. Prophylactic doses adhered to clinical practice guidelines (typically TMP 80 mg/SMX 400 mg once daily or 3 times weekly), with dosage adjustments based on individual renal function to mitigate the risk of adverse events, including myelosuppression, liver dysfunction, or nephrotoxicity [11,12].

Inclusion criteria were defined as meeting all of the following: 1) kidney transplant recipients; 2) meeting the diagnostic criteria for PJP; 3) age ≥18 years; 4) complete and retrievable clinical data during hospitalization. Exclusion criteria were any of the following: 1) PJP onset prior to kidney transplantation; 2) age <18 years; 3) concomitant malignant tumors (eg, lymphoma, solid tumors) or other immunodeficiency diseases (eg, human immunodeficiency virus infection); 4) concomitant transplantation of other organs (heart, liver, lung, pancreas); 5) incomplete clinical data or loss to follow-up.

The study was approved by the Medical Ethics Committee of Shandong Provincial Qianfoshan Hospital (Ethics Approval Number: 2025[S920]). As this was a retrospective study, and patient personal identifying information (such as name, hospital number) was anonymized, this study followed the regulations set by the ethics committee for waiving informed consent for retrospective studies. Therefore, the requirement for informed consent from the study participants was waived. The study was conducted in accordance with the Declaration of Helsinki and the regulations on medical research ethics in China.

Clinical Definition

PJP was defined as satisfying both microbiological confirmation and clinical diagnostic criteria [3,13]. Specifically, microbiological confirmation referred to a positive test result for Pneumocystis jirovecii in respiratory specimens (sputum, bronchoalveolar lavage fluid) or blood samples using metagenomic next-generation sequencing (mNGS) and/or real-time polymerase chain reaction (qPCR) of sputum. Clinical diagnosis was defined as the presence of typical symptoms, including fever, dry cough, chest tightness, or dyspnea, and accompanied by chest computed tomography (CT) features consistent with bilateral diffuse ground-glass opacities or consolidation. Cytomegalovirus (CMV) infection was defined as detection of positive CMV-DNA in peripheral blood and/or urine using qPCR. Similarly, BK virus (BKV) infection was defined as detection of positive BKV-DNA in peripheral blood and/or urine using qPCR. Delayed graft function (DGF) was defined in accordance with the Chinese Scientific Registry of Kidney Transplantation (CSRKT) and the kidney transplantation quality control standards of the National Health Commission: this condition required dialysis within 7 days postoperatively and/or that showed no significant decrease in serum creatinine (at least 10% daily) for 3 consecutive days during the first week after kidney transplantation [14]. Acute graft rejection was defined as either antibody-mediated rejection (ABMR) or T cell-mediated rejection (TCMR) confirmed by renal allograft biopsy and meeting the Banff classification criteria [15,16]. Severe PJP was defined as PJP in patients who required ICU admission or died despite active treatment.

Clinical Data Collection

All data in this study were extracted from the EMRs of study participants upon the diagnosis of PJP and were completely de-identified before data cleaning and analysis. Data collection included the following aspects: basic demographic characteristics (age, sex, body mass index [BMI], and history of hypertension) and transplant-related clinical characteristics (donor type of kidney, time interval from transplantation to onset of PJP, perioperative induction immunosuppressive regimen, and history of acute rejection). In addition, we systematically collected a comprehensive set of laboratory parameters upon hospital admission: complete blood count (white blood cell count, neutrophil count, lymphocyte count), inflammatory markers (CRP, procalcitonin [PCT]), fungus-specific biomarker ((1→3)-β-D-glucan test [G_test]), key indicators of immune function (CD4+ and CD8+ T cell count), renal function (serum creatinine[Scr]), and PCR detection results for common viruses (CMV/BKV). Finally, to evaluate disease severity and prognosis in a comprehensive manner, we also collected key clinical outcome events: length of hospital stay, ICU admission rate, and cure discharge rate.

Data Processing

Initially, a missing value analysis was conducted. Missing data were predominantly observed in laboratory parameters. Features with a missing data rate exceeding 20% were excluded, while those with less than 20% missing data were imputed using the multiple imputation method. Subsequently, data normalization was performed to eliminate discrepancies in data scales, thereby enhancing the suitability of the data for statistical analysis and modeling. The entire cohort was randomly partitioned into a training set and a testing set at a ratio of 7: 3. The training set was used for developing machine learning models, while the testing set served to validate the performance of the established models. All data processing procedures were conducted in the R statistical environment using the “mice” and “caret” packages.

Variable Screening, Model Development

To get the key variables most relevant to the risk of severe PJP in training dataset as accurately as possible, this study applied 3 machine learning-derived variable selection methods, including Boruta algorithm, RFE, and LASSO regression. Specifically, the Boruta algorithm assessed the overall relevance of all predictive variables with respect to the outcome by inducing shadow features and comparing importance values. It randomly permuted original attributes to generate shadow attributes. If an original attribute is unimportant, its importance value should be similar to importance values of shadow attributes. Otherwise, its importance value should be higher than most importance values of shadow attributes. If an original attribute’s importance value was higher than most importance values of shadow attributes, it was considered important, otherwise, it was considered unimportant [17]; RFE selected the optimal feature subset incrementally by recursively building a model on the training dataset and then eliminating the least important training dataset using cross-validation performance as the criterion [18]; LASSO regression introduced an L1 regularization to shrink regression coefficients and the algorithm converged regression coefficients of irrelevant variables to zero so that it could also achieve variable selection and dimensionality reduction [19,20]. To minimize the bias from a single selection method, the variables selected by 3 approaches described above were used, and the intersection of their results was used as candidate variables for subsequent multivariate analysis when severe PJP occurrence was used as the outcome variable, and these candidate variables were included in multivariate logistic regression analysis and then the final predictive model was constructed. Finally, to improve the clinical applicability and visual interpretation of the result for model, the final regression model was visualized as a nomogram to intuitively show the relevance of each predictive variable to the risk of severe PJP and then provide a visual tool for risk evaluation of severe PJP in clinical practice.

Model Validation and Clinical Utility Evaluation

To assess the accuracy and clinical applicability of the developed predictive model in general, the variance inflation factor (VIF) was used to diagnose the multicollinearity of variables included in the model. Multicollinearity is suspected when a VIF is above 5, and variable optimizations are then performed to stabilize the model. For assessment of model performance, the ROC curve was obtained and the AUC was calculated to evaluate the discriminative ability of the model for outcome events. In addition, the Hosmer-Lemeshow goodness-of-fit test and calibration curves were used in conjunction to evaluate the agreement between the model’s predicted probabilities and observed events and thus evaluate its calibration ability. To further visually evaluate its clinical application, the clinical net benefit of the model at different threshold probabilities was calculated, and the decision curve analysis (DCA) curve and clinical impact curve (CIC) were obtained. Finally, the optimal risk threshold was determined according to the nomogram scores, and the patients were divided into different risk groups according to the occurrence of endpoint events in them to evaluate the risk stratification ability of the model.

Statistical Analysis

Continuous variables were first tested for normality using the Shapiro-Wilk test. Variables with a normal distribution were expressed as mean±standard deviation χ̄±s), with intergroup comparisons performed with the independent-samples t test, those without a normal distribution were expressed as median (interquartile range) [M (IQR)], with intergroup comparisons conducted with the Mann-Whitney U test. Categorical data were expressed as counts (percentages) [n (%)], and intergroup comparisons were performed using the Pearson χ2 test or Fisher’s exact test, depending on theoretical frequencies and total sample size. All statistical analyses in this study were performed with SPSS (version 27.0.1) and R software (version 4.5.0). The significance level α was set at 0.05, and a P value <0.05 was considered statistically significant.

Results

Baseline Patient Characteristics

A total of 169 eligible KTRs with post-transplant PJP were enrolled in this study and randomly divided into a training set (n=120) and a testing set (n=49), as shown in Figure 1. The baseline characteristics of the 2 groups are presented in Table 1. In total, males accounted for 81.66% and the prevalence of hypertension was 90.53%. The median time from KT to PJP attack was 10 months (IQR: 5–17). Laboratory investigations revealed a significant inflammatory response (median CRP level was 40.7 mg/L, IQR: 20.05–66.75) and a great decrease in CD4+ T cell count (147 cells/μl, IQR: 94–282.5). Moreover, 33 patients (19.53%) were admitted to ICU because of severe illness. Overall, except for the higher CRP and PCT levels, the 2 groups were well matched in terms of demographic characteristics, clinical indicators, and immune status.

Figure 1. Flow diagram of the prediction model development and validation in kidney transplant recipients with PJP.

Figure 1

PJP – Pneumocystis jirovecii pneumonia; RFE – recursive feature elimination.

Table 1.

Baseline demographics and clinical laboratory characteristics in patients with PJP after kidney transplantation (training set and test set).

Overall (n=169) Training set (n=120) Test set (n=49) P value
Sex, n(%) 1.000
 Male 138 (81.66) 98 (81.67) 40 (81.63)
 Female 31 (18.34) 22 (18.33) 9 (18.67)
Age (years), median (IQR) 44 (36, 52) 43 (36, 50) 47 (37, 58) 0.124
Hypertension, n (%) 153 (90.53) 107 (89.17) 46 (93.88) 0.510
BMI (kg/m2), mean±SD 22.56±3.91 22.36±3.85 23.06±4.04 0.288
Donor type, n(%) 0.414
 DCD 148 (87.57) 103 (85.83) 45 (91.84)
 Living donor kidney 21 (12.43) 17 (14.17) 4 (8.16)
Induction therapy, n(%) 0.388
 ATG 93 (55.03) 63 (52.50) 30 (61.22)
 Other 76 (44.97) 57 (47.50) 19 (38.78)
Acute rejection, n(%) 14 (8.28) 10 (8.33) 4 (8.16) 1.000
DGF, n(%) 27 (15.98) 20 (16.67) 7 (14.29) 0.879
Time KT to PJP (months), mean±SD 10 (5, 17) 10 (5, 17.75) 10 (6, 17) 0.411
CMV infection, n(%) 70 (41.42) 51 (42.50) 19 (38.78) 0.784
BKV infection, n(%) 21 (12.43) 16 (13.33) 5 (10.20) 0.762
WBC(×109/L), median (IQR) 7.75 (5.54, 9.70) 7.93 (5.62, 9.79) 6.94 (5.52, 8.89) 0.080
N (×109/L), median (IQR) 6.15 (4.57, 8.05) 6.48 (4.53, 8.52) 5.87 (4.59, 7.61) 0.085
CRP (mg/L), median (IQR) 40.7 (20.05, 66.75) 43.8 (20.93, 75.25) 33.0 (17.40, 60.15) 0.023
Lym (×109/L), median (IQR) 0.55 (0.37, 0.90) 0.52 (0.36, 0.90) 0.64 (0.40, 0.91) 0.446
PCT (ng/ml), median (IQR) 0.19 (0.09, 0.89) 0.27 (0.10, 1.05) 0.14 (0.08, 0.35) 0.030
G_test(pg/ml), median (IQR) 455.60 (165.30, 757.40) 459.30 (183.85, 796.63) 447.40 (158.90, 700.05) 0.236
CD4+ cell count, median (IQR) 147.00 (94.00, 282.50) 154.50 (94.50, 287.43) 141.00 (90.67, 247.00) 0.588
CD8+ cell count, median (IQR) 214.00 (132.50, 297.50) 207.50 (129.75, 290.50) 242.00 (140.50, 344.00) 0.841
Scr (μmol/L), median (IQR) 174.00 (136.00, 233.50) 174.50 (136.00, 236.50) 167.00 (137.50, 228.50) 0.947
High-dose steroids, n(%) 13 (7.69) 8 (6.67) 5 (10.20) 0.642
Hospital admission (days), median (IQR) 23 (16, 31) 22 (15.25, 30.75) 25 (17, 32.5) 0.245
ICU admission, n(%) 33 (19.53) 24 (20.00) 9 (18.37) 0.807

BMI – body mass index; SD – standard deviation; DCD – donation after circulatory determination of death; ATG – anti-thymocyte globulin; G_test – fungal (1→3)-b-D-glucan detection; CMV – cytomegalovirus; BKV – BK virus; WBC – white blood cell count; N – neutrophil count; CRP – C-reactive protein; Lym – lymphocyte count; PCT – procalcitonin; Scr – serum creatinine; DGF – delayed graft function; Time KT to PJP – PJP and kidney transplantation interval; High-dose steroids – methylprednisolone dose >40 mg/d; ICU – intensive care unit.

Variable Screening Results

Because the Boruta algorithm calculated the importance of variables by comparing the predictive variables with their shadow variables, the results showed that there were 6 variables whose mean importance values were significantly higher than those of other variables: PCT, G_test, CRP, N (neutrophil count), Time KT to PJP (time from kidney transplantation to PJP onset), and WBC (white blood cell count) (Figure 2A). In addition, when RFE analysis was performed (Figure 2B), we found that with the increase in variable count from 1 to 5, the cross-validated RMSE curve rapidly decreased to its minimum. With further increases in variable count, there was no significant improvement in cross-validated RMSE, and the RMSE fluctuated slightly. This clearly indicated that the model with 5 variables had the best predictive performance. Moreover, the coefficients of irrelevant variables were compressed to zero by L1 regularization in LASSO regression (Figure 2C, 2D), and the results of the 3 methods were integrated in Figure 2E. The results of LASSO regression further verified that PCT, G_test, CRP, and Time KT to PJP were the established variables significantly associated with PJP outcomes. Multicollinearity analysis was then performed on these 4 established variables. The results showed that there was no multicollinearity between these established variables, and these variables were included in the predictive model. The coefficient path plot showed that as the penalty parameter λ increased, most variables were eliminated, and only a few had non-zero coefficients. PCT, G_test, CRP, and Time KT to PJP were retained throughout the regularization path (Figure 2C).

Figure 2. Different machine learning methods for screening variables.

Figure 2

(A) Boruta method for screening variables; (B) RFE method for screening variables; (C) LASSO coefficient distribution for variable selection; (D) LASSO cross-validation for selecting the optimal lambda; (E) Venn diagram of variable selection by Boruta, RFE and LASSO.

Predictive Model Development and Performance Evaluation

Through the multivariate logistic regression analysis, we found the independent predictors of severe PJP in KTRs and displayed the results in forest plot (Figure 3). The OR for Time KT to PJP was 0.87 (95% confidence interval [95% CI]: 0.74–0.96, P=0.041). In other words, a longer post-transplantation time was associated with a lower possibility of severe PJP. Although the P value for PCT in the logistic regression model was marginally significant (P=0.087), the 95% CI (1.02–9.13) indicated a potential risk association. It is noteworthy that the CIs were estimated using the profile likelihood method, which accounts for asymmetry in the likelihood function better than the Wald approximation used for P value calculation. Given that PCT was rigorously screened using the Boruta, RFE, and LASSO algorithms, and the profile likelihood CI suggests a positive association, we consider PCT to be a clinically and potentially prognostically relevant predictor in the final model. The ORs for G_test and CRP were 2.94 (95% CI: 1.42–7.75, P=0.014) and 3.08 (95% CI: 1.12–9.85, P=0.042), respectively, and both showed statistically significant association with increased risk of severe PJP.

Figure 3.

Figure 3

Forest plot of the multivariate analysis with the selected variables.

Based on the regression coefficients of these variables, we developed a nomogram model for the individualized prediction of severe PJP risk in KTRs (Figure 4). This model allows for the intuitive calculation of the corresponding probability of disease occurrence by summing the scores of each variable and mapping them to the total score axis. The discriminative ability of the model was evaluated using the ROC curve. In the training set, the AUC was 0.935 (Figure 5), indicating excellent discriminative ability of the model. In the testing set, the AUC was 0.886 (Figure 5), which verified the good generalization performance of the model. The calibration of the model was validated using the Hosmer-Lemeshow test and bootstrap calibration curves. For the training set, the P value of the Hosmer-Lemeshow test was 0.652, suggesting that the model had a good fit, with no significant bias. Additionally, calibration curves based on 1000 bootstrap samples demonstrated that the calibration effects of the training and testing groups were close to the ideal scenario, confirming the reliable predictive performance of the model (Figure 6A, 6B). To assess the clinical utility of the model, we performed DCA and plotted CIC. The results showed that within a certain range of high-risk thresholds, the nomogram provided more net benefits compared with the “treat all” and “treat none” strategies (Figure 7A, 7B). The CIC further confirmed that at a threshold of 0.177, the model could effectively identify high-risk individuals, and the number of predicted high-risk individuals matched well with the number of actual events (Figure 8A, 8B).

Figure 4.

Figure 4

Nomogram for predicting severe PJP in kidney transplant recipients.

Figure 5.

Figure 5

ROC curves of the nomogram in the training and test sets.

Figure 6.

Figure 6

Calibration curves of the model. (A) Training set; (B) test set.

Figure 7. DCA curves for the model.

Figure 7

(A) Training set; (B) test set.

Figure 8. CIC curves for the model.

Figure 8

(A) Training set; (B) test set.

Risk Stratification and Survival Analysis Based on the Nomogram Model

Based on the nomogram scoring model constructed in this study, we first calculated the total score of all KTRs with PJP. Through ROC curve analysis and Youden index calculation, −0.442 was determined as the optimal cutoff value, which allowed for the stratification of patients into the low-risk group (total score ≤−0.442) and high-risk group (total score >−0.442). Subsequently, the Kaplan-Meier method was used to plot the survival curves of the 2 groups to enable intuitive comparison of prognostic differences (Figure 9). The results demonstrated that as hospital stay duration increased, the survival probability of patients in the high-risk group showed a more significant downward trend. In contrast, the survival probability of patients in the low-risk group remained relatively stable throughout the observation period, and it was significantly higher than that in the high-risk group at all time points. Furthermore, the log-rank test was performed to quantify the survival difference between the 2 groups, and the results showed that the survival curves of the 2 groups were statistically significantly distinct (P<0.0001). These results suggest that the risk stratification developed from the nomogram model could also discriminate the prognostic heterogeneity among KTRs with PJP. As the method of calculation was simple and the cutoff value was clear, this model has important clinical predictive value for in-hospital survival prognosis of KTRs with PJP and could be a reference for clinicians to formulate individualized intervention strategies.

Figure 9.

Figure 9

Survival analysis of the risk stratification system for severe PJP.

Discussion

Risk assessment after KT for severe conversion from mild PJP is an important clinical issue in daily clinical practice. In particular, when patients are iatrogenically immunosuppressed, they often exhibit subtle early manifestations that frequently result in severe pneumonia. Clinically valid and reliable biomarkers that can be easily applied to predict which patients are at high risk are still lacking [7,21,22]. This clinical gap highlights the need and clinical value of constructing a predictive model for severe PJP, which was the primary goal of this study.

We retrospectively analyzed clinical information of 169 patients with laboratory-confirmed PJP after KT in a single center. This study applied the Boruta algorithm, RFE, and LASSO regression in conjunction to screen core variables 3 times. We constructed a nomogram predictive model and internally validated it. The model was composed of 4 predictors: Time KT to PJP, PCT, G_test, and CRP. The model demonstrated excellent discriminative performance, as indicated by area under the AUC values of 0.935 in the training set and 0.886 in the testing set, respectively, suggesting strong discriminatory performance. In addition, it also demonstrated good calibration and significant clinical net benefit, thereby providing a practical tool for achieving individualized management of high-risk patients.

To further enhance the robustness and clinical interpretability of variable screening, we incorporated 3 variable screening algorithms combined with cross-validation into this study design. The 4 final variables reflect the pathophysiological process of PJP from 3 perspectives. Specifically, PCT and CRP reflect the intensity of the host’s systemic inflammatory response to infection [23,24], the G_test directly reflects the fungal load [25,26], and Time KT to PJP acts as a surrogate for the cumulative exposure to immunosuppressive therapy [27]. Compared with most previous studies that merely used 1 variable screening method, our strategy effectively reduced selection bias caused by the limitations inherent to each method. The core variable set obtained by our strategy is not only small but also free from multicollinearity and fully follows the “Parsimonious Model” principle proposed by Steyerberg [20,28].

Detailed analysis of the direction and strength of effects of each predictor showed agreement with previous pathophysiological knowledge and recent breakthroughs in research, as well as several disagreements needing further study. Regarding classical inflammatory biomarkers, numerous previous studies have demonstrated a positive association between elevated CRP and PCT levels and the severity of PJP [23,24,29]. The amounts of these 2 markers are directly correlated with the strength of the host’s inflammatory response to Pneumocystis jirovecii infection. It has been further confirmed in our study that they play a key role in the prognosis of severe PJP. Although PCT did not achieve the traditionally accepted level of statistical significance (P>0.05) in this study, there was still a very strong directional trend of association with severe risk. The conclusion that elevation of PCT is not significant in isolated PJP infection in some previous literature may differ from our study [30,31]. We speculate that this may be because the studied population was composed of KTRs receiving immunosuppressive therapy, who are more likely to be affected by other infections or to present with uncontrolled inflammatory response, a feature that makes the prognostic significance of PCT in this studied population more apparent [32,33]. This small difference makes it evident that the interpretation of biomarkers in an immunosuppressed host requires extreme caution and must be accompanied by the clinical situation to allow for a comprehensive judgment [34].

The G_test was one of the most stable predictors in our study. From the pathophysiologic standpoint, the cell wall of Pneumocystis jirovecii is rich in (1→3)-β-D-glucan (BG). When the fungus proliferates massively in alveoli and breaks the lung tissue barrier, BG is released into the circulation, causing increased serum BG levels [35]. Many studies have confirmed the clinical application of the G_test in the diagnosis of PJP. However, studies on the association between the G_test and disease severity or prognosis are scarce and the conclusions are controversial [25,36]. Some studies have reported that BG levels can reflect the fungal load in lungs indirectly, and patients with PJP who have increased BG levels have a significantly higher rate of poor outcomes [36]. However, other studies have reported that PJP patients do not show a trend of decreasing G_test results after antifungal treatment, and the trend cannot be used to evaluate the prognosis of invasive fungal diseases [37,38]. In contrast, in the present study, we found that there was a clear and direct relationship between G_test levels and the risk of severe PJP. This relationship not only reflects the positive correlation between fungal load and the degree of lung injury, but also provides direct clinical evidence that the G_test can be used to stratify the severity of PJP [39,40]. Some studies have reported that the false-positive rate of the G_test in KTRs is about 15%, which is caused by factors such as existing bacterial infection, intestinal mucosal barrier damage, or the use of medical devices containing glucan [25]. However, our study effectively excluded the interference of false-positives through use of rigorous inclusion criteria, satisfying both the standard of microbiological confirmation and clinical diagnostic criteria. Therefore, the results are reliable [25,38]. In addition, the G_test is rapid and easy to operate. It is particularly suitable for quick clinical risk stratification.

Importantly, there was a significant negative correlation between Time KT to PJP and the risk of severe disease, which basically reflects the “immunosuppression intensity-time dependence” effect. Patients who developed PJP in the early post-transplant period were more likely to present with severe disease due to higher immunosuppression intensity or incomplete immune reconstitution [27,39]. This was also verified visually by risk-stratified Kaplan-Meier survival analysis. In addition, our study quantified this time-dependent association in which for every additional month after KT, the risk of severe PJP will decrease by 13%; OR=0.87 [27], and clearly shows the limitation of the current traditional “unified 6–12 month PJP prophylaxis regimen”. Specifically, for patients with slow immune reconstitution (eg, persistent CD4+ T-cell count <150 cells/μL), discontinuing PJP prophylaxis at 12 months may be premature and increase the risk of severe PJP. Conversely, low-risk patients with a CD4+ T-cell count >200 cells/μL at >12 months after transplant can safely discontinue prophylactic medications. Therefore, in contrast to rigid time-based thresholds, a risk-stratified individualized management strategy is essential for achieving precision in prevention of PJP [3,4,6,40].

This study has several limitations. First, as a single-center retrospective study, despite the use of multivariate analysis to control for confounding factors as much as possible, there remains a potential risk of selection bias. For instance, our center routinely uses a 12-month post-transplant TMP-SMX PJP prophylaxis regimen, while some centers extend the PJP prophylaxis period to 24 months or use nebulized pentamidine as an alternative prophylactic agent. Such variations in PJP prophylaxis strategies may affect the predictive value of Time KT to PJP. Second, the sample size of this study was relatively small. Third, despite random partitioning, statistically significant imbalances in baseline CRP and PCT levels were observed between the training and testing sets, with the training cohort exhibiting higher inflammatory markers. Such distributional shifts, while occasionally unavoidable in limited sample sizes, can introduce estimation bias during internal validation. However, the nomogram maintained robust discriminative power (AUC 0.886) in the testing set despite these lower baseline inflammatory indices, suggesting a degree of model resilience. Nevertheless, this baseline discrepancy further underscores the necessity for future external validation to rigorously test the model’s stability across populations with varying spectra of disease severity.

Conclusions

Based on the clinical data of patients with PJP after kidney transplantation, this study employed 3 machine learning algorithms to screen variables to develop and validate a prognostic prediction model. This model exhibited excellent discriminative ability and calibration performance, which can effectively stratify the risk of severe PJP and demonstrates potential in individualized risk management. Future multicenter studies are required to further validate its generalizability.

Abbreviation

PJP

Pneumocystis jirovecii pneumonia

KTRs

kidney transplant recipients

RFE

recursive feature elimination

AUC

area under the receiver operating characteristic curve

G_test

(1→3)-β-D-glucan test

CRP

C-reactive protein

ICU

intensive care unit

TMP-SMX

trimethoprim-sulfamethoxazole

mNGS

metagenomic next-generation sequencing

qPCR

real-time polymerase chain reaction

CT

computed tomography

CMV

cytomegalovirus

BKV

BK virus

DGF

delayed graft function

CSRKT

Chinese Scientific Registry of Kidney Transplantation

ABMR

antibody-mediated rejection

TCMR

T cell-mediated rejection

EMRs

electronic medical records

BMI

body mass index

PCT

procalcitonin

Scr

serum creatinine

VIF

variance inflation factor

ROC

receiver operating characteristic

DCA

decision curve analysis

CIC

clinical impact curve

IQR

interquartile range

Time KT to PJP

time from transplantation to PJP onset

RMSE

cross-validated root mean square error

OR

odds ratio

BG

(1→3)-β-D-glucan

Footnotes

Financial support: This study was supported by Shandong Provincial Natural Science Foundation ZR2022QH356

Conflict of interest: None declared

Publisher’s note: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher

Department and Institution Where Work Was Done: This work was done at the Department of Urology, the First Affiliated Hospital of Shandong First Medical University & Shandong Provincial Qianfoshan Hospital, Jinan, Shandong, PR China.

Patient Permission: The study was approved by the Medical Ethics Committee of Shandong Provincial Qianfoshan Hospital, Ethics Approval Number: 2025(S920). As this was a retrospective study, and personal identifying information (such as name, hospital number) was anonymized, this study followed the regulations set by the ethics committee for waiving informed consent for retrospective studies. Therefore, the requirement of informed consent from the study participants was waived.

Declaration of Figures’ Authenticity: All figures submitted have been created by the authors who confirm that the images are original with no duplication and have not been previously published in whole or in part.

References

  • 1.Taiwo A. Chronic and end-stage renal disease and indications for renal transplantation. In: Sher Y, Maldonado JR, editors. Psychosocial care of end-stage organ disease and transplant patients. Cham: Springer International Publishing; 2019. pp. 63–71. [Google Scholar]
  • 2.Wojciechowski D, Wiseman A. Long-term immunosuppression management: Opportunities and uncertainties. Clin J Am Soc Nephrol. 2021;16(8):1264–71. doi: 10.2215/CJN.15040920. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Apostolopoulou A, Fishman JA. The pathogenesis and diagnosis of Pneumocystis jiroveci pneumonia. J Fungi (Basel) 2022;8(11):1167. doi: 10.3390/jof8111167. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Ibrahim A, Chattaraj A, Iqbal Q, et al. Pneumocystis jiroveci pneumonia: A review of management in human immunodeficiency virus (HIV) and non-HIV immunocompromised patients. Avicenna J Med. 2023;13(1):23–34. doi: 10.1055/s-0043-1764375. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Gaborit BJ, Tessoulin B, Lavergne RA, et al. Outcome and prognostic factors of Pneumocystis jirovecii pneumonia in immunocompromised adults: A prospective observational study. Ann Intensive Care. 2019;9(1):131. doi: 10.1186/s13613-019-0604-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Park SY, Jung JH, Kwon H, et al. Epidemiology and risk factors associated with Pneumocystis jirovecii pneumonia in kidney transplant recipients after 6-month trimethoprim-sulfamethoxazole prophylaxis: A case-control study. Transpl Infect Dis. 2020;22(2):e13245. doi: 10.1111/tid.13245. [DOI] [PubMed] [Google Scholar]
  • 7.Li W, Chen G, Lin F, et al. A scoring system based on novel biomarkers and clinical risk factors to predict invasive candidiasis in immunocompetent critically ill patients. Front Microbiol. 2023;14:1097574. doi: 10.3389/fmicb.2023.1097574. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Chew R, Woods ML, Paterson DL. Development and validation of supervised machine learning multivariable prediction models for the diagnosis of Pneumocystis jirovecii pneumonia using nasopharyngeal swab PCR in adults in a low-HIV prevalence setting. Int Health. 2025;17(5):804–8. doi: 10.1093/inthealth/ihae052. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Li X, Xiong X, Liang Z, et al. A machine learning diagnostic model for Pneumocystis jirovecii pneumonia in patients with severe pneumonia. Intern Emerg Med. 2023;18(6):1741–49. doi: 10.1007/s11739-023-03353-1. [DOI] [PubMed] [Google Scholar]
  • 10.Hu Y, Liu S, Ren W, et al. Dual-energy computed tomography-based radiomics for differentiating patients with and without gout flares. Clin Rheumatol. 2024;43(12):3869–77. doi: 10.1007/s10067-024-07166-1. [DOI] [PubMed] [Google Scholar]
  • 11.Kemnic TR, Coleman M. StatPearls. Treasure Island (FL): StatPearls Publishing; 2025. Trimethoprim sulfamethoxazole. [PubMed] [Google Scholar]
  • 12.Fishman JA, Gans H. Pneumocystis jiroveci in solid organ transplantation: Guidelines from the American Society of Transplantation Infectious Diseases Community of Practice. Clin Transplant. 2019;33(9):e13587. doi: 10.1111/ctr.13587. [DOI] [PubMed] [Google Scholar]
  • 13.Veintimilla C, Alvarez-Uria A, Martin-Rabadan P, et al. Pneumocystis jirovecii pneumonia diagnostic approach: Real-life experience in a tertiary centre. J Fungi (Basel) 2023;9(4):414. doi: 10.3390/jof9040414. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Yao Z, Kuang M, Li Z. Risk factors for delayed graft function in patients with kidney transplantation: A systematic review and meta-analysis. BMJ Open. 2025;15(3):e087128. doi: 10.1136/bmjopen-2024-087128. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Naik RH, Hassanein M, Shawar SH. StatPearls. Treasure Island (FL): StatPearls Publishing; 2025. Acute renal transplantation rejection. [PubMed] [Google Scholar]
  • 16.Loupy A, Haas M, Roufosse C, et al. The Banff 2019 Kidney Meeting Report (I): Updates on and clarification of criteria for T cell- and antibody-mediated rejection. Am J Transplant. 2020;20(9):2318–31. doi: 10.1111/ajt.15898. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Breiman L. Random forests. Machine Learning. 2001;45(1):5–32. [Google Scholar]
  • 18.Sanz H, Valim C, Vegas E, et al. SVM-RFE: Selection and visualization of the most relevant features through non-linear kernels. BMC Bioinformatics. 2018;19(1):432. doi: 10.1186/s12859-018-2451-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Xi LJ, Guo ZY, Yang XK, et al. [Application of LASSO and its extended method in variable selection of regression analysis]. Zhonghua Yu Fang Yi Xue Za Zhi. 2023;57(1):107–11. doi: 10.3760/cma.j.cn112150-20220117-00063. [in Chinese] [DOI] [PubMed] [Google Scholar]
  • 20.Steyerberg EW. Modern estimation methods. In: Steyerberg EW, editor. Clinical prediction models: A practical approach to development, validation, and updating. Cham: Springer International Publishing; 2019. pp. 247–60. [Google Scholar]
  • 21.Ghembaza A, Vautier M, Cacoub P, et al. Risk factors and prevention of Pneumocystis jirovecii pneumonia in patients with autoimmune and inflammatory diseases. Chest. 2020;158(6):2323–32. doi: 10.1016/j.chest.2020.05.558. [DOI] [PubMed] [Google Scholar]
  • 22.Wang D, Guan L, Yin Q, et al. A nomogram-based clinical prediction model for adverse clinical outcomes in non-HIV Pneumocystis jirovecii pneumonia patients. BMC Pulm Med. 2025;25(1):238. doi: 10.1186/s12890-025-03700-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Tartaglia FC, Khijmatgar S, Del Fabbro M, et al. Procalcitonin and C-reactive protein as alternative salivary biomarkers in infection and inflammatory diseases detection and patient care: A scoping review. Advances in Biomarker Sciences and Technology. 2025;7:111–23. [Google Scholar]
  • 24.Nargis W, Ibrahim M, Ahamed BU. Procalcitonin versus C-reactive protein: Usefulness as biomarker of sepsis in ICU patient. Int J Crit Illn Inj Sci. 2014;4(3):195–99. doi: 10.4103/2229-5151.141356. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Morjaria S, Frame J, Franco-Garcia A, et al. Clinical performance of (1,3) beta-D Glucan for the diagnosis of pneumocystis pneumonia (PCP) in cancer patients tested with PCP polymerase chain reaction. Clin Infect Dis. 2019;69(8):1303–9. doi: 10.1093/cid/ciy1072. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Del CO, Butler-Laporte G, Sheppard DC, et al. Diagnostic accuracy of serum (1–3)-beta-D-glucan for Pneumocystis jirovecii pneumonia: A systematic review and meta-analysis. Clin Microbiol Infect. 2020;26(9):1137–43. doi: 10.1016/j.cmi.2020.05.024. [DOI] [PubMed] [Google Scholar]
  • 27.Lee G, Koo TY, Kim HW, et al. Comparison of early and late Pneumocystis jirovecii pneumonia in kidney transplant patients: The Korean Organ Transplantation Registry (KOTRY) Study. Sci Rep. 2022;12(1):10682. doi: 10.1038/s41598-022-14580-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Steyerberg EW. Selection of main effects. In: Steyerberg EW, editor. Clinical prediction models: a practical approach to development, validation, and updating. Cham: Springer International Publishing; 2019. pp. 207–25. [Google Scholar]
  • 29.Cao XE, Ongagna-Yhombi SY, Wang R, et al. A diagnostic platform for rapid, simultaneous quantification of procalcitonin and C-reactive protein in human serum. eBioMedicine. 2022;76:103867. doi: 10.1016/j.ebiom.2022.103867. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Dou YH, Du JK, Liu HL, et al. The role of procalcitonin in the identification of invasive fungal infection – a systemic review and meta-analysis. Diagn Microbiol Infect Dis. 2013;76(4):464–69. doi: 10.1016/j.diagmicrobio.2013.04.023. [DOI] [PubMed] [Google Scholar]
  • 31.Li S, Rong H, Guo Q, et al. Serum procalcitonin levels distinguish Gram-negative bacterial sepsis from Gram-positive bacterial and fungal sepsis. J Res Med Sci. 2016;21:39. doi: 10.4103/1735-1995.183996. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Sawinski D, Blumberg EA. 40 – Infection in renal transplant recipients. In: Himmelfarb J, Ikizler TA, editors. Chronic kidney disease, dialysis, and transplantation. Fourth edition. Philadelphia: Elsevier; 2019. pp. 621–38. [Google Scholar]
  • 33.Nambiar P, Silibovsky R, Belden KA. Infection in kidney transplantation. In: Ramirez CGB, McCauley J, editors. Contemporary kidney transplantation. Cham: Springer International Publishing; 2018. pp. 307–27. [Google Scholar]
  • 34.Zhang Z, Liu T, Ming M, et al. Metagenomic next-generation sequencing promotes diagnosis and treatment of Pneumocystis jirovecii pneumonia in non-HIV infected children: A retrospective study. BMC Pulm Med. 2024;24(1):338. doi: 10.1186/s12890-024-03135-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Cushion MT, Stringer JR. Stealth and opportunism: Alternative lifestyles of species in the fungal genus Pneumocystis. Annu Rev Microbiol. 2010;64:431–52. doi: 10.1146/annurev.micro.112408.134335. [DOI] [PubMed] [Google Scholar]
  • 36.Sax PE, Komarow L, Finkelman MA, et al. Blood (1->3)-beta-D-glucan as a diagnostic test for HIV-related Pneumocystis jirovecii pneumonia. Clin Infect Dis. 2011;53(2):197–202. doi: 10.1093/cid/cir335. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Lamoth F, Akan H, Andes D, et al. Assessment of the role of 1,3-beta-D-glucan testing for the diagnosis of invasive fungal infections in adults. Clin Infect Dis. 2021;72(Suppl 2):S102–S8. doi: 10.1093/cid/ciaa1943. [DOI] [PubMed] [Google Scholar]
  • 38.White SK, Schmidt RL, Walker BS, et al. (1-->3)-beta-D-glucan testing for the detection of invasive fungal infections in immunocompromised or critically ill people. Cochrane Database Syst Rev. 2020;7(7):CD009833. doi: 10.1002/14651858.CD009833.pub2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Lee SH, Huh KH, Joo DJ, et al. Risk factors for Pneumocystis jirovecii pneumonia (PJP) in kidney transplantation recipients. Sci Rep. 2017;7(1):1571. doi: 10.1038/s41598-017-01818-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Eberl I, Binquet C, Guilloteau A, et al. CMV infection and lymphopenia: Warning markers of pneumocystis pneumonia in kidney transplant recipients. Transpl Int. 2024;37:12192. doi: 10.3389/ti.2024.12192. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Annals of Transplantation are provided here courtesy of International Scientific Information, Inc.

RESOURCES