Method for enhancing protein peptide fragment assembly based on N-gram model

By introducing the N-gram model in protein sequence assembly, combining the deBruijn graph structure and greedy algorithm, assembly errors and length limitation problems caused by data quality and overlapping peptide deletion in the prior art are solved, and more efficient and accurate protein assembly is achieved.

CN119560020APending Publication Date: 2025-03-04JIANGSU UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411624704.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Existing protein sequence assembly methods rely on the quality of input data, easily lead to misassembly assembly due to low abundance peptides and unreliable strength scores, and it is difficult to obtain a complete full-length sequence of proteins in the absence of overlapping peptides.

Method used

Using an N-gram model-based approach, by constructing an N-gram model and combining a deBruijn graph structure, a greedy algorithm is used to find the optimal path, and the N-gram model is used to predict the next amino acid of the cleaved peptide to extend the assembly sequence.

Benefits of technology

It improves the accuracy and efficiency of protein assembly, and can extend the assembly sequence in the absence of overlapping peptides and sequencing errors, and obtain a more complete full-length sequence of proteins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119560020A_ABST
    Figure CN119560020A_ABST
Patent Text Reader

Abstract

The invention discloses a method for enhancing protein peptide fragment assembly based on an N-gram model, which comprises the following steps: in the first part, taking a UniRef50 non-redundant protein sequence database as training data, and carrying out cleaning and format-standardized preprocessing on the sequence data; performing N-gram model construction by using the preprocessed data; a Kneser-Ney smoothing technology is used to optimize the model and calculate the conditional probability of amino acid, and a basis is provided for subsequently searching an optimal path of a deBruijn graph; in the second part, a protein peptide fragment sequence obtained through sequencing is used as input, and the peptide fragment sequence is preprocessed; dividing the pretreated peptide fragment into continuous substrings with k as the length; constructing a deBruijn graph by using the peptide fragment substrings, wherein the deBruijn graph is used for representing an overlapping relationship among the peptide fragments; searching an optimal path in combination with a greedy algorithm and the amino acid probability of the first part; and outputting the protein assembly sequence. According to the method, the length of the protein assembly sequence is effectively prolonged, the accuracy is improved, and a new technology is provided for determining the protein full-length sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for enhancing protein peptide segment assembly based on an N-gram model. Background Art

[0002] In the field of proteomics research, due to the development of high-throughput mass spectrometry technology, the scale of peptide data has also increased. How to accurately and quickly assemble these peptide data into complete protein sequences has become an important study in bioinformatics. Using assembly technology to determine the full-length sequence of proteins is very important for understanding protein structure and function. Existing protein sequence assembly methods usually use multiple sequence alignment and sequence overlap technology. Among them, the most commonly used is the deBruijn assembler based on sequence overlap. It uses sequenced peptides and their corresponding intensity data and position confidence as input to construct a weighted deBruijn graph to assemble protein sequences. However, this method still has limitations. It is more dependent on the quality of the input data. For low-abundance peptides, unreliable intensity scores may lead to incorrect assembly paths. If the input data lacks overlapping peptides, the path will be broken when using the greedy algorithm to find the optimal path, and no effective assembly results can be obtained. In addition, the length of the sequence assembled by this method is limited, and it is difficult to obtain a complete protein full-length sequence at one time.

[0003] Through research and analysis of the prior art, the present invention proposes a method for enhancing protein peptide assembly based on the N-gram model. The use of statistical language models can effectively extend the length of protein peptide assembly and further improve the accuracy of the assembly sequence. Summary of the invention

[0004] The present invention aims to solve the problems existing in the prior art and provide a method for enhancing protein peptide segment assembly based on N-gram model.

[0005] The technical solutions adopted in the present invention are:

[0006] A method for enhancing protein peptide segment assembly based on an N-gram model comprises the following steps:

[0007] S1: Obtain protein sequence dataset and preprocess the dataset;

[0008] S2: according to the preprocessed data set, each protein sequence in the data set is regarded as a "sentence", each amino acid is regarded as a "word", an N value is selected and a sliding window with a length of N is used to divide N consecutive amino acids into a group of N-grams, and the sliding window is moved to the right by one amino acid, so as to iteratively generate an N-grams table;

[0009] S3: Count the occurrence frequency of N-gram slices in the N-grams table, generate the corresponding frequency table, and use it to build the N-gram model;

[0010] S4: In each N-gram slice, the Nth amino acid is taken as the target, with the previous N-1 amino acids as the premise, and the conditional probability is calculated by statistical frequency. In order to avoid the zero probability problem, the N-gram model is smoothed by Kneser-Ney.

