We therefore established a computational diagnostic algorithm to quantitatively measure spatial densities of tumor-infiltrating CD8+ T cells by digital pathology within the three known tumor compartments as recommended by the International Immuno-Oncology Biomarker Working Group in 116 prospective metastatic melanomas of the Swiss Tumor Profiler cohort. Here, CD8A is linked to metastatic melanoma.