{'fraction_non_alphanumeric': 0.023466349017272185, 'fraction_numerical': 0.011911852293031567, 'mean_word_length': 5.074891461649783, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
TripHLApan: predicting HLA molecules binding peptides based on triple coding matrix and transfer learning

Human leukocyte antigen (HLA) is an important molecule family in the field of human immunity, which recognizes foreign threats and triggers immune responses by presenting peptides to T cells. In recent years, the synthesis of tumor vaccines to induce specific immune responses has become the forefront of cancer treatment. Computationally modeling the binding patterns between peptide and HLA can greatly accelerate the development of tumor vaccines. However, most of the prediction methods performance is very limited and they cannot fully take advantage of the analysis of existing biological knowledge as the basis of modeling. In this paper, we propose TripHLApan, a novel pan-specific prediction model, for HLA molecular peptide binding prediction. TripHLApan exhibits powerful prediction ability by integrating triple coding matrix, BiGRU + Attention models, and transfer learning strategy. The comprehensive evaluations demonstrate the effectiveness of TripHLApan in predicting HLA-I and HLA-II peptide binding in different test environments. The predictive power of HLA-I is further demonstrated in the latest data set. In addition, we show that TripHLApan has strong binding reconstitution ability in the samples of a melanoma patient. In conclusion, TripHLApan is a powerful tool for predicting the binding of HLA-I and HLA-II molecular peptides for the synthesis of tumor vaccines.

peptide often show peptide-binding motifs. Studies [36][37][38] suggest that the binding process of peptides with length 8 to HLA-I may involve the change of HLA-I molecular structure. Therefore, in the process of HLA-I model training, we first use the data sets of peptides in length 9-14 for model training, and then transfer the model to peptides in length 8.
This training strategy ensures that the binding model of peptide with lengths 9-14 is not influenced by the data of peptide with length 8, and also ensures that the prediction model of peptide with length 8 retains the learned HLA-I binding characteristics of peptides with lengths 9-14.
In order to better simulate the binding relationship between HLA molecules and peptides, we have analyzed the location characteristics of HLA binding peptides on different locus by Uniprot database. As shown in Figure 1c The two chains of HLA molecule play a role together in the binding relationship with peptide. We specifically extract two 100mer subsequences of different locus according to their different peptide binding sites to represent the two chains of HLA-II molecules, and feed them into the model respectively. See Methods for more details. TripHLApan outperforms baseline methods on HLA-I binding prediction. We compare TripHLApan with several carefully selected tools for classification performance, including the highly cited PickPocket 39 , netMHCstabpan 22 , and MixMHCp 18 , which are considered the best predictive tool in a recent survey 40 , and five recent pan-specific tools: MHCSeqNet 24 , MHCflurry 2.0 41,42 , and NetMHCpan 4.1 19 , MATHLA 17 , MHCnuggets 8 . The test data set used to compare the performance of each tool is from the test set from publications and random negative peptide library (these negative peptides are obtained by random clipping from proteins, and the negative peptides used to fill the test and training sets is from two completely independent random negative peptide libraries), which is fair to the benchmarking tools. Even this testing is slightly unfair to TripHLApan on the unseen set since the benchmarking tool's training process contains more items from our unseen sets (see Figure 2a). The area under the receiver operating characteristics curve (AUC) is adopted to measure the classification ability of positive and negative samples of the prediction model. In order to eliminate the deviation of AUC values caused by the imbalance of positive and negative samples, AUPR is also used to compare their predictive performance. In addition, top-PPV (positive predict value) is estimated from the fraction of positive peptides within the top N predictions, where N denotes the number of true positive samples from the test samples. In the independent test set, we further define the test and unseen sets here. Their meanings are as follows: The allele types in the test set occur in the training set, and the allele types in the unseen set do not occur in the training set.
The results in Table 1 show that TripHLApan is a powerful predictive tool on both test and unseen sets. TripHLApan has not only strong predictive power but also strong generalization ability. Figure 2b shows that in the test set, TripHLApan outperforms all other tools in predicting peptides of different lengths on the rate of positive and negative samples at 1:5/1:1/1:10/1:50. Moreover, TripHLApan's performance degrades much slower than the other methods for longer peptides. In particular, on the rate of positive and negative samples at 1:5, TripHLApan's AUC value outperforms the second-ranked models by 1.2%, 6.1%, 18.8%, 10.3%, and 24.9% for peptide lengths of 10/11/12/13/14 in the independent test set, respectively. The unseen set, whose goal is to measure the model's generalization ability, has alleles not seen in the TripHLApan's training set. The results show that the AUC curves of TripHLApan are similar to those of the tools in comparison. Especially when the peptide length is over 12, TripHLApan exhibits significantly higher AUC values than the other tools. Furthermore, TripHLApan has the highest AUPR values (see Table 1 and Figure 2c), indicating that TripHLApan is able to handle different data set environments and can actually achieve good prediction results. Figure 2 c&d shows the AUPRs and top-PPVs of selected tools with positive and negative samples at 1:1/1:5/1:10/1:50. One can find that the prediction accuracy of TripHLApan is comparable to NetMHCpan, MixMHCp and MHCflurry on the unseen set, and it shows better prediction ability in other test sets. This suggests that TripHLApan can effectively learn the patterns between sequences and binding patterns and thus pick out the most likely combinations of potential compounds, even when the sample ratios are much more stringent, such as 1:10 and 1:50. Then, TripHLApan's strong learning ability on the new alleles is verified. We randomly select 4/5 portion of the unseen set to perform transfer learning using TripHLApan, and the remaining 1/5 portion is used for testing. The results are shown in Figure 2b 'unseen set (left)' where the prediction from TripHLApan is improved after transfer learning.
This indicates that TripHLApan can adapt easily to a variety of prediction environments. Even on the allele conjugate that has never been seen before, TripHLApan can take advantage of known data for transfer learning to enhance its prediction capability. To eliminate the unseen set's unfairness to TripHLApan and the benchmark tools, we extract the alleles that do not appear in all tool's training sets (named 'all unseen set'), a total of 19,160 items on 13 HLA alleles.
TripHLApan obtains the highest AUC/AUPR and top-PPV scores (see Figure 3). Therefore, we believe that, with the increase of HLA molecular-peptide data, TripHLApan can also achieve good prediction results after simple transfer learning on new allele data set.   Testing on the latest data set. We have tested TripHLApan on the recent data set from the IEDB database to further verify its validity. Firstly, we extract the recent data set from the IEDB (downloaded on October 7, 2021), and dereplicate it with the train set, test set, and unseen set used in this paper to ensure that the new test data are completely new to the model. Then, the new data set is purified in the same way described in this paper. Finally, a total of 68,277 data samples are obtained, including 14,705 positive samples. Figure 4 a/c/d shows that TripHLApan still achieves the best prediction performance in the recent test set compared with the three models that perform better in the test set. In addition, we divide the recent data set into different subsets based on different peptide lengths to evaluate the performance differences of the tool on different peptide lengths. After excluding data sets with sample numbers less than 50, the prediction results of different subsets are shown in Figure 4b. TripHLApan is also a leading method in predicting peptide groups of different lengths. In conclusion, we compare the prediction performance of different tools based on the latest epitope data collected by IEDB, and the results show that TripHLApan has a more stable prediction performance under different prediction environments. Proper model architecture and data preprocessing contribute to better model performance. We attribute TripHLApan's strong predictive power to its appropriate model combination and correct strategy selection. Firstly, three parallel sequence encoding methods are used to extract the information contained in the sequence from the perspectives of biochemical properties of amino acids, substitution probability and inherent hidden information related to binding. It is important to note that the biochemical properties of amino acids have been neglected by most methods, but these properties turn out to be crucial in predicting the combination of peptides and HLA molecules. Secondly, BiLSTM and BiGRU models, which can learn the relationship between sequence context information, are selected not only because they are as effective as described, but also because they do show strong predictive power in previous studies 24 . According to our preliminary comparative experiments, BiGRU is selected as our basic model unit. Thirdly, we add Self-Attention modules into TripHLApan to pay attention to the weight of each subsequence of peptides and HLA-I molecules. We choose this kind of Self-Attention approach because of the observed phenomenon of 'significant anchor residues at both ends of the peptide' 18 . Selecting such modules allows TripHLApan to better capture the complex correlations of the anchor sites and their adjacent sites, and maximize the exposure of anchor residues at both ends of the sequence. Finally, the transfer learning strategy reduces the performance loss caused by excessive mixing of data and retains the learned binding modes. In addition, the 'dropout' and 'early termination' strategies also play an important role in preventing overfitting and improving model stability. Table 2 shows the results of some ablation models compared with the original model. One can find that TripHLApan [AAIndex]. The training strategy of transfer learning limits the prediction ability of peptide length 8 to some extent, but it is extended for longer peptide length (11/12/13/14). By comparing the results in Table 1 and Figure 4 e&f one can find that TripHLApan's prediction performance at different lengths is occasionally worse than that of some reference tools, but its overall AUC is much better than the other tools. This suggests that TripHLApan's ability to separate positive and negative samples remains stable across data sets with peptides of different lengths. This is an important ability for predictive tools, especially when most current tools use defined thresholds for dividing positive and negative samples. In general, TripHLApan collects more comprehensive sequence information and amino acid characteristics, and adopts biological prior knowledge. As a result, it greatly improves the accuracy of binding prediction of HLA-I molecules with peptides.

TripHLApan can predict Single-Patient Cancer Immunopeptidome. To test the clinical application of
TripHLApan, we collect individual patient melanoma-related Immunopeptidome data sets [43][44][45] . In this data set, the true binding relationship between HLA-I molecule and the peptide is unknown. We use TripHLApan to reconstruct the HLA-I molecule and peptide correspondence in various cell lines. TripHLApan's ability to re-annotate peptide presentation molecules is tested by calculating the Pearson correlation coefficients (PCCs) between the frequencies of amino acids in the predicted positive sample at each location and the frequencies of amino acids in the real binding.
The comparison tools NetMHCpan and MixMHCp are excluded because they have already included these four cases in their training set. We also exclude PickPocket, MATHLA, and MHCnuggets here, due to their poor performance on the top-PPV according to Figure 2d. Figure 5 shows the average PCCs of tools on the data sets with peptide lengths at 9 and 10. TripHLApan has demonstrated a powerful ability to reconstruct peptide-HLA-I molecular relationships.
TripHLApan's deconvolution ability is more stable in various cell lines compared to other methods. Especially in Mel5 and Mel8, when the peptide length increases from 9 to 10, the relationship reconstruction ability of all other tools decreased significantly, while TripHLApan remains stable in contrast. This not only demonstrates TripHLApan's ability to reconstruct relationships with peptide samples of length 9 (the most common peptide length), but also shows TripHLApan's stability over longer peptide samples. For more detailed results, see Supplementary Table S1 and S2.  Table S3 and Table S4). Figure 6 shows the AUC distribution comparison results on the allele sets that most of the tools can predict, where TripHLApan (AAIndex) denotes the result of a version of TripHLApan only using AAIndex features. Next, we compare the performance of MHCnuggets in class II that can also do the binding prediction task of HLA-I and II peptides. The results show that TripHLApan can achieve better prediction accuracy on 31 alleles in 36 alleles collections supported by MHCnuggets. More detailed results are also shown in Supplementary Table S3 and Table S4. Overall, TripHLApan, as a pan-specific model that can predict more allelic types, has achieved a prediction accuracy not reachable before.

Figure 6. AUC distribution of TripHLApan compared with baseline methods on 35 Allele sets on HLA-
II-peptide binding prediction.

Discussion
In this work, we propose TripHLApan, a new predictive model of HLA-I binding with peptides integrating multiple features. We first analyze the biological and statistical characteristics of HLA molecule-peptide binding and obtain a more appropriate amino acid sequence preprocess scheme. Then, we integrate the biochemical characteristics of amino acids rarely used in other tools, and form a parallel sequence coding and training network with the probability of amino acid replacement and Embedding features. Finally, we use Attention module to learn the context information contained in each local sequence after BiGRU, avoiding the loss of sequence information caused by excessive attention to position-specific factors in the modeling process. TripHLApan is confirmed to be superior to the current state-of-theart prediction tools by a 5-fold cross-validation. On the task of HLA-I-peptide binding prediction, we also test the generalization ability of the model with allele binding sample sets that do not appear in the TripHLApan training set the contextual relationship between adjacent amino acids within the sequence, which may lose important biological information. In order to find out the effect of encoding methods on the results, we investigate the relationship between sequence similarity and motif similarity of binding peptides under several different encoding schemes. We select 45 alleles with positive samples of more than 100 peptides and calculate the similarity between their sequences and the similarity of peptide motifs respectively. The results are illustrated in Figure 7. There are 11 allele families with similar binding peptide motifs. Pair similarity based on full sequence of alleles can capture the similarity of 10 motif groups except the first one, while the other two pseudo sequences 38,53 can capture only 7 motif groups. This indicates that these two pseudo sequences can only capture part of the key information of alleles binding to the peptides, but they have difficulty in extracting more comprehensive information. Allele representation based on the full sequence is a more stable and comprehensive way for sequence information extraction. The allelic similarity based on the full sequence is poorly matched with the binding motifs of the first group, which may be due to the low similarity of the parts of the sequence unrelated to the binding relationship in this group of alleles. This suggests that extracting the useful sequence information embedded in the full sequence is useful for modeling their binding process.