[0011] S5: Taking the broken substring in S8 as N-1 amino acids, use the N-gram model to predict the next amino acid, i.e., the target amino acid;

[0012] S6: Use perplexity as an internal evaluation metric to evaluate the N-gram model internally, adjust the N value, and optimize the model by minimizing the perplexity;

[0013] S7: The original sequencing data is preprocessed, and the obtained protein peptides are divided into continuous substrings with a length of k. The deBruijn graph is constructed using the substrings, overlapping relationships and confidence weights;

[0014] S8: Use a greedy algorithm to find the optimal path of the deBruijn graph, use the substring with the largest weight as the seed, and extend the seed forward and backward to form a protein sequence. Affected by the lack of overlapping peptides and de novo sequencing errors, the conditional probability provided by the N-gram model is used for the broken substring to predict the next amino acid of the broken peptide, thereby extending the assembled protein sequence;

[0015] S9: Perform external evaluation on the N-gram model based on the coverage and accuracy of the assembled sequences.

[0016] Furthermore, in S1, the UniRef50 protein sequence dataset was downloaded and preprocessed, including removing redundant sequences, standardizing sequence formats, and removing uncommon amino acids.

[0017] Furthermore, in S2, the preprocessed protein sequence dataset is divided, and a sliding window of N = 5 is selected to split the sequence into N-grams. The window starts from the first position of the sequence and gradually moves one unit to the right until the end of the sequence.

[0018] Furthermore, in S4, the conditional probability is calculated as follows:

[0019] Let w1w2w3…w n is an N-gram slice, and its probability is expressed as:

[0020] P(w n |w1,w2,...,wn-1 )#(1)

[0021] In 5-gram, for the five-tuple (w n-4 , w n-3 , w n-2 , w n-1 , w n ) is expressed as:

[0022]

[0023] Among them, c(w n-4 , w n-3 , w n-2 , w n-1 , w n ) is the frequency of occurrence of the quintuple, c(w n-4 , w n-3 , w n-2 , w n-1 ) is the frequency of occurrence of the first four amino acids.

[0024] Furthermore, the Kneser-Ney smoothing formula is:

[0025]

[0026]

[0027] in, Indicates the first N-1 amino acids In the case of i Probability of occurrence;

[0028] is a fragment (w i-N+1 , w i-N+2 , ..., w i ) in the training database;

[0029] D is the discount factor, which is 0.75;

[0030] Indicates based on the previous N-1 amino acids Under the condition of , the sum of the frequencies of all possible subsequent amino acids w, that is, the previous N-1 amino acid sequences Frequency in the training database;

[0031] Represents the backoff weight, which is used to adjust the probability quality of backing off to a lower-order N-gram;

[0032] In formula 4 It means that the first N-1 amino acids are given Under the conditions of i the number of

[0033] In formula 3 is the smoothed probability of the lower order, that is, N-1 gram, indicating that given the first N-2 amino acids Under the condition of i The probability of

[0034] The smoothed probability of the most basic unigram is calculated as:

[0035]

[0036] Among them, c(w i ) represents amino acid w i The number of times it appears in the database; N is the sum of the frequencies of all amino acids in the database.

[0037] Furthermore, in S5, the probability of the target amino acid is calculated using the N-gram model, and the one with the highest probability is selected as the predicted target amino acid.

[0038] Furthermore, in S6, the perplexity is used as an internal evaluation index to evaluate the N-gram model internally. The smaller the perplexity, the greater the probability of the sequence, and the better the N-gram model. The formula is:

[0039]

[0040] Furthermore, in S7, the original sequenced peptide data is cleaned, and then k-mers are extracted from the sequenced peptides. The k-mers are each sequenced peptide segmented into continuous substrings with a length of k, and each k-mer is decomposed into its prefix and suffix, wherein the prefix of each k-mer is the first k-1 amino acids of the k-mer, and the suffix is ​​the last k-1 amino acids of the k-mer, that is, (k-1)-mer.

[0041] Furthermore, the nodes of the deBruijn graph are constructed, with all generated (k-1)-mers as nodes of the graph. For each (k-1)-mer, only a unique node is generated. Directed edges are constructed according to the prefix and suffix of each k-mer, connecting the node corresponding to the prefix and the node corresponding to the suffix. Each directed edge represents a k-mer sequence, that is, a directed edge connects two (k-1)-mer nodes, one of which is the prefix of the k-mer and the other is the suffix.

[0042] Furthermore, in S9, the coverage and accuracy are used to perform external evaluation on the N-gram model, specifically:

