BackgroundThe purpose of this study was to evaluate the role of differentiation-related genes (DRGs) in tumor-associated macrophages (TAMs) in non-small cell lung cancer (NSCLC).MethodsSingle cell RNA-seq (scRNA-seq) data from GEO and bulk RNA-seq data from TCGA were analyzed to identify DRGs using trajectory method. Functional gene analysis was carried out by GO/KEGG enrichment analysis. The mRNA and protein expression in human tissue were analyzed by HPA and GEPIA databases. To investigate the prognostic value of these genes, three risk score (RS) models in different pathological types of NSCLC were generated and predicted NSCLC prognosis in datasets from TCGA, UCSC and GEO databases.Results1,738 DRGs were identified through trajectory analysis. GO/KEGG analysis showed that these genes were predominantly related to myeloid leukocyte activation and leukocyte migration. 13 DRGs (C1QB, CCL4, CD14, CD84, FGL2, MS4A6A, NLRP3, PLEK, RNASE6, SAMSN1, SPN, TMEM176B, ZEB2) related to prognosis were obtained through univariate Cox analysis and Lasso regression. C1QB, CD84, FGL2, MS4A6A, NLRP3, PLEK, SAMSN1, SPN, and ZEB2 were downregulated in NSCLC compared to non-cancer tissue. The mRNA of 13 genes were significantly expressed in pulmonary macrophages with strong cell specificity. Meanwhile, immunohistochemical staining showed that C1QB, CCL4, SPN, CD14, NLRP3, SAMSN1, MS4A6A, TMEM176B were expressed in different degrees in lung cancer tissues. ZEB2 (HR=1.4, P<0.05) and CD14 (HR=1.6, P<0.05) expression were associated with a worse prognosis in lung squamous cell carcinoma; ZEB2 (HR=0.64, P<0.05), CD84 (HR=0.65, P<0.05), PLEK (HR=0.71, P<0.05) and FGL2 (HR=0.61, P<0.05) expression were associated with a better prognosis in lung adenocarcinoma. Three RS models based on 13 DRGs both showed that the high RS was significantly associated with poor prognosis in different pathological types of NSCLC.ConclusionsThis study highlights the prognostic value of DRGs in TAMs in NSCLC patients, providing novel insights for the development of therapeutic and prognostic targets based on TAM functional differences.