The infiltration abundance of activated memory CD4 T cells and CD8 T cells had a significant effect on the overall survival of STAD patients. Here, CD4 is linked to gastric adenocarcinoma.