[0043] The coverage rate is the ratio of the assembled protein sequence to the reference protein sequence, and the formula is:

[0044]

[0045] The accuracy is the percentage of correct amino acids in the longest contig assembly, and the formula is:

[0046]

[0047] The present invention has the following beneficial effects:

[0048] The present invention combines the deBruijn graph structure technology with the N-gram statistical language model, and uses the N-gram model to find the amino acid sequence rules from the standard database to predict the target amino acid. When overlapping peptides are missing and sequencing errors occur in the sequenced peptide segments, the statistical language model extends the protein assembly sequence, thereby improving the accuracy and efficiency of protein assembly. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is an overall flow chart for realizing the process from peptide data to protein peptide assembly.

[0050] Figure 2 It is a data preprocessing flowchart to achieve sequence standardization.

[0051] Figure 3 This is a flow chart of the N-gram model for predicting target amino acids.

[0052] Figure 4 It is a deBruijn graph structure that shows the overlapping relationship between peptides.

[0053] Figure 5 This is a schematic diagram of the optimal path selection for protein peptide assembly. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with the accompanying drawings.

[0055] like Figure 1 As shown in the figure, the present invention is a method for enhancing protein peptide segment assembly based on the N-gram model, and the UniRef50 dataset and the protein sequencing peptide segment dataset are Figure 2 The data preprocessing operation shown in the figure constructs the preprocessed protein peptide data into Figure 4 The deBruijn graph structure shown in Figure 1 uses a greedy algorithm to find the optimal path for the graph structure. Figure 5 As shown, the optimal path needs to use Figure 3 The N-gram model shown predicts the target amino acids to achieve efficient extension of the assembled protein sequence.

[0056] S1, a cluster database is obtained from the UniRef50 database, where each cluster includes sequences with a similarity greater than 50%. Figure 2 ,The dataset was preprocessed including further removal of redundant sequences, error sequence correction, sequence format standardization, and removal of low-quality sequences.

[0057] The data was further de-redundanted, and the blast sequence alignment tool was used for local alignment. The cluster sequence pairs with a similarity greater than 90% were screened, and only one of them needed to be retained. This is conducive to reducing computing resources and improving computing efficiency. Error sequence correction, invalid characters in the sequence were deleted. Proteins only contain 20 amino acids (A, R, D, N, C, E, Q, G, H, I, L, K, M, F, P, S, T, W, Y, V), and invalid characters such as X and B in the sequence were removed. Sequence format standardization is to delete the data identifier symbols in the data set, and the final file format is .fasta format as the model training data set. Low-quality sequences were removed. In UniRef50, the length of cluster sequences ranged from 10 to 50,000 amino acids. A threshold was set to remove cluster sequences with less than 30 amino acids. These sequences have little effect on the N-gram model. For the original sequencing data, data with peptide amino acid confidence less than 10 were removed.

[0058] S2, divide the preprocessed sequence data set, select N = 5 sliding windows to divide the sequence into N-grams, the window starts from the first position of the sequence, and gradually moves one unit to the right until the end of the sequence. In the 5-gram model, such as the sequence "NVDHKPSN", it is divided into NVDHK, VDHKP, DHKPS, HKPSN. Divide all cluster sequences in the training data and generate N-grams table.

[0059] S3, count the frequency of each N-gram, generate the corresponding frequency table, and use it to build the N-gram model.

[0060] S4, calculate the conditional probability, and calculate the conditional probability for each N-gram.

[0061] The basic principle of the N-gram model of the present invention is based on the Markov hypothesis, that is, assuming that the appearance of the current element depends only on the previous n-1 elements and has nothing to do with the more distant context. n is an N-gram, and its probability is expressed as:

[0062] P(w n |w1,w2,...,w n-1 )#(1)

[0063] This conditional probability is calculated by counting the frequency in the training data. n-4 , w n-3 , w n-2 , w n-1 , w n ) is expressed as:

[0064]

[0065] Where c(w n-4 , w n-3 , w n-2 , w n-1 , w n ) is the frequency of occurrence of the quintuple, c(w n-4 , w n-3 , w n-2 , w n-1 ) is the frequency of occurrence of the first four amino acids.

[0066] In order to avoid the zero probability problem, Kneser-Ney smoothing is used to adjust the probabilities of all N-gram segments. It discounts high-frequency N-gram segments and assigns reasonable probabilities to low-frequency or non-appearing N-gram segments. The Kneser-Ney smoothing (N>=2) N-gram probability calculation formula is:

[0067]

[0068] in Indicates the first N-1 amino acids In the case of i Probability of occurrence;

