This study was approved by the Institutional Review Board of The First Affiliated Hospital of Bengbu Medical University (Approval Number: 2023YJS162). Written informed consent was obtained from all participants prior to sample collection.
Data collection
The transcriptome data used in this study were obtained from the Gene Expression Omnibus (GEO) database (https://www.ncbi.nlm.nih.gov/; RRID: SCR_005012). The primary training dataset, GSE150910, was generated using the Illumina NovaSeq 6000 platform (GPL24676) and comprised 103 IPF and 103 normal lung tissue samples. To validate the findings, independent datasets GSE24206, GSE110147, GSE93606, and GSE38958 were employed. Detailed information on each dataset is provided in Table 1. Additionally, a total of 636 GRGs were selected from a previously published study14.
Differential expression analysis and functional characterization of glycosylation-related DEGs
Differential expression analysis between IPF and normal lung tissue samples from the GSE150910 dataset was conducted using the R package DESeq2 (RRID: SCR_015687). Genes with an adjusted P-value (padj) < 0.05 and |log2FoldChange| > 0.5 were considered differentially expressed genes (DEGs). Glycosylation-related DEGs (GR-DEGs) were identified by intersecting the DEGs with a predefined set of 636 GRGs. To further investigate the biological roles of these genes, Gene Ontology (GO) enrichment analysis and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway analysis were performed to elucidate their functional roles and pathway involvement. A protein-protein interaction (PPI) network was generated using the STRING database (RRID: SCR_005223)15 with an interaction confidence score threshold of > 0.7, to elucidate the molecular interactions and potential regulatory mechanisms of the GR-DEGs in IPF.
Screening of key genes and construction of a diagnostic model
To screen key genes for IPF from GR-DEGs, we employed multiple machine learning algorithms. Initially, LASSO regression (RRID: SCR_003418) was fitted with binary logistic regression (family = “binomial”) and the optimal penalty parameter λ was selected via 10-fold cross-validation (nfold = 10). The final selection results were the features with non-zero coefficients corresponding to λ_(min) (0.01700442). For SVM-RFE, the rfe function from the R package caret was used. Recursive feature elimination was performed via 10-fold cross-validation (method = “cv”, number = 10), progressively filtering features from 1 to 126, with accuracy used to determine the optimal feature subset. In XGBoost, the objective function was set to binary logistic regression (objective = “binary: logistic”), with the evaluation metric set to log loss (eval_metric = “logloss”), the number of iterations (nrounds) set to 100, and the learning rate (eta) set to 0.1. The top 20 genes were selected based on their feature importance scores (Gain). By intersecting the results from these methods, a refined set of key genes was identified. Based on this gene set, an XGBoost diagnostic model was constructed using the training dataset (GSE150910), and its predictive performance was evaluated using receiver operating characteristic (ROC) analysis on external validation datasets (GSE110147, GSE24206, GSE93606, and GSE38958). Additionally, a nomogram was developed to visualize the contribution of each selected gene to disease probability, and the model’s clinical utility was further assessed through calibration curves and decision curve analysis (DCA).
Exploration of the biological pathways of key genes
To explore the biological context of the key genes identified by machine learning. Gene Set Enrichment Analysis (GSEA)16 was performed based on the gene lists from Molecular Signatures Database (MSigDB) (RRID: SCR_016863)17and the pathways were screened for NES > 1. The top enriched pathways were visualized using the enrichplot function.
Exploring biological function and immune landscape differences in IPF subtypes based on key gene scores
Based on the expression profiles of the identified key genes, single-sample Gene Set Enrichment Analysis (ssGSEA) scores were calculated and used to stratify IPF patients into high- and low-scoring groups based on the median score. Differential expression analysis was performed between the two groups, followed by GSEA (RRID: SCR_003199)18 to conduct GO Biological Processes (GOBP) and KEGG pathway enrichment analyses on the DEGs.
Analysis of immune cell infiltration and key gene expression differences
Following subgroup stratification based on ssGSEA scores, immune infiltration differences between the high- and low-score groups were evaluated. First, we calculated the relative abundances of 22 immune cell types in the samples using the CIBERSORT algorithm (RRID: SCR_016955)19 in combination with the LM22 feature matrix. Specifically, the deconv_tme function in the R package IOBR (parameters: method = “cibersort”, arrays = FALSE, perm = 200) was used for the calculations, and box plots were generated using the ggpubr package (RRID: SCR_021139) to assess differences in immune cell infiltration between the high-score and low-score groups. Additionally, the gsva function in the R package GSVA (using the ssGSEA method) was used to calculate enrichment scores for 28 immune cell types. These scores were then normalized using Min-Max scaling to map them to the [0, 1] interval, facilitating comparisons across cell types. Finally, Wilcoxon rank-sum tests were performed to compare the expression of key genes between normal samples and IPF patients in the GSE150910 and GSE110147 datasets, providing a comprehensive analysis of immune cell infiltration and gene expression differences across IPF subgroups.
Validation of key genes in IPF patients using RT-qPCR analysis
To validate the diagnostic relevance of the identified genes, six genes with the highest importance scores from the XGBoost algorithm were selected for expression level validation in IPF patients and healthy controls using reverse transcription quantitative PCR (RT-qPCR). A total of 20 blood samples, including 9 from IPF patients and 11 from healthy individuals, were collected from the First Affiliated Hospital of Bengbu Medical University. Total RNA was extracted from the blood samples, and RNA concentration was measured using a multifunctional microplate reader. RNA quality was assessed prior to downstream analyses. Genomic DNA was removed during reverse transcription, and primer sequences used for RT-qPCR are listed in Table 2. Primer specificity was verified by melt curve analysis. GAPDH was used as the internal reference gene. Relative gene expression levels were calculated using the 2-ΔΔCt method. This validation step provides preliminary experimental support for the differential expression and potential diagnostic relevance of the identified genes in IPF.
Statistical analysis
Data were analyzed in R, and the Wilcoxon test was used to detect differences between the two groups. The GSEA, GO, and KEGG enrichment analysis were performed using the R package clusterProfiler (RRID: SCR_016884). A p-value < 0.05 was considered significant unless otherwise specified.