After adjusting for age, Firth's logistic regression demonstrated that both the CD4+/CD8+ ratio and nCD64 index retained independent differential diagnosis value for differentiating lung cancer from pulmonary infection (both P<0.05).<h4>Conclusions</h4>The combined detection of the CD4+/CD8+ ratio and nCD64 index in BALF improves the diagnostic efficacy for differentiating lung cancer from pulmonary infection. This evidence concerns the gene CD8A and lung carcinoma.