[0069] is a fragment (w i-N+1 , w i-N+2 , ..., w i ) in the training database;

[0070] D is the discount factor, which is a fixed value of 0.75;

[0071] Indicates based on the previous N-1 amino acids Under the condition of , the sum of the frequencies of all possible subsequent amino acids w, that is, the previous N-1 amino acid sequences Frequency in the training database;

[0072] Represents the backoff weight, which is used to adjust the probability quality of backing off to a lower-order N-gram.

[0073] In formula 4 It means that the first N-1 amino acids are given Under the conditions of i the number of

[0074] In formula 3 is the smoothed probability of the lower order (i.e. N-1) gram, indicating that given the first N-2 amino acids Under the condition of i probability.

[0075] The smoothed probability of the most basic unigram is calculated as:

[0076]

[0077] Where c(w i ) represents amino acid w i The number of times it appears in the database; N is the sum of the frequencies of all amino acids in the database.

[0078] S5, such as Figure 3 As shown, the amino acids broken in S9 are used as conditions to calculate the probability of the target amino acid, and the one with the highest probability is selected as the predicted target amino acid.

[0079] S6, use perplexity to evaluate the model internally. The smaller the perplexity, the greater the probability of the sequence and the better the model.

[0080]

[0081] S7, data cleaning is performed on the original sequenced peptide data, and then k-mer is extracted from the sequenced peptides. K-mer is a continuous substring of length k that is divided into each sequenced peptide. According to experience, when k = 6, the peptide assembly effect is the best. Each k-mer is decomposed into its prefix and suffix, where the prefix of each k-mer is the first k-1 amino acids of the k-mer, and the suffix is ​​the last k-1 amino acids of the k-mer, that is, (k-1)-mer.

[0082] S8, such as Figure 4 As shown, the nodes of the deBruijn graph are constructed, with all generated (k-1)-mers as nodes of the graph. For each (k-1)-mer, only a unique node is generated. Directed edges are constructed based on the prefix and suffix of each k-mer, connecting the node corresponding to the prefix and the node corresponding to the suffix. Each directed edge represents a k-mer sequence. That is, a directed edge connects two (k-1)-mer nodes, one of which is the prefix of the k-mer and the other is the suffix.

[0083] The (k-1)-mer node uses the weighted geometric mean of the amino acid confidence scores as the weight score. i , a i+1 ,…,a i+k-2} as an example, let a j represents the jth amino acid.

[0084]

[0085] Wherein, Formula 9 is the frequency weight of (k-1)-mer, c((k-1)-mer) is the number of all identical (k-1)-mers, and N is the total number of fragments divided; score(a j ) is amino acid a j The confidence score is , and I is the intensity of the peptide segment where the (k-1)-mer is located.

[0086] S9, construct the deBruijn graph, such as Figure 5 As shown, the greedy algorithm is used to find the longest path, and the (k-1)-mer sequence with the largest weight score is selected as the seed. The suffix is ​​searched backward, and its suffix is ​​used as the new seed, and the iteration is continuous. Affected by various factors, the seed will be broken. Therefore, some amino acids of the broken (k-1)-mer sequence are used as given conditions, and the conditional probability in S4 and 5 is used to set the probability threshold greater than 80 to find the target amino acid with the highest probability, readjust the seed, and continue to iterate until the seed is not found in the original sequencing data. Similarly, the (k-1)-mer sequence with the largest weight score is selected as the seed, and the prefix is ​​searched forward to complete the assembly of the entire protein peptide segment.

[0087] S10, protein peptide assembly evaluation, adjust the N value of the N-gram model according to the evaluation results. Use the evaluation indicators coverage and accuracy. Coverage refers to the proportion of correctly covered sequences compared with the reference protein sequence.

[0088]

[0089] The assembly accuracy is the percentage of correct amino acids in the longest assembled contig.

[0090]

[0091] The above description is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be regarded as within the protection scope of the present invention.

Claims

