Multiplex immunofluorescence analysis (mIF) was performed on two TMA sections (3 μm) for detection of Panel 1 (CD3, CD8, and FOXP3) and Panel 2 (CD20, CD68, CD163, and HLA-A, B, C) as in Taber et al.41. Stainings were performed on the Discovery ULTRA staining instrument (Ventana Medical Systems), all primary antibodies are listed in Supplementary Data 1. We deparaffinized TMA sections using the EZ Prep solution (Ventana Medical Systems, cat # 950-102) for 16 min at 72 °C. Afterwards, heat-induced epitope retrieval using CC1 solution (Ventana Medical Systems, cat# 950-124) was run for 64 min at 95-100 °C. Then, endogenous peroxidase activity was blocked using a DISC inhibitor reagent (Ventana Medical Systems, cat#760-4840). For fluorescent detection, we utilized a tyramide signal amplification strategy with horseradish peroxidase (HRP)79. The first primary antibody (1-ab) was incubated followed by detection using a secondary antibody (2-ab) conjugated with HRP (listed in Supplementary Data 1). Two rinses with reaction buffer (Ventana Medical Systems, cat# 950-300) was then carried out followed by adding and incubating the tyramide conjugated fluorophore (TcF, listed in Supplementary Data 1) for 4 min. We then applied 0.01 % H2O2 (DISCOVERY reagent, Ventana Medical Systems,cat#760-244), and let the TcF react with the HRP in the 1-ab/2-ab complex for 8 min. Heat-mediated stripping of the antibodies was run for 20 min at 100 °C using a CC2 buffer (Ventana Medical Systems, cat#950-223). The cycle was then repeated sequentially with a new 1-ab/2-ab complex and TcF in the order listed in Supplementary Data 1. Afterwards, the TMA sections were counterstained with VECTASHIELD anti-fade mounting medium with DAPI (Ventana Medical Systems, cat#H-1200) for nuclear detection. The fluorophore-labeled sections were imaged at 20× magnification using the NanoZoomer s60 scanner (Hamamatsu Photonics KK, Japan). Immunostaining for pan-cytokeratin (Clone A1/A3, 1:100, 16 min, Dako Agilent, cat#GA005361-2) as a second layer was performed on all mIF stained sections to outline carcinoma cells. For bright-field detection, we used the Ventanas Detection Kits: ultraView Universal 3,3’-Diaminobenzidin (Ventana Medical Systems, cat#760-500) according to the manufacturer’s instructions. We counterstained all TMA sections with hematoxylin II (Ventana Medical Systems, cat#790-2208) for 8 min, followed by Bluing reagent (Ventana Medical Systems, cat#760-2037) for 4 min. The Hamamatsu Nanozoomer 2.0 HT (Hamamatsu Photonics KK, Japan) was used for bright-field imaging.

Identification of PD-L1 expression in the tumor parenchyma was performed using two sequential TMA sections, the first section stained against pan-cytokeratin (Clone A1/A3, 1:100, 16 min, Dako Agilent, cat#GA005361-2) and the second against PD-L1 (Clone Sp263, ready to use, 60 min, Ventana Medical Systems, cat#790-4905). Identification of basal and luminal markers on the carcinoma cells was performed using three sequential TMA sections, stained for pan-cytokeratin (Clone A1/A3, 1:100, 16 min, Dako Agilent, cat#GA005361-2), GATA3 (Clone L50-823, ready to use, 24 min, Ventana Medical Systems, cat#7107749001) and CK5/6 (Clone D5/16 B4, ready to use, 24 min, Agilent/Dako cat#M7237). For bright-field detection, the above-mentioned method was used.