(A) Amino-acid usage log-enrichment of immunogenic to non-immunogenic peptides, across central positions (4-8) for each HLA type. The color code indicates amino acid properties: negatively charged (red), positively charged (blue), polar (purple), aromatic (yellow), aliphatic hydrophobic (black), cysteine (green), tiny (grey). (B) DiffRBM predicts a positive contribution to immunogenicity of key residues, in agreement with observations. (Top) DiffRBM single-site factors distribution evaluated across HLA-A*02:01-specific immunogenic sequences with W at position 5. (Bottom) The single-site factors given by the immunogenic vs non-immunogenic amino acid frequency ratio, which do not include the sequence context (Materials and methods), predict a much lower contribution to immunogenicity, as indicated by the p-values of their difference with respect to the average of the diffRBM single-site factors distribution. (C) Illustration of TCR activation curves from Łuksza et al., 2022 for wild-type () peptide NLVPMVATV and its point-mutants (). (D) Total count of lethal mutation costs (214 of 513 TCR-mutant combinations), plotted per mutated peptide position. (E) DiffRBM units predicted costs of lethal mutations are mostly positive (Materials and methods). (F) Non-lethal mutation costs sum (299 of 514 TCR-mutant combinations) per mutated peptide position. (G) Experimental vs background RBM predicted costs for non-lethal mutations, for one TCR (TCR1). Spearmann correlation coefficients are comparable across all 3 TCRs, with p-values ≤10-6 (Figure 3—figure supplement 1B).