Bidirectional peptide sequencing method based on self-attention mechanism and application
The bidirectional peptide sequencing method based on the self-attention mechanism directly infers peptide sequences from experimental data, solving the problems of insufficient ability to discover new peptides and proteins and incomplete evaluation in existing technologies, and achieving more efficient peptide sequence inference and evaluation.
Patent Information
- Application Number
- CN202211615090.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-12-15
AI Technical Summary
Existing peptide sequencing methods rely on existing databases, resulting in insufficient ability to discover new peptides and proteins, as well as problems such as uneven output, accumulated bias, and a lack of detailed and comprehensive evaluation indicators.
A bidirectional peptide sequencing method based on the self-attention mechanism was adopted. By optimizing the model through bidirectional prediction and the self-attention mechanism module, peptide sequences were directly inferred from experimental data. New evaluation indicators such as position BLEU and alignment score were designed.
It enables the discovery of new peptides and proteins without relying on databases, solves the problems of output imbalance and bias accumulation, and provides a more comprehensive evaluation method.
Smart Images

Figure CN115862742B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of protein sequencing, and in particular to bidirectional peptide sequencing methods and applications based on self-attention mechanisms. Background Technology
[0002] Proteomics is an emerging discipline that studies protein expression and its activity patterns at the organ, tissue, cell, and subcellular levels. Since the Human Proteome Project, mass spectrometry-based proteomics technologies have developed rapidly and are gradually being applied to life science research. Based on protein sequence identification and combined with various quantitative techniques, they have revealed the laws governing life processes.
[0003] In proteomics research, protein identification technology is the most crucial part. Reliable peptide sequencing results are essential for better inferring protein sequences, interpreting protein expression, and understanding interactions. Peptide sequencing involves analyzing mass spectrometry data to reconstruct peptide sequences. Traditional mass spectrometry-based peptide sequencing methods include: sequence database search-based identification and spectral library search-based identification. Sequence database search-based identification involves theoretically digesting known protein sequences in a database to form peptides. Based on the mass of the precursor ion measured in the mass spectrometer data, candidate peptides within the mass error range are identified. These candidate peptides are then theoretically fragmented to form theoretical spectra. Finally, the experimental spectra to be identified are matched and scored against the theoretical spectra, and the identification result is determined based on the scoring. Spectral library search-based identification is similar to sequence database search-based identification, comparing the experimental spectra to be identified with a reference spectrum. However, the difference lies in the reference spectrum: the reference spectrum in the spectral library search-based identification strategy is derived from an actual spectrum already determined in the experiment.
[0004] The advantages of the above peptide sequencing methods are that they are relatively easy to implement, but they have many drawbacks due to their reliance on existing databases:
[0005] (1) Poor discoverability: It can only identify peptides or proteins that exist in the reference database, but cannot discover new peptides or proteins.
[0006] (2) Poor universality: It is not applicable to the analysis of protein samples from non-model species that lack reliable protein reference sequences, and the accuracy of identification is limited by the quality and completeness of the reference library.
[0007] (3) Low utilization of reference database: The search space of reference database is constantly expanding, and a large part of the spectra have not been used in database-based search and identification, resulting in low utilization.
[0008] Therefore, peptide sequencing methods that do not rely on sequence databases and spectral libraries are particularly important, especially for discovering new peptides and proteins that do not exist in the libraries.
[0009] Furthermore, existing de novo peptide sequencing studies are limited and have low accuracy, exhibiting prediction imbalance: the accuracy of the first few amino acids predicted in forward sequencing is higher than that of the last few. In backward sequencing, the accuracy of the first few predicted amino acids is higher than that of the last few. Simultaneously, due to quality constraints in peptide sequence prediction, errors in the current amino acid prediction affect all predictions after that position, leading to bias accumulation. Moreover, peptide sequencing tasks require evaluating the matching between predicted peptides and the standard answer. Existing de novo sequencing algorithms only calculate the number of perfectly matching peptides, lacking more detailed and comprehensive evaluation metrics. Therefore, it is necessary to design a de novo sequencing algorithm that can address output imbalance and bias accumulation issues in data-independent acquisition methods, and to evaluate it using more comprehensive and detailed metrics. Summary of the Invention
[0010] This application provides a bidirectional peptide sequencing method and application based on a self-attention mechanism. By utilizing bidirectional prediction and a self-attention mechanism module to optimize the model, it achieves the effect of inferring peptide sequences directly from the accurate quality of experimentally generated secondary and primary spectra without relying on databases, which is beneficial for the discovery of new peptide proteins.
[0011] In a first aspect, embodiments of this application provide a bidirectional peptide sequencing method based on a self-attention mechanism, comprising the following steps:
[0012] Feature extraction and preprocessing: Obtain raw mass spectrometry data, process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features;
[0013] Bidirectional prediction: The peptide features and the secondary fragment ion spectrum are input into the bidirectional independent sequencing model in the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences. The peptide features and the secondary fragment ion spectrum are input into the bidirectional interactive sequencing model in the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences. The union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences is taken as the final candidate sequence.
[0014] Reordering: The final candidate sequences are input back into the bidirectional independent sequencing model for scoring, and the peptide sequence with the highest score is selected as the prediction result.
[0015] Secondly, embodiments of this application provide a bidirectional peptide testing device based on a self-attention mechanism, comprising the following:
[0016] Feature extraction and preprocessing unit: used to acquire raw mass spectrometry data and process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features;
[0017] A bidirectional prediction unit is used to input the peptide features and the secondary fragment ion spectrum into the bidirectional independent sequencing model of the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences, input the peptide features and the secondary fragment ion spectrum into the bidirectional interactive sequencing model of the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences, and take the union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences as the final candidate sequences.
[0018] The reordering unit is used to input the final candidate sequence back into the bidirectional independent sequencing model for scoring, and select the peptide sequence with the highest score as the prediction result.
[0019] Thirdly, embodiments of this application provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the described bidirectional peptide sequencing method based on a self-attention mechanism.
[0020] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the bidirectional peptide sequencing method based on a self-attention mechanism according to any one of the claims.
[0021] The main contributions and innovations of this invention are as follows:
[0022] This application's embodiments differ from existing methods based on sequence database searches and spectral library searches by employing a bidirectional peptide sequencing model optimized with a self-attention mechanism module. This model enables bidirectional peptide testing without relying on a database, allowing direct inference of peptide sequences from experimentally generated secondary spectra and the precise mass of primary precursor ions, thus facilitating the discovery of new peptide proteins. Furthermore, the introduction of a self-attention mechanism module allows for better learning of the internal patterns of peptide sequences, as well as the patterns and other important characteristics of fragment ions in tandem mass spectrometry, providing a new solution for the analysis and inference of secondary spectra. Additionally, this approach incorporates a bidirectional prediction and model-based re-scoring structure to address the issues of unbalanced output and accumulated bias in peptide sequence prediction.
[0023] In addition, this scheme addresses the problem that existing de novo sequencing algorithms only calculate the number of perfectly matched peptides and lack more detailed and comprehensive evaluation metrics. It designs peptide de novo sequencing evaluation metrics that more comprehensively consider the loss of secondary spectrum fragment ions and amino acid misalignment in peptide sequences.
[0024] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0026] Figure 1 This is a logic flowchart of a bidirectional peptide sequencing method based on a self-attention mechanism according to an embodiment of this application;
[0027] Figure 2 This is a schematic diagram of a bidirectional independent sequencing model according to this application;
[0028] Figure 3 This is a schematic diagram of the spectrum-peptide attention mechanism;
[0029] Figure 4 This is a schematic diagram of bidirectional independent prediction;
[0030] Figure 5 This is a schematic diagram of a two-way interactive test;
[0031] Figure 6 This is a computational diagram of the bidirectional synchronous self-attention mechanism module;
[0032] Figure 7 This is a schematic diagram of bidirectional interactive predictive beam search;
[0033] Figure 8 This is a structural block diagram of a bidirectional peptide testing device based on a self-attention mechanism according to an embodiment of this application;
[0034] Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0035] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0036] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0037] Example 1
[0038] This approach provides a bidirectional peptide sequencing method based on a self-attention mechanism. This method can infer the amino acid sequence of peptides directly from the experimentally generated secondary spectra and the precise mass of the primary precursor ion, without relying on existing protein sequence reference databases or spectral libraries. This method is used to discover new peptides and proteins from unknown sequences. Furthermore, the bidirectional peptide sequencing model is designed with peptide quality constraints to adjust the prediction results of de novo peptide sequencing, thereby solving the problems of unbalanced output and accumulated bias in existing de novo sequencing methods.
[0039] Specifically, the bidirectional peptide sequencing method based on self-attention mechanism provided in this scheme includes the following steps:
[0040] Feature extraction and preprocessing: Obtain raw mass spectrometry data, process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features;
[0041] Bidirectional prediction: The peptide features and the secondary fragment ion spectrum are input into the bidirectional independent sequencing model in the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences. The peptide features and the secondary fragment ion spectrum are input into the bidirectional interactive sequencing model in the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences. The union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences is taken as the final candidate sequence.
[0042] Reordering: The final candidate sequences are input back into the bidirectional independent sequencing model for scoring, and the peptide sequence with the highest score is selected as the prediction result.
[0043] In the "feature extraction and preprocessing" step, this scheme extracts peptide features from the raw mass spectrometry data and secondary fragment ion spectra related to the peptide features, wherein the peptide features refer to traces of a single peptide, and the secondary fragment ion spectra are extracted from the raw mass spectrometry data and are related to the peptide features.
[0044] In mass spectrometry experiments, the use of SILAC stable isotope labeling technology introduces mass differences between identical peptides. Since identical peptides have equal charge, when a peptide is plotted on a heatmap, the precursor ions of the same peptide produce parallel traces with equal spacing in the mass-to-charge ratio dimension. For example, peptides labeled with carbon-12 (12c) and carbon-13 (13c) have different masses. If the charge of the peptide is z = 2, the distance between the trace lines in the mass-to-charge ratio dimension is 0.5 m / z. Therefore, this method uses the traces of individual peptides as peptide characteristics. Correspondingly, parallel traces with equal spacing in the mass-to-charge ratio dimension on the primary mass spectrometer are used as peptide characteristics.
[0045] However, peptide features are extracted from primary mass spectrometry (MS) data, while secondary mass spectrometry (MS) data plays a crucial role in the qualitative analysis of peptide proteins. Therefore, this approach also requires obtaining secondary fragment ion spectra related to the peptide features. Since raw MS data acquired using different mass spectrometers may have different formats (e.g., data from a Thermo-type mass spectrometer is typically in .raw format), this approach requires converting the raw MS data into a unified spectral format and using the CWT method with an MS level of 1-2 to extract secondary fragment ion spectra from the raw MS data, and then correlating these secondary fragment ion spectra with the peptide features.
[0046] In one embodiment of this scheme, the unified spectral format is chosen to be the more intuitive MGF file. In this case, the raw data (.raw) file is first converted into a spectral format (.mgf) file using MSConvert software. The specific steps to obtain the secondary fragment ion spectrum associated with the peptide feature are as follows: Read the raw mass spectrometry data in the unified spectral format, establish a dictionary sequence storing the keywords "Scans" and "Pepmass", given the peptide feature and retention time range, traverse the dictionary sequence, and select fragment ions whose "Rtinseconds" field is between the peptide feature RTBegin and RTEnd and whose "Pepmass" field of the secondary fragment ion can cover the mass-to-charge ratio of the peptide feature. Obtain the secondary mass spectrum of the fragment ion as the secondary fragment ion mass spectrum.
[0047] This scheme uses peptide features and the secondary fragment ion spectra associated with the peptide features as input features in a bidirectional peptide sequencing model. The bidirectional peptide sequencing model includes a parallel bidirectional independent sequencing model and a bidirectional interactive sequencing model. The input features are used in the bidirectional independent sequencing model to perform bidirectional independent prediction to obtain bidirectional independent prediction candidate sequences, and the input features are used in the bidirectional interactive sequencing model to perform bidirectional interactive testing to obtain bidirectional interactive prediction candidate sequences. The union of the bidirectional interactive prediction candidate sequences and the bidirectional independent prediction candidate sequences is taken as the final candidate sequence.
[0048] Specifically, this plan first introduces bidirectional independent sequencing models, such as... Figure 2 As shown, the bidirectional independent sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are independently input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the peptide sequence self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional independent prediction candidate sequences.
[0049] The bidirectional independent sequencing model in this scheme adopts an encoder-decoder architecture. The encoder contains a global CNN network, and the secondary fragment ion spectrum serves as the input feature of the encoder. The global CNN network of the encoder encodes the global representation of the secondary fragment ion spectrum to obtain the global features of the secondary spectrum. More specifically, the global CNN network contains CNN layers and fully connected layers. The global representation of the secondary spectrum undergoes a max pooling layer, two layers of three-dimensional convolutional kernels, and a max pooling layer in the CNN layer before being input into the fully connected layer to obtain the global features of the secondary spectrum with a specific vector size.
[0050] In one example of this scheme, the global representation of the secondary spectrum is a vector of size (5, 150000), where 5 is the retention time dimension and 150000 is the mass-to-charge ratio dimension. After the encoder passes through the global representation of the secondary spectrum, it outputs a global feature of the secondary spectrum of size (16, 256).
[0051] The attention decoder includes a position encoding module, a peptide sequence self-attention mechanism module, and a spectrum-sequence attention mechanism connected in sequence. The peptide sequence is first input into the position encoding module to encode the sequence position, thereby obtaining the sequence position code. The position encoding module includes an embedding layer and a position encoding layer. The peptide sequence is input into the position encoding module and the output sequence position code is obtained.
[0052] The peptide sequence self-attention mechanism module in the attention decoder is used for relation mining of peptide sequences. This module employs a scaled dot product attention mechanism, which maps the query and a set of key-value pairs to the output. Specifically, since peptide sequencing is similar to text generation in natural language processing, it can only use already predicted amino acids to predict the amino acid at the current position. Where Q... j Let K be the query vector at position j. ≤j V is the key vector preceding position j. ≤j Q is the value vector preceding position j, therefore, when calculating the attention mechanism, Q... j Only with K ≤j Calculate the attention weight matrix, and then combine it with V. ≤j Multiply to obtain the amino acid vector representation at position j, calculated as shown in formula (1), where d k This refers to the dimension of the key vector to prevent the obtained score from being too large.
[0053]
[0054] That is, after calculating the attention weight matrix using the query vector encoded by the sequence position at the current position and the key vector at the previous position, it is multiplied by the value vector at the previous position to obtain the vector representation of the current position. The peptide vector feature is obtained by traversing the vector representation of each position.
[0055] The spectrum-peptide attention mechanism in the attention decoder is used to calculate the correlation features between the global features of the secondary spectrum and the peptide vector features. Specifically, the global features of the secondary spectrum contain all peptide information, and the spectrum-peptide attention mechanism uses these global features to focus on different regions of the secondary spectrum, assigning different weights to these different regions.
[0056] Specifically, such as Figure 3 As shown, the query vector in the spectrum-peptide attention mechanism is the peptide vector feature, and the key value vector and value vector are the second-level spectrum global features. The calculation formula is shown in the following formula (2):
[0057]
[0058] Qj Let K be the query vector at position j. enc With V enc All are global features of the second-order spectrum, where d k This is the dimension of the Key vector, to prevent the obtained score from being too large.
[0059] For example, suppose that when predicting amino acid G, the Query vector is the output of the self-attention module of the predicted amino acid sequence ELSGSSPVLE, and both Key and Value are second-level global features of the spectrum.
[0060] The intensity decoder contains a local CNN, which models the correlation between the theoretically possible intensity value features predicted at each step and the secondary fragment ion spectrum. Specifically, the secondary spectrum of the predicted partial sequence, plus the candidate intensity values formed by candidate ions, is input into the local CNN in the intensity decoder for convolution extraction. The local CNN uses three three-dimensional convolutional kernels for convolution, and then passes through a max pooling layer and a fully connected layer for dimension mapping to obtain the candidate intensity features. Specifically, the theoretically possible candidate intensity values corresponding to the peptide features are represented as a vector of size (26, 8, 5, 10), where 26 represents the quality of 23 candidate amino acids and 3 sequence identifiers (PAD: vacancy identifier; BOS: start identifier; EOS: end identifier), 8 represents the 8 theoretically generate fragment ion types, 5 represents the retention time dimension, and 10 represents the error tolerance window. In this scheme, a candidate intensity feature with a dimension of (1, 512) is obtained.
[0061] It's worth noting that in traditional peptide sequencing methods, the decoding stage is typically unidirectional, proceeding from left to right (forward) or right to left (backward). The peptide with the highest score among the forward and backward predicted peptides is selected as the final output. Unidirectional decoding aligns with the generation logic, similar to writing text sequentially from front to back or back to front. Predicting the amino acid at step t only utilizes information from the amino acid already generated at position t-1. However, this decoding method suffers from output imbalance and fails to fully utilize information from future outputs in backward decoding. This manifests as high accuracy for the first few amino acids predicted, decreasing accuracy as the sequence grows. Furthermore, due to quality constraints in peptide sequence prediction, errors in current amino acid predictions affect all subsequent predictions, leading to bias accumulation. To address these issues, this solution employs bidirectional independent prediction and bidirectional interactive prediction to mitigate bias accumulation and output imbalance.
[0062] like Figure 4As shown, the bidirectional independent sequencing model employs forward and backward independent prediction methods, traversing all intermediate positions as intersection points to form candidate bidirectional independent prediction sequences. Furthermore, the sum of the amino acid masses in these candidate sequences must equal the mass of the precursor ion. The bidirectional independent prediction algorithm essentially adds candidate sequences before the final selection of the peptide with the highest score. These candidate sequences have high confidence levels for both the first few amino acids and the last few amino acids, thus increasing the probability of successful peptide sequence prediction.
[0063] In this scheme, the bidirectional independent predicted candidate sequences obtained by forward prediction of the forward peptide sequence are called forward sequences. peptide ={a1, a2, a3, ..., a m The bidirectional independent predicted candidate sequences obtained by backward prediction of the peptide sequence are called backward sequences. peptide ={b1, b2, b3, ..., b n}, then the summarized bidirectional independent prediction candidate sequence obtained at this time is as shown in formula (3):
[0064] Bi_indepednet candidate ={a1, a2, ..., a i b j ,…, b2, b1}i, j∈(1, max(m, n)) (3).
[0065] However, the bidirectional independent prediction candidate set cannot be formed arbitrarily and must meet certain constraints. Because during step-by-step decoding in peptide sequencing, the sum of the amino acid masses obtained from each decoding step must equal the corresponding peptide sequence mass in the peptide features. Therefore, when forming the candidate set, it is necessary to ensure that the candidate sequences are within the error range of the peptide sequence mass, as shown in formula (4):
[0066]
[0067] in Let mass(precursor) be the kth candidate sequence predicted independently in both directions. mass(precursor) is the quality of the peptide sequence in the peptide features, and Δ represents the absolute value of the quality change.
[0068] Subsequently, this scheme introduces a bidirectional interactive sequencing model, which includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are simultaneously input into the position encoding module of the attention decoder for encoding to obtain sequence position codes. The sequence position codes are input into the bidirectional synchronous self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional interactive prediction candidate sequences.
[0069] Bidirectional interactive sequencing models differ from bidirectional independent sequencing models. In bidirectional independent prediction, both forward and backward predictions infer the amino acid information to be generated based on previously predicted amino acids (historical information). Bidirectional interactive prediction, however, considers both historical and future information, allowing the predicted sequences to converge more effectively at an intermediate position, dynamically expanding the candidate sequence pool. In bidirectional independent prediction, some candidate peptide combinations are discarded because they do not meet the quality requirements of the peptide sequence. Bidirectional interactive prediction, on the other hand, provides backward guidance during peptide sequence prediction, generating more candidate peptides that meet the quality requirements.
[0070] This scheme modifies the peptide self-attention mechanism module into a bidirectional synchronous self-attention mechanism module based on the bidirectional independent sequencing model. Furthermore, the bidirectional interactive sequencing model employs a decoder that simultaneously decodes forward and backward predictions. Specifically, the computation of the bidirectional synchronous self-attention mechanism module itself remains unchanged; instead, the query vector, key vector, and value vector are represented using bidirectional matrices. The computation of the bidirectional synchronous attention mechanism now includes not only the calculation of the query vector, key vector, and value vector in the same direction, but also the calculation of the query vector and the key vector and value vector in the opposite direction. Finally, the hidden layer vectors obtained from the same-direction and backward calculations are linearly transformed and concatenated to obtain the peptide vector features, which serve as the input to the next layer of the decoder.
[0071] Specifically, the bidirectional synchronous self-attention mechanism module is as follows: Figure 6As shown, the query vector Query, key vector Key, and value vector Value, represented by a bidirectional matrix, are input into the bidirectional synchronous self-attention mechanism module. The query vector Query, the key vector Key, and the value vector Value are used to calculate the hidden layer vector calculated in the same direction. The query vector Query, the key vector Key, and the value vector Value are used to calculate the hidden layer vector in the backward direction. The hidden layer vectors of the two are concatenated to obtain the peptide vector feature.
[0072] The specific calculation formulas are shown in equations (5) to (8) below:
[0073]
[0074]
[0075]
[0076]
[0077] in This is the query vector during forward prediction. and These are the forward-predicted Value vector and Key vector, respectively. This is the query vector for backward prediction. and These are the Value vector and Key vector for backward prediction, respectively. This is the hidden layer vector output during forward prediction. This is the hidden layer vector output during backward prediction. The hidden layer vector is obtained by using only historical prediction information during forward prediction. The hidden layer vector is obtained by using only future information from backward prediction during forward prediction. This refers to the hidden layer vector obtained during backward prediction using only historical prediction information. The hidden layer vector is obtained by using only the future information of the backward prediction during backward prediction.
[0078] The formulas for concatenating the hidden layer vectors during forward prediction and backward prediction are shown in equations (9) to (11):
[0079]
[0080]
[0081] ReLU(x) = max(0, x) (11);
[0082] The total hidden layer vector output during forward prediction yes and Combination 1 After activation function and Linear combination. The total hidden layer vector output during backward prediction. yes and The combination After activation function and Linear combination.
[0083] In addition, such as Figure 7 As shown, since dynamic beam search is involved in model prediction, the computation of the bidirectional synchronous self-attention mechanism module needs to be dynamically adjusted. Furthermore, the original unidirectional prediction had a beam search size of k; however, since forward and backward predictions require simultaneous decoding, the beam search size for bidirectional interactive prediction is [k]. Before the beam search is finished, there is also the problem of the correspondence between the candidate sequences that have been predicted and the candidate sequences that have not been predicted. In this invention, a strict correspondence based on score ranking is adopted. That is, the predicted and unpredicted sequences in both forward and backward prediction are arranged in order, and arranged from high to low score. The peptide sequences after arrangement are matched one by one.
[0084] In the "reordering" step, the highest-scoring sequence from the final candidate sequence needs to be selected as the prediction result. Specifically, this scheme re-inputs the final candidate sequence into the bidirectional...
[0085] The scoring is performed in the independent sequencing model, and the scoring formula is shown in equation (12) below:
[0086]
[0087] in Forward prediction score, For backward prediction scores, the peptide sequence with the highest score among the two sums is taken as the final prediction result.
[0088] When calculating the forward and backward prediction scores, the scores are obtained by adding the prediction scores of each position in the peptide sequence. The prediction score of each position in the peptide sequence is obtained by the logsoftmax probability of the prediction result at that position. The calculation formulas are shown in (13) and (14):
[0089]
[0090]
[0091] Where x i for The amino acid at the i-th position of the peptide sequence.
[0092] Example 2
[0093] Of course, the bidirectional peptide sequencing model mentioned in this solution is trained using labeled peptide sequences and spectra as training samples. Correspondingly, this solution provides a method for constructing a bidirectional peptide sequencing model, including:
[0094] Mass spectrometry data containing labeled peptide sequences and secondary fragment ions were used as training samples.
[0095] Mass spectrometry data are input into a bidirectional peptide sequencing model for training. The bidirectional peptide sequencing model includes a parallel bidirectional independent sequencing model and a bidirectional interactive sequencing model.
[0096] The bidirectional independent sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are independently input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the peptide sequence self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional independent prediction candidate sequences.
[0097] The bidirectional interactive sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are simultaneously input into the position encoding module of the attention decoder for encoding to obtain sequence position codes. The sequence position codes are input into the bidirectional synchronous self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional interactive prediction candidate sequences.
[0098] The union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences is taken as the final candidate sequence; the final candidate sequence is then input into the bidirectional independent sequencing model for scoring, and the peptide sequence with the highest score is selected as the peptide sequence.
[0099] The parts of the structure and content mentioned in the method for constructing the bidirectional peptide sequencing model that are the same as those in Example 1 will not be repeated.
[0100] Example 3
[0101] This scheme not only designs a bidirectional peptide sequencing method based on the self-attention mechanism, but also provides corresponding evaluation indicators for de novo peptide sequencing. Compared with existing evaluation indicators, it more comprehensively considers the fragment ion loss in the secondary fragment ion spectrum and the amino acid misalignment of the peptide sequence.
[0102] In other words, the existing evaluation metrics calculate the proportion of accurate amino acid predictions and the proportion of accurate peptide sequence predictions among all model predictions. This leads to the following two problems: (1) It is impossible to reasonably measure the misalignment between the predicted sequence and the standard sequence. (2) Due to the partial loss of fragment ions in the secondary spectrum, some amino acid predictions may be reversed, making it impossible to reasonably evaluate the reversed amino acid sequence.
[0103] Therefore, this scheme proposes two new evaluation metrics to evaluate the quality of the model: the position BLEU metric and the alignment score metric. The position BLEU metric is based on the idea of BLEU, a commonly used metric in neural machine translation, and incorporates distance weights. The alignment score metric is based on a two-sequence alignment algorithm to calculate the similarity between the predicted sequence and the target sequence.
[0104] Regarding the location BLEU index: This index is an improvement on the idea of BLEU-1gram, adding a distance weight to the matching of each location to solve the problem of unequal lengths between the predicted sequence and the reference sequence. The specific calculation formulas are shown in equations (15) to (18):
[0105]
[0106]
[0107] dist_forward(aaid)=|trg index(aaid)-pre index(aaid)|, index=(0,1,2...n)(17)
[0108] dist_backward(aaid)=|trg index(aaid)-pre index(aaid)|, index=(n, n-1,...0)(18)
[0109] Position-BLEU is the BLEU metric for location. The amino acid at position j in the i-th predicted sequence; Calculated from front to back The absolute value of the difference between the position in the target sequence and the position in the predicted sequence is denoted as the forward distance of the amino acid match; Calculate from back to front The absolute value of the difference between the position in the target sequence and the position in the predicted sequence is denoted as the backward distance of the amino acid match. The trg index (aaid) represents the position of the amino acid in the target sequence, and the pre index (aaid) represents the position of the amino acid in the predicted target sequence.
[0110] The reason this scheme calculates the sum of the forward and backward distances for amino acid matching is to prevent misalignment between the predicted and target sequences due to differences in length, which could lead to an underestimation of the calculated score. Taking the minimum value after summing the forward and backward distances is to only consider... The distance to the nearest identical amino acid in the reference sequence.
[0111] Regarding the alignment score index: This index draws on the idea of the Smith-Waterman algorithm for local alignment of two sequences, and uses dynamic programming to find regions of local similarity. The basic idea of this algorithm is to use an iterative method to calculate the similarity score of the two sequences, store it in the score matrix, and then use dynamic programming to backtrack and find the optimal alignment sequence based on this score matrix. The specific calculation formula is shown in the following formula (19):
[0112]
[0113] In the above formula, s(x) i y j ) is the amino acid substitution matrix, usually BLOSUM62, which marks the frequency of co-occurrence of amino acids, and d is the gap penalty during sequence alignment. Since candidate amino acids are inferred based on their quality during sequencing, this invention generates an amino acid quality substitution matrix (mass_matrix) to replace s(x) in formula (19) during alignment. i y j ), where F(i,j) represents the alignment score between the target sequence and the predicted sequence.
[0114] Specifically, the amino acid masses are arranged from smallest to largest, and the difference between the largest and smallest masses is divided into ten equal parts. The amino acid mass range corresponding to each part is calculated, as shown in formula (20):
[0115] per mass=(max(mass_AAid)-min(mass_AAid)) / 10 (20);
[0116] Where mss AAid represents the mass of amino acids.
[0117] When the predicted sequence at position i is amino acid pre i The amino acid trg at position j of the target sequence j When the matching quality is equal, the score for that position is the full 10 points. However, when the quality is unequal, the matching score is negative. The specific value is determined by the size of the quality difference. The matching score is calculated as shown in formula (21):
[0118]
[0119] The greater the quality difference, the larger the penalty. The penalty for an empty space is set to -1. The amino acid quality replacement matrix is a lower triangular matrix, with all diagonal elements having a value of 10, and all other positions in the lower triangular matrix having negative values.
[0120] Example 4
[0121] Based on the same concept, referencing Figure 3 This application also proposes a bidirectional peptide assay device based on a self-attention mechanism, comprising the following:
[0122] Feature extraction and preprocessing unit: used to acquire raw mass spectrometry data and process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features;
[0123] A bidirectional prediction unit is used to input the peptide features and the secondary fragment ion spectrum into the bidirectional independent sequencing model of the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences, input the peptide features and the secondary fragment ion spectrum into the bidirectional interactive sequencing model of the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences, and take the union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences as the final candidate sequences.
[0124] The reordering unit is used to input the final candidate sequence back into the bidirectional independent sequencing model for scoring, and select the peptide sequence with the highest score as the prediction result.
[0125] The technical content in Embodiment 3 that is the same as that in Embodiment 1 will not be described again.
[0126] Example 5
[0127] This embodiment also provides an electronic device, see reference. Figure 4It includes a memory 404 and a processor 402, the memory 404 storing a computer program and the processor 402 being configured to run the computer program to perform the steps in any of the above embodiments of the bidirectional peptide sequencing method based on the self-attention mechanism.
[0128] Specifically, the processor 402 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0129] The memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 404 may include removable or non-removable (or fixed) media. Where appropriate, the memory 404 may be internal or external to a data processing device. In a particular embodiment, the memory 404 is non-volatile memory. In a particular embodiment, the memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0130] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0131] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the bidirectional peptide sequencing methods in the above embodiments.
[0132] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0133] Transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, transmission device 406 may be a radio frequency (RF) module used for wireless communication with the Internet.
[0134] The input / output device 408 is used to input or output information. In this embodiment, the input information may be mass spectrometry data, etc., and the output information may be peptide sequences, etc.
[0135] Optionally, in this embodiment, the processor 402 can be configured to perform the following steps via a computer program:
[0136] Acquire raw mass spectrometry data and process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features;
[0137] The peptide features and the secondary fragment ion spectrum are input into the bidirectional independent sequencing model in the bidirectional peptide sequencing model to output bidirectional independent predicted candidate sequences. The peptide features and the secondary fragment ion spectrum are input into the bidirectional interactive sequencing model in the bidirectional peptide sequencing model to output bidirectional interactive predicted candidate sequences. The union of the bidirectional independent predicted candidate sequences and the bidirectional interactive predicted candidate sequences is taken as the final candidate sequence.
[0138] The final candidate sequences are then input back into the bidirectional independent sequencing model for scoring, and the peptide sequence with the highest score is selected as the prediction result.
[0139] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0140] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0141] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. One or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted that any block in the logical flow of the figures may represent a program step, or interconnected logical circuitry, blocks and functions, or a combination of program steps and logical circuitry, blocks and functions. The software may be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0142] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A bidirectional peptide sequencing method based on a self-attention mechanism, characterized in that, Includes the following steps: Feature extraction and preprocessing: Obtain raw mass spectrometry data, process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features; Bidirectional prediction: The peptide features and the secondary fragment ion spectrum are input into the bidirectional independent sequencing model in the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences. The peptide features and the secondary fragment ion spectrum are input into the bidirectional interactive sequencing model in the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences. The union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences is taken as the final candidate sequence. The bidirectional independent sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are independently input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the peptide sequence self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional independent prediction candidate sequences. The bidirectional interactive sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are synchronously input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the bidirectional synchronous self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the secondary spectrum global features are jointly input into the spectrum-sequence attention mechanism to obtain correlation features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the correlation features are concatenated to obtain concatenated features. The concatenated features are mapped to bidirectional interactive prediction candidate sequences. Reordering: The final candidate sequences are input into the bidirectional peptide sequencing model again for scoring, and the peptide sequence with the highest score is selected as the prediction result.
2. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, The peptide sequence self-attention mechanism module employs a scaled dot product attention mechanism, which maps the query and a set of key-value pairs to the output.
3. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, In the spectrum-peptide attention mechanism, the query vector is a peptide vector feature, and the key value vector and value vector are secondary spectrum global features.
4. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, The predicted forward peptide sequence is used in a bidirectional independent sequencing model to obtain bidirectional independent prediction candidate sequences. The backward peptide sequence is used in a bidirectional independent sequencing model to obtain bidirectional independent prediction candidate sequences. The two sequences are then combined to obtain bidirectional independent prediction candidate sequences, and it is ensured that the sum of the amino acid masses of the bidirectional independent prediction candidate sequences is equal to the mass of the precursor ion.
5. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, The query vector, key vector, and value vector are represented by a bidirectional matrix. The query vector, key vector, and value vector represented by the bidirectional matrix are input into the bidirectional synchronous self-attention mechanism module. The query vector, the same-direction key vector, and the value vector are used to calculate the same-direction hidden layer vector. The query vector, the same-direction key vector, and the value vector are used to calculate the backward hidden layer vector. The two hidden layer vectors are concatenated to obtain the peptide vector feature.
6. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, The calculation of the bidirectional synchronous self-attention mechanism module is dynamically adjusted based on dynamic beam search. Before the beam search ends, the completed and unpredicted predictions in the forward and backward predictions are arranged in order, and arranged from high to low according to the score. The arranged peptide sequences are then matched one-to-one.
7. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, In the reordering step, the peptide sequence with the highest sum of the forward prediction score and the backward prediction score is taken as the prediction result. When calculating the forward and backward prediction scores, they are obtained by adding the prediction scores for each position in the peptide sequence. The prediction score for each position in the peptide sequence is determined by the prediction score for that position. The probability is obtained.
8. The bidirectional peptide sequencing method based on self-attention mechanism according to claim 1, characterized in that, The location BLEU index and alignment score index are used to evaluate the quality of the prediction results.
9. A method for constructing a bidirectional peptide sequencing model, characterized in that, include: Mass spectrometry data containing labeled peptide sequences and secondary fragment ions were used as training samples. Mass spectrometry data are input into a bidirectional peptide sequencing model for training. The bidirectional peptide sequencing model includes a parallel bidirectional independent sequencing model and a bidirectional interactive sequencing model. The bidirectional independent sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are independently input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the peptide sequence self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the secondary spectrum global features are jointly input into the spectrum-sequence attention mechanism to obtain correlation features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the correlation features are concatenated to obtain concatenated features. The concatenated features are mapped to bidirectional independent prediction candidate sequences. The bidirectional interactive sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are synchronously input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the bidirectional synchronous self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the secondary spectrum global features are jointly input into the spectrum-sequence attention mechanism to obtain correlation features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the correlation features are concatenated to obtain concatenated features. The concatenated features are mapped to bidirectional interactive prediction candidate sequences. The union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences is taken as the final candidate sequence. The final candidate sequence is then input into the bidirectional independent sequencing model for scoring, and the peptide sequence with the highest score is selected as the peptide sequence.
10. A bidirectional peptide sequencing model, characterized in that, It was constructed using the method described in claim 9 for constructing a bidirectional peptide sequencing model.
11. A bidirectional peptide testing device based on a self-attention mechanism, characterized in that, Including the following: Feature extraction and preprocessing unit: used to acquire raw mass spectrometry data and process the raw mass spectrometry data to obtain peptide features and secondary fragment ion spectra associated with the peptide features; A bidirectional prediction unit is used to input the peptide features and the secondary fragment ion spectrum into the bidirectional independent sequencing model of the bidirectional peptide sequencing model to output bidirectional independent prediction candidate sequences, input the peptide features and the secondary fragment ion spectrum into the bidirectional interactive sequencing model of the bidirectional peptide sequencing model to output bidirectional interactive prediction candidate sequences, and take the union of the bidirectional independent prediction candidate sequences and the bidirectional interactive prediction candidate sequences as the final candidate sequences. The bidirectional independent sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are independently input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the peptide sequence self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the global features of the secondary spectrum are jointly input into the spectrum-sequence attention mechanism to obtain association features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the association features are concatenated to obtain concatenated features, which are mapped to bidirectional independent prediction candidate sequences. The bidirectional interactive sequencing model includes an encoder, an attention decoder, and an intensity decoder. The secondary fragment ion spectrum is input into the encoder for encoding to obtain the global features of the secondary spectrum. The predicted forward and backward peptide sequences are synchronously input into the position encoding module of the attention decoder to obtain sequence position codes. The sequence position codes are input into the bidirectional synchronous self-attention mechanism module of the attention decoder to output peptide vector features. The peptide vector features and the secondary spectrum global features are jointly input into the spectrum-sequence attention mechanism to obtain correlation features. The corresponding forward and backward secondary fragment ion spectra are input into the intensity decoder to output candidate intensity features. The candidate intensity features and the correlation features are concatenated to obtain concatenated features. The concatenated features are mapped to bidirectional interactive prediction candidate sequences. The reordering unit is used to input the final candidate sequence back into the bidirectional independent sequencing model for scoring, and select the peptide sequence with the highest score as the prediction result.
12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to execute the bidirectional peptide sequencing method based on the self-attention mechanism according to any one of claims 1 to 8 or the method for constructing the bidirectional peptide sequencing model according to claim 9.
13. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the bidirectional peptide sequencing method based on a self-attention mechanism according to any one of claims 1 to 8 or the method for constructing a bidirectional peptide sequencing model according to claim 9.
Citation Information
Patent Citations
Drug molecule screening method and system based on double-self-attention mechanism neural network
CN115424680A
Using neural networks to predict peptide immunogenicity
WO2022204566A1