1. A method for enhancing protein peptide assembly based on N-gram model, characterized in that: The following steps are involved: S1: Obtain protein sequence dataset and preprocess the dataset; S2: according to the preprocessed data set, each protein sequence in the data set is regarded as a "sentence", each amino acid is regarded as a "word", an N value is selected and a sliding window with a length of N is used to divide N consecutive amino acids into a group of N-grams, and the sliding window is moved to the right by one amino acid to iteratively generate an N-grams table; S3: Count the occurrence frequency of N-gram slices in the N-grams table, generate the corresponding frequency table, and use it to build the N-gram model; S4: In each N-gram slice, the Nth amino acid is taken as the target, with the previous N-1 amino acids as the premise, and the conditional probability is calculated by statistical frequency. In order to avoid the zero probability problem, the N-gram model is smoothed by Kneser-Ney. S5: Taking the broken substring in S8 as N-1 amino acids, use the N-gram model to predict the next amino acid, i.e., the target amino acid; S6: Use perplexity as an internal evaluation metric to evaluate the N-gram model internally, adjust the N value, and optimize the model by minimizing the perplexity; S7: The original sequencing data is preprocessed, and the obtained protein peptides are divided into continuous substrings with a length of k. The deBruijn graph is constructed using the substrings, overlapping relationships and confidence weights; S8: Use a greedy algorithm to find the optimal path of the deBruijn graph, use the substring with the largest weight as the seed, and extend the seed forward and backward to form a protein sequence. Affected by the lack of overlapping peptides and de novo sequencing errors, the conditional probability provided by the N-gram model is used for the broken substring to predict the next amino acid of the broken peptide, thereby extending the assembled protein sequence; S9: Perform external evaluation on the N-gram model based on the coverage and accuracy of the assembled sequences.

2. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S1, the UniRef50 protein sequence dataset was downloaded and preprocessed, including removing redundant sequences, standardizing sequence formats, and removing uncommon amino acids.

3. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S2, the preprocessed protein sequence dataset is divided, and a sliding window of N = 5 is selected to split the sequence into N-grams. The window starts from the first position of the sequence and gradually moves one unit to the right until the end of the sequence.

4. The method for enhancing protein peptide segment assembly based on the N-gram model as claimed in claim 3, characterized in that: In S4, the conditional probability is calculated as follows: Let w1w2w3…w n is an N-gram slice, and its probability is expressed as: P(in n |w1,w2,...,w n-1 )#(1) In 5-gram, for the five-tuple (w n-4, w n-3, w n-2, w n-1, w n ) is expressed as: Among them, c(w n-4, w n-3, w n-2, w n-1, w n ) is the frequency of occurrence of the quintuple, c(w n-4, w n-3, w n-2, w n-1 ) is the frequency of occurrence of the first four amino acids.

5. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 4, characterized in that: The Kneser-Ney smoothing formula is: in, Indicates the first N-1 amino acids In the case of i Probability of occurrence; is a fragment (w i-N+1 , w i-N+2 , ..., w i ) in the training database; D is the discount factor, which is 0.75; Indicates based on the previous N-1 amino acids Under the condition of , the sum of the frequencies of all possible subsequent amino acids w, that is, the previous N-1 amino acid sequences Frequency in the training database; Represents the backoff weight, which is used to adjust the probability quality of backing off to a lower-order N-gram; In formula 4 It means that the first N-1 amino acids are given Under the conditions of i the number of In formula 3 is the smoothed probability of the lower order, that is, N-1 gram, indicating that given the first N-2 amino acids Under the condition of i probability; The smoothed probability of the most basic unigram is calculated as: Among them, c(w i ) represents amino acid w i The number of times it appears in the database; N is the sum of the frequencies of all amino acids in the database.

6. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S5, the probability of the target amino acid is calculated using the N-gram model, and the one with the highest probability is selected as the predicted target amino acid.

7. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S6, the perplexity is used as an internal evaluation index to evaluate the N-gram model internally. The smaller the perplexity, the greater the probability of the sequence, and the better the N-gram model. The formula is:

8. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S7, the original sequenced peptide data is cleaned, and then k-mers are extracted from the sequenced peptides. The k-mers are each sequenced peptide segmented into continuous substrings with a length of k, and each k-mer is decomposed into its prefix and suffix, wherein the prefix of each k-mer is the first k-1 amino acids of the k-mer, and the suffix is ​​the last k-1 amino acids of the k-mer, that is, (k-1)-mer.

9. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 8, characterized in that: Construct the nodes of the deBruijn graph, with all generated (k-1)-mers as the nodes of the graph. For each (k-1)-mer, only a unique node is generated. Directed edges are constructed according to the prefix and suffix of each k-mer, connecting the nodes corresponding to the prefix and the nodes corresponding to the suffix. Each directed edge represents a k-mer sequence, that is, a directed edge connects two (k-1)-mer nodes, one of which is the prefix of the k-mer and the other is the suffix.

10. The method for enhancing protein peptide segment assembly based on the N-gram model according to claim 1, characterized in that: In S9, the coverage and accuracy are used to perform external evaluation on the N-gram model, specifically: The coverage rate is the ratio of the assembled protein sequence to the reference protein sequence, and the formula is: The accuracy is the percentage of correct amino acids in the longest contig assembly, and the formula is: