In this report, we developed the computational method TMEPRE for colorectal cancer patients, which measures two factors of the tumor microenvironment that contribute to anti-PD1 resistance: CD8+ T-cell infiltration (TME1.TcellInfiltration) and whether tumor-infiltrating CD8+ T cells can respond to cancer immunotherapy (TME2.TcellResponse). This evidence concerns the gene CD8A and cancer.