All study findings in the pooled cohort were repeated within each cohort. The inference results and direction of association in the pooled cohort data is similar with the within-cohort data (figures not shown). The combined failure-time endpoints plot for all cohorts graphically shows no significant difference in both endpoints among the cohorts (Extended Data Fig. 2g). Kaplan-Meier analysis and univariable Cox regression analysis (coxph() function) were done using the R packages survival and survminer to evaluate the association between progression-free and overall survival times and genomic alterations (amplification, deletion, truncating mutation, HLA heterozygosity or infiltration). Significance testing for differences in progression-free survival (PFS) or overall survival (OS) was performed using the log-rank test (survdiff() function) at a significance level of p < 0.05. Additional multivariable analysis including MSKCC risk group, lines of therapy (≤1 or ≥2), or timing of sample collection (days before beginning trial therapy) as covariates confirmed the significant association of truncating mutations in PBRM1, del(10q23.31), and del(9p21.3) within infiltrated tumors as significantly associated with altered PFS and OS. All comparisons of discrete variables between groups (clinical benefit vs. no clinical benefit, CRPR vs. PD, genomic alteration vs. WT, or infiltrated vs. not infiltrated) were done with the non-parametric Wilcoxon rank-sum test (wilcox.test() or stat_compare_means(method = “wilcox”) R function, two-sided, from stats or matrixTests package). All comparisons were two-sided with an alpha-level of 0.05. For all box-plots, data distribution is shown through the violin-plot, the center line represents the median; the box limits represents the upper and lower quartiles; and the whiskers represent 1.5 times the interquartile range (outlier points outside of this range are shown as part of the box-plot). Comparisons of the copy number alterations by infiltration state were done with Fisher’s exact tests (fisher.test() R function, two-sided, from stats package). The Benjamini-Hochberg method for controlling false discovery rate (FDR) was applied to control for multiple hypothesis testing among different comparisons: for immune infiltration phenotype comparisons with a threshold of q < 0.05; for ssGSEA and CIBERSORTx scores comparisons with two thresholds of q < 0.05 and q < 0.25. All statistical analyses and figures were generated in R version 3.6.0.