Machine learning and bioinformatics framework integration reveal potential characteristic genes related to immune cell infiltration in post-traumatic stress disorder Authors: Peng Qi, Mengjie Huang, Haiyan Zhu Published: 2025 ABSTRACT AbstractPost-traumatic stress disorder (PTSD) is a psychological condition with a high incidence rate and widespread influence, but its pathophysiological mechanism is unknown, and existing treatment options have limited efficacy. Exploration of potential biomarkers and therapeutic targets for PTSD aids in the understanding of its pathogenesis and therapeutic strategies. Human PTSD sample data were retrieved from public databases, merged, and corrected to eliminate bias. The differentially expressed genes (DEGs) were then evaluated using bioinformatics tools, and the pathological mechanism was investigated using GO, KEGG, DO, and GSEA enrichment analyses. Furthermore, key genes were identified using machine learning methods, and gene interaction was investigated by establishing a protein-protein interaction (PPI) network and screening for hub genes. A total of 524 DEGs were identified, 236 were upregulated and 288 were downregulated. Enrichment analysis revealed an association of PTSD with inflammation and immune responses. The identification of 50 key genes and 9 hub genes (e.g., CEBPA, MMP13) adds to our understanding of the occurrence and development mechanisms of PTSD. Additionally, immune infiltration studies of PTSD patients revealed differences in distinct immune cells. This study investigates the occurrence and development pathways of PTSD by combining machine learning and bioinformatics methods. Potential biomarkers of PTSD have been identified. The findings provide theoretical references for the development of potential therapeutic strategies and an understanding of the immune regulatory mechanisms of PTSD.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-025-31663-1.Keywords: PTSD, Biomarker, Machine learning, Bioinformatics, Differentially expressed geneSubject terms: Biomarkers, Computational biology and bioinformatics, Diseases, Genetics, Immunology Introduction Post-traumatic stress disorder (PTSD) was proposed in a railway disaster in the 1800s1. It is a mental illness caused by severe life-threatening stress situations that threaten the life or safety of others. PTSD has been extensively reported, and nearly 70% of the population has been exposed to at least one traumatic incident in their lives2, with 5.6% developing PTSD3. Veterans and active-duty soldiers have double the incidence of PTSD as the general population4. Some special populations have a higher proportion of developing PTSD. For instance, more than 20% of patients treated at a Trauma Center in the United States developed PTSD within the first year after injury5. PTSD symptoms were reported by 27% of the nursing population during the COVID-19 pandemic6. PTSD typically causes severe interpersonal and professional challenges, resulting in an average of 3.6 days of productivity loss each month7. Currently, PTSD is largely considered an incurable disorder because of the limited therapeutic outcomes8. PTSD is linked to an increased risk of chronic diseases9 and accelerated aging10. The effective treatment for PTSD includes drug intervention and various psychological therapies. Drug therapy has been proven to lessen the severity of PTSD symptoms11, with a low success rate. While some biological hypotheses have been proposed12, the pathophysiology of PTSD remains elusive. As a result, pharmacological treatment for PTSD is primarily empirical, and drug intervention centered on the serotonin pathway exerts limited therapeutic effects13. In recent years, research on biomarkers for PTSD has gained significant momentum14,15. The identification of such biomarkers is crucial for developing targeted interventions to treat and potentially prevent the progression of PTSD16. However, despite advancements in single-cell transcriptome analysis methods17, there are still limitations in gene selection and mechanism elucidation, and effective PTSD biomarkers remain elusive. In particular, studies employing comprehensive analysis methods based on multiple datasets and multi-technique approaches are scarce. The efficacy of machine learning in exploring biomarkers and therapeutic targets for complex diseases has been extensively validated18,19, while bioinformatics methods for investigating potential disease pathogenesis have increasingly gained favor among researchers20,21. To further enhance our understanding of the potential mechanisms underlying the development of PTSD and to identify its potential biomarkers and therapeutic targets, this study integrated bioinformatics methods with machine learning techniques. By screening key genes from public datasets and conducting protein-protein interaction network analysis and hub gene selection, we delved into the exploration of potential biomarkers for PTSD. Through this comprehensive analysis, we provide a novel research direction aiming to offer theoretical support for potential diagnosis and treatment of PTSD. The findings of this study are of great significance in understanding the immune regulatory mechanisms of PTSD and developing new therapeutic strategies. Methods Data processing We searched the GEO database using the keyword “Post Traumatic Stress Disorder” with the restrictions “Homo sapiens” and “Expression profiling by array”. We reviewed the abstract of the search results and downloaded the original literature comprising PTSD and healthy control group datasets. The datasets GSE63878 and GSE81761 served as the research objects. The raw data and platform annotation information were retrieved from the two datasets. GSE81761 was randomly divided into two parts, one of which served as the validation set. The remaining half was then merged with the GSE63878 datasets as the training set. To ensure the independence and validity of the model, we randomly split the GSE81761 dataset, ensuring that samples from both the PTSD group and the control group were evenly distributed into the training set and the validation set, maintaining a consistent proportion of samples from each group in both sets. After splitting, 50% of the samples were designated as the training set and merged with all samples from the GSE63878 dataset to form the final training set for model training. The remaining 50% of the samples were designated as the validation set for assessing the model’s generalization ability. The assignment of samples to the validation set was entirely based on random allocation, ensuring no overlap with the training set. Data processing and quality control were conducted after the split to maintain the independence of the validation set throughout the analysis process. After merging the datasets, we applied the “ComBat” function to correct for batch effects in both the merged training set and the validation set, ensuring that data from different platforms could be compared on a common baseline. Following the merging of different datasets, the gene expression data underwent normalization. The normalization method involved Z-score normalization based on the expression values of each gene, thereby eliminating technical variability among different samples and ensuring that the data could be compared on the same scale(Supplement Fig. 1). (A) Differential gene heat map. Each cell represents a gene, and the color indicates the up- or down-regulation of the gene. Red color represents up-regulation, while blue color represents down-regulation. The deeper the color, the higher the expression level of the gene. Each row represents the expression level of each gene in different samples, while each column represents the expression level of all genes in each sample. (B) Volcano plot of the training set. The criteria for statistically significant differences in DEGs were adjusted |log2(FC)|>0.1 and p.adj < 0.05 in expression. Analysis of DEGs After merging the data and correcting for batch effects, we conducted differential expression gene analysis using the “limma” package. In our “limma” analysis, we employed a standard linear model design, incorporating controls for covariates such as gender, age, and race. In the design matrix, we specified “group” (PTSD vs. control) as the primary variable of interest, while controlling for sex, age, race, alcohol consumption, and tobacco use. During differential expression analysis using the “limma” package, these covariates were incorporated into the model as fixed effects to ensure that the results accurately reflect differences between the PTSD and control groups, rather than being influenced by potential confounding factors. The PTSD and control groups were compared to identify the DEGs. Considering the elusive mechanism of PTSD, the inclusion criteria for DEGs were set as |log2 (fold-change)| >0.1 and P Value < 0.05 to screen potential biomarkers. This standard is designed to ensure comprehensive coverage of potential biomarkers while avoiding the omission of genes with smaller effects that may still possess biological significance. In PTSD research, even minor changes in gene expression, particularly those involving immune-related genes, can have crucial biological implications. The “pheatmap” package was used to generate the heatmap based on the output differential expression data to intuitively understand the functional differences between the two groups. Finally, a volcano plot was generated using the “ggplot2” package to visualize the distribution of gene differential expression between the two groups, and genes with significant differences were highlighted. GO, KEGG, DO, and GSEA enrichment analyses The “org.Hs.eg.db”, “clusterProfiler”, “GSEABase” and “DOSE” packages in R Software were employed for enrichment analysis on DEGs. GO enrichment analysis revealed the function of DEGs in biological processes, revealing their roles and functions in cells. KEGG enrichment analysis revealed the metabolic and regulatory processes of DEGs in biological systems, revealing their interactions and network structure. DO enrichment analysis revealed the function of DEGs in the occurrence and development of diseases, and hence in pathogenesis and pathophysiological processes. GSEA enrichment analysis was performed to identify over-expressed genes or proteins related to disease phenotype, hence demonstrating g the relationship between a specific intervention and phenotype. Screening of key genes by machine learning Machine learning is widely used in the identification of key genes22–24. LASSO regression is a commonly utilized approach for feature selection. In our application of LASSO regression, we employed an alpha value of 1, indicating the use of standard LASSO regression, which corresponds to L1 regularization. L1 regularization facilitates feature selection by automatically selecting important features most relevant to the target variable while shrinking the coefficients of irrelevant or redundant features to zero, thereby simplifying the model. In our analysis, LASSO regression was implemented with 10-fold cross-validation. This method involves randomly dividing the dataset into 10 subsets, with 9 subsets used for training and the remaining 1 subset used for validation. Each subset is rotated as the validation set for evaluation until all subsets have been used for validation. This approach ensures a balanced distribution of training data across the folds. Furthermore, to maintain the balance of the folds, we utilized a fixed random seed, guaranteeing consistent data allocation in each run of cross-validation and reducing the uncertainty associated with data splitting. Additionally, we utilized the glmnet function from the glmnet package to train the model and selected the optimal λ value through cross-validation, aiming to avoid overfitting and ensure the model’s generalization capability. Establishment of the PPI network Gene expression regulation in biological processes is achieved through multiple factors and pathways. The constructed PPI network of DEGs revealed the interactions and regulatory linkages among these factors, as well as the mechanisms and patterns of gene expression regulation. The key genes identified by machine learning were loaded into the STRING database25 (http://string-db.org/), an online bioinformatics database with information on the interactions of genes and proteins. The network construction results were downloaded and imported into Cytoscape26 for further analysis. Screening of hub genes Key genes are primarily involved in specific biological processes. Hub genes mainly interact with other genes to coordinate and control the overall operation of the gene expression network. The hub genes for the PPI network were identified using the Cyto-Hubba27 plugin in Cytoscape. Diagnostic performance of hub genes The AUC (Area Under Curve, AUC) of hub genes in the training set was calculated using the “pROC” package. Meanwhile, the validation set was used to calculate the AUC of hub genes to assess their diagnostic performance. Immune infiltration analysis of hub genes An accumulating body of research has linked PTSD to changes in the immune and inflammatory systems28,29, providing researchers with suggestions for potentially effective treatment options30–33. Despite increased focus on the inflammatory pathology of PTSD, several issues remain unresolved. We investigated the involvement of various immune cells in the occurrence and progression of diseases through immune infiltration analysis on hub genes. Results Data processing The GSE63878 dataset34 comprises US Marines who were deployed to Iraq or Afghanistan and were longitudinally followed to assess the impact of combat stress. Participants were divided into PTSD and control groups based on the presence or absence of PTSD three months post-deployment. The demographic and clinical characteristics of the two groups (PTSD vs. control) were as follows: age (23.14 ± 2.52 vs. 23.42 ± 3.92), PTSD Symptom Checklist score (42.38 ± 11.09 vs. 20.94 ± 3.87), Clinician-Administered PTSD Scale total score (53.17 ± 15.08 vs. 10.04 ± 7.26), traumatic brain injury incidence (30 vs. 21), and mean Combat Exposure Scale post-battle experience (0.63 ± 0.25 vs. 0.53 ± 0.12). The GSE81761 dataset35 includes US military service members, classified into PTSD and control groups using the PTSD Checklist-Military Version. Both groups consisted of individuals aged 18 to 55, with no significant differences in age, race, or education level between groups. The majority of participants were male (94.9% vs. 96.3%). The incidence of mild traumatic brain injury was 74.4% in the PTSD group and 3.7% in the control group, with PTSD severity scores averaging 7.7 in the PTSD group and 2.7 in the control group(Supplement Table 1). The training set contained 24 PTSD patients and 24 healthy controls from the GSE63878 dataset. The training set contained 31 randomly selected PTSD patients and 24 healthy controls from the GSE81761 dataset; the validation set included the remaining 31 PTSD patients and 23 healthy controls. After correcting for batch effects, the datasets were merged, and all downstream analyses were restricted to the set of genes shared between the two platforms (Supplement Table 2). Finally, 524 DEGs were identified, including 236 upregulated and 288 downregulated genes (Fig. 1). Detailed DEG analyses were conducted for each dataset individually, reporting p-values, adjusted p-values, and fold changes (Supplement Tables 3 and 4). Furthermore, to assess potential confounding between data source and phenotype (PTSD status), we performed principal component analysis (PCA) on the combined expression matrix. The results showed no apparent clustering of samples according to PTSD status in the principal component space (Supplement Fig. 3), confirming that dataset origin and batch effects were not confounded with the phenotype. Subsequently, stratified and sensitivity analyses were conducted, demonstrating that the results remained consistent after excluding samples from one cohort (Supplement Fig. 4). Enrichment analysis GO and KEGG enrichment analyses revealed that biological processes (BP) of DEGs in the training set of PTSD were enriched in response to molecules of bacterial origin (GO:0002237) and response to lipopolysaccharide (GO:0032496), while their cellular components (CC) are concentrated in secretory granule lumen (GO:0034774), cytoplasmic vesicle lumen (GO:0060205), vesicle lumen (GO:0031983), Kaposi sarcoma-associated herpesvirus infection (hsa05167), and Salmonella infection (hsa05132). To summarize, the occurrence and development of PTSD were linked to inflammation and immunological responses(Fig. 2A). DO enrichment analysis revealed that DEGs were primarily associated with tumors and non-specific inflammatory diseases(Fig. 2B), both of which are caused by multiple factors, implying that PTSD is caused by several disease-related factors. GSEA enrichment analysis revealed that PTSD was enriched in B cell activation, lymphocyte activation, glycosylphosphatidylinositol anchoring biosynthesis, and proteasome functions, suggesting that PTSD has pathophysiological mechanisms in immune cell activation and protein modification(Fig. 3). All enrichment analysis results are provided in detail in Supplement Table 5. The use of KEGG pathway maps in this study was conducted with formal permission obtained from Kanehisa Laboratories36. (A) GO terms and KEGG pathway enrichment. The left side of the figure indicated that the genes were sorted according to logFC. Red represented up-regulation, blue represented down-regulation, and color depth represented change multiples. The right side of the figure indicates the order of enrichment analysis term according to the change of strength. There is a link between genes and term, indicating that they have a subordinate relationship. (B) Disease Ontology enrichment analysis. The ordinate is the name of the disease, and the abscissa is the number of genes enriched in the disease. The redder the color, the more significant the enrichment of the differentially expressed genes in the disease. KEGG pathway information is reproduced with permission from Kanehisa Laboratories. All KEGG-related figures have been revised to include the appropriate citation as per the KEGG citation guidelines (https://www.kegg.jp/kegg/kegg1.html). GSEA enrichment analysis. If the peak of the curve appears in the lower right, it indicates that these functions or pathways are active in the control group. If the peak of the curve appears in the upper left, it indicates that these functions or pathways are active in the experimental group.(A)(B) GO term.(C)(D)KEGG pathway. Screening of key genes and establishment of PPI network LASSO regression was used to reduce dimensionality(Fig. 4A). Genes most relevant to the disease were recorded, and eventually, we obtained 50 key genes. The key genes were input into the STING database. The constructed PPI network(Fig. 4B) was then imported into Cytoscape, and 9 hub genes (CEBPA, MMP13, AXL, CCL20, CFD, FCER1G, LEPR, FAP, MYL9) were identified using the MCC algorithm from the Cyto-Hubba plugin(Fig. 4C). (A) Using LASSO regression to obtain key genes. (B) Using key genes to construct PPI network. (C) Nine Hub genes were obtained through algorithm, including CEBPA, MMP13, AXL, CCL20, CFD, FCER1G, LEPR, FAP, and MYL9. Evaluation of the diagnostic performance of hub genes The AUC of receiver operating characteristic(ROC) of hub genes in the training(Fig. 5) and validation(Fig. 6) sets was computed independently. The AUC of ROC for most hub genes was between 60% and 70%. Meanwhile, to further validate the consistency of the candidate hub genes across the two datasets, we performed cross-validated predictive modeling using the LASSO algorithm and reported the area under the ROC curve for each dataset. The results were comparable to the previously reported values (Supplement Fig. 2), effectively minimizing the risk of overfitting to residual batch structures or dataset-specific artifacts and thereby enhancing the robustness of the study findings. Considering that the physiological functions of PTSD patients and the control group differed slightly, our findings might support the diagnostic value of hub genes in PTSD. Additionally, the included datasets did not provide stratification based on PTSD severity, and some patients with mild PTSD — as assessed by clinicians using the Clinician-Administered PTSD Scale (CAPS), with total scores ranging from 20 to 39, indicating preserved basic social functioning despite mild impairment — may have contributed to background noise, potentially distorting the evaluation results. More detailed data are required to enable further statistical refinement. Area under the ROC curve of hub gene in the training set. (A) AXL (B) CCL20 (C) CEBPA (D) CFD (E) FAP (F) FCER1G (G) LEPR (H) MMP13 (I) MYL9. Area under the ROC curve of hub gene in the validation set. (A) AXL (B) CCL20 (C) CEBPA (D) CFD (E) FAP (F) FCER1G (G) LEPR (H) MMP13 (I) MYL9. Moreover, we examined whether the candidate hub genes exhibited significant changes within each original dataset and confirmed the consistency in the direction of these changes (Supplement Tables 6 and 7). Immune infiltration analysis of hub genes Previous research and our current enrichment analyses have demonstrated that PTSD is linked to the immune and inflammatory systems. The proportion of 22 immune cell types in each sample was investigated using immune infiltration analysis(Fig. 7). The PTSD group was then compared with the control group to determine the differences between various immune cells(Fig. 8). As previously stated, the differences in T cells gamma delta in the PTSD group were statistically significant. The results on the correlation between hub genes and different immune cells were visualized and interpreted in lollipop charts. (A)The proportion of 22 types of immune cells in each sample. (B) Differential results on different immune cell types. The correlation between hub gene and different immune cell types. (A) AXL (B) CCL20 (C) CEBPA (D) CFD (E) FAP (F) FCER1G (G) LEPR (H) MMP13 (I) MYL9. Discussion Although more than 70% of the population is subjected to at least one traumatic incident in their lifetime, it is unclear why only a subset of individuals develop PTSD37. Recent research has demonstrated that the neuroendocrine and immunological systems play a role in the occurrence and development of PTSD38,39. The plasma levels of the pro-inflammatory cytokines (e.g., TNF-α, IL-6, and CRP) were found to be higher in PTSD patients compared with the control group40. Pressure stimulation of the hypothalamic-pituitary-adrenal axis (HPA) induces the generation of corticotropin-releasing hormone (CRH) from the hypothalamic paraventricular nucleus (PVN), promoting the production of adrenocorticotropic hormone (ACTH) in the anterior pituitary and inducing glucocorticoid secretion (cortisol) to reduce immune response28. However, individuals who experience stress events and acquire PTSD generally develop hypocortisol41, which explains why PTSD is often linked to sustained low-grade inflammation40. Most chronically stressed groups are prone to developing PTSD when subjected to extreme stress events42. The enrichment analysis of key genes identified by machine learning revealed that PTSD may have potential biological processes in inflammatory response and immune cell activation. In the present study, nine hub genes (CEBPA, MMP13, AXL, CCL20, CFD, FCER1G, LEPR, FAP, MYL9) were determined using bioinformatics tools. Upon reviewing the articles published on the datasets included in our methodology34,35, we found that the hub genes identified in both studies did not overlap and were inconsistent with our research findings. This observation hints at the potential biological significance of subtle changes in gene expression, particularly those related to immune genes, in PTSD research. To address this, we adopted a relatively lenient fold-change criterion in our methodology to ensure the inclusion of potential biomarkers and to avoid overlooking genes with smaller effects that may still possess biological significance. Furthermore, LASSO regression was utilized to screen for the most relevant key genes associated with PTSD from a vast number of differentially expressed genes43,44. Subsequently, bioinformatics methods were employed to further analyze the interactions and functions of these genes, identifying hub genes that play pivotal roles in the pathogenesis of PTSD. This strategy, which combines machine learning and bioinformatics, not only advances our understanding of PTSD but also provides a new direction for future PTSD research. Our study’s findings also have significant implications for potential diagnosis and treatment of PTSD. Comprehensive analysis of the selected genes not only aids in elucidating the mechanisms underlying PTSD but also offers novel strategies for targeted therapies. For instance, CCAAT enhancer binding protein A (CEBPA) is a critical transcription factor for granulocyte differentiation and plays a crucial role in regulating glucose metabolism45. Several studies have found a link between CEBPA mutation and acute myeloid leukemia46. Furthermore, some preliminary investigations have explored the function of CEBPA in Alzheimer’s disease, Parkinson’s disease, and multiple sclerosis47.Of note, the pathogenesis of these three diseases is related to immune system regulation. Moreover, the expression level of CEBPA was found to be increased in the lung tissues of sepsis patients48, and these mechanisms are potentially related to the occurrence and development of PTSD. Other hub genes, such as Matrix metallopeptidase 13 (MMP13) is a member of the metallopeptidase (MMP) peptidase M10 family that promotes NF-κB signaling pathway activation by converting pro-TNF-α to TNF-α49, and plays a role in immune regulation of various inflammatory diseases50,51. Additionally, MMP13 plays a potential role in the repair and plasticity of the nervous system, which may be linked to changes in neural plasticity in PTSD. TAM family members such as AXL (AXL receptor tyrosine kinase) are essential negative inflammatory mediators that block specific signaling pathways that activate dendritic cells, natural killer cells, and macrophages52–54. AXL promotes immune escape by activating the upregulation of BCL-2 and Twist, the inhibition of TLR inflammatory signaling and natural killer cells, and blocking the expression of pro-inflammatory cytokines55. Downregulation of AXL function increases chronic inflammation and autoimmune response56,57. AXL may potentially influence neuronal survival and neural network remodeling in PTSD. C-C motif chemokine ligand 20 (CCL20) is a cysteine-cysteine chemokine that was initially found to exert chemotactic effects on immature dendritic cells, effector or memory CD4 (+) T lymphocytes, and B lymphocytes58, and its expression increases multiple times during inflammation59. Biological agents, including infliximab, tolumab, and etanercept have been used to block CCL2060. CCL20 is the only high-affinity ligand known to bind CCR6 cells and induce their migration in tissues59. CCR6 is a G protein-coupled receptor involved in several biological processes60. The CCR6/CCL20 axis is crucial in immune homeostasis and activation61. CCL20 may play a role in PTSD by regulating immune responses and inflammatory processes in the brain. Complement factor D (CFD) is a serine protease that primarily exists in its active form in the circulation and is an essential enzyme for alternative pathway activation in the complement system62. The alternative pathway is the oldest evolutionary pathway of the complement system63. Slow and spontaneous C3 hydrolysis self-activation regulates inflammation and pathogens by initiating signal amplification and achieving phagocytic function. CFD is a limiting component of the alternative pathway. Therefore, CFD concentration regulates the activity and output of the alternative pathway, including the activity and output of the amplification loop64. CFD may be linked to PTSD by influencing immune responses and inflammatory pathways in the brain. The Fc epsilon receptor Ig (FCER1G) is a protein- encoding gene located on Chromosome 1q23.365, and is a component of the high-affinity IgE receptor and IL-3 receptor complex. FCER1G is primarily involved in allergic inflammatory signaling in mast cells; it selectively regulate basophil IL-4 basophil production, and initiates the transition of T cells to effector T helper cell 2 subpopulations66. FCER1G is not only an innate immune gene, but also a critical molecule in the signaling pathway that is involved in various immune responses and cell types67,68. Considering the potential mechanism of immune response in PTSD pathogenesis, FCER1G is link to PTSD. LEPR (leptin receptor) regulates weight by balancing food intake and energy expenditure. Besides, this adipocyte-derived hormone directs peripheral processes, including immunity and metabolism69. Immunity and metabolism are major risk factors for depression and anxiety disorders70. LEPR may influence stress response, emotional regulation, and cognitive function, which may contribute to PTSD. FAP (fibroblast activation protein alpha) is a type II transmembrane proteolytic enzyme of the serine protease peptidase family. FAP expression is low in normal tissues, but increases significantly in disease states71, with specific expression in tumors, fibrosis, arthritis, atherosclerosis, and autoimmune diseases72. Additionally, FAP plays a role in tissue remodeling and repair, and cell migration73, and is potentially linked to PTSD pathogenesis by participating in structure remodeling and repair in the brain. Myosin light chain 9 (MYL9) is a protein that regulates the contractility of non-muscle cells and smooth muscle cells74. MYL9 can form a network structure in the inflammatory site of blood vessels, exacerbating inflammation75. Furthermore, MYL9 has a role in the pathogenesis of various inflammatory diseases76. In this view, MYL9 may also be linked to the pathogenesis of PTSD. The immune regulatory mechanisms of PTSD have been explored using immune infiltration analysis. Future research may help uncover novel diagnostic and therapeutic tools by revealing the complex interaction between PTSD and the immune system. This study has several limitations. Firstly, despite standardization and correction efforts, the potential cross-platform heterogeneity among publicly available datasets may have introduced residual batch effects. Additionally, there was no stratification for the severity of post-traumatic stress disorder in the screened databases, which may obscure the biological differences between clinical subtypes and hinder the understanding of disease mechanisms. Secondly, these findings lack independent external validation, as the analysis was based on internal cross-validation within two datasets. Thirdly, cohort and demographic biases may exist, given that the included sample size was limited and derived from specific populations, which may restrict their generalizability. Moreover, these models exhibited small effect sizes and moderate predictive discrimination, indicating that the identified biomarkers require further validation in larger, multicenter cohorts. Finally, the black-box nature of machine learning models limits interpretability and clinical applicability, as the underlying decision-making processes are often opaque to clinicians77. Conclusions This work expands our understanding of the onset and development pathways of PTSD using machine learning and bioinformatics methods. Screening potential biomarkers and therapeutic targets, as well as performing enrichment and immune infiltration analyses, are critical for understanding the underlying biological processes and the immune regulatory mechanisms of PTSD. The findings provide a theoretical basis for developing potential therapeutic strategies. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 2 Supplementary Material 3 Supplementary Material 4 Supplementary Material 5 Supplementary Material 6 Supplementary Material 7 Supplementary Material 8 Supplementary Material 9 Supplementary Material 10 Supplementary Material 11 Supplementary Material 12 Supplementary Material 13 Supplementary Material 14 Supplementary Material 15 Abbreviations Post-traumatic stress disorder Differentially expressed gene Protein-protein interaction Area under curve Biological processes Cellular components Receiver operating characteristic Hypothalamic-pituitary-adrenal Corticotropin-releasing hormone Paraventricular nucleus Adrenocorticotropic hormone Author contributions PQ was major contributors in the writing of the manuscript. MH evaluated and revised the manuscript. HZ guided the writing of the manuscript and critically reviewed it. All authors read and approved the final version. Data availability Publicly available datasets were analyzed in this study. The datasets generated and/or analyzed during the current study are available in the GEO repository https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE63878; https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE81761. Declarations Competing interests The authors declare no competing interests. Ethics statement This study does not require the review and/or approval of the ethics committee because it is based on a public database. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Mengjie Huang, Email: huangmengjie301@163.com. Haiyan Zhu, Email: zhuhaiyan301@sina.com. References Associated Data Supplementary Materials Supplementary Material 1 Supplementary Material 2 Supplementary Material 3 Supplementary Material 4 Supplementary Material 5 Supplementary Material 6 Supplementary Material 7 Supplementary Material 8 Supplementary Material 9 Supplementary Material 10 Supplementary Material 11 Supplementary Material 12 Supplementary Material 13 Supplementary Material 14 Supplementary Material 15 Data Availability Statement Publicly available datasets were analyzed in this study. The datasets generated and/or analyzed during the current study are available in the GEO repository https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE63878; https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE81761.