Mediastinal lymph nodes of patients with IPF had significantly higher PD-1 expression and CD4/CD8 ratio compared to patients with lung cancer, indicating distinct immune-mediated pathways regulating fibrogenesis and carcinogenesis. This evidence concerns the gene CD8A and lung cancer.