Protein mass spectrum data quality evaluation method based on super vector coding

CN120708706APending Publication Date: 2025-09-26CHINA JILIANG UNIV
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202510830797.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-26

Smart Images

  • Figure CN120708706A_ABST
    Figure CN120708706A_ABST
Patent Text Reader

Abstract

Data quality of protein mass spectrometry is crucial to accuracy, reliability and repeatability of experimental results and is a key factor influencing clinical application of the technology. The invention relates to a protein mass spectrum data quality evaluation method based on super vector coding. According to the method, the mass-to-charge ratio in a mass spectrum signal and a corresponding intensity value are subjected to super-vector coding, and the Hamming distance is used as similarity measurement to realize binary super-vector coding of protein secondary mass spectrum data. And then, a support vector machine is utilized to classify the secondary mass spectrum super vectors, and the data quality of the secondary mass spectrum is judged. The method is low in calculation complexity and high in operation efficiency, and real-time processing can be realized on an edge calculation chip with limited calculation resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for extracting and encoding sequence features of mass spectrometry data by combining machine learning and proteomics, specifically a method for evaluating the quality of protein mass spectrometry data based on supervector encoding, which can achieve real-time processing on resource-constrained edge computing platforms (such as embedded chips). Background Art

[0002] Mass spectrometry, as an important tool in proteomics research, can provide data such as protein molecular mass and fragment ion information, and can be used to analyze protein expression, protein composition, and protein interactions in biological samples. Existing mass spectrometry data analysis methods face the following challenges:

[0003] 1. High data complexity: Mass spectrometry data is characterized by high dimensionality and strong noise. Traditional methods rely on manual feature extraction, which is inefficient and easily affected by subjective factors.

[0004] 2. High data information loss rate: Protein mass spectrometry data is characterized by high dimensionality and high complexity, and there is a high risk of information loss during the encoding conversion process;

[0005] 3. Mass spectrometry analysis tools are large: Currently, most commonly used mass spectrometry data analysis tools rely on large computing devices, which are not efficient or convenient when processing some mass spectrometry data.

[0006] Machine learning methods have made significant progress in fields such as images, text, and speech. Supervector-based protein mass spectrometry encoding methods, for example, can encode mass spectrometry data using hash codes, significantly reducing information loss and maintaining an encoding method that is not affected by subjective factors. Furthermore, the SVM model possesses excellent classification capabilities, demonstrating significant advantages in high-dimensional binary classification problems. Combining supervectors with SVMs enables more accurate classification of mass spectrometry data and achieves superior performance in subsequent quality assessment tasks.

[0007] However, most encoding methods for mass spectrometry data rely on large computing equipment. We propose a new supervector-based protein mass spectrometry data encoding method to achieve efficient encoding of mass spectrometry data and use SVM classifier to determine the quality of mass spectrometry data. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a protein mass spectrometry data quality evaluation method based on supervector encoding, which can realize rapid encoding of mass spectrometry data, reduce data information loss, reduce the impact of noise on data information, and improve robustness to noise.

[0009] The technical solution adopted by the present invention to solve the above technical problems is: a method for evaluating the quality of protein mass spectrometry data based on supervector encoding, comprising the following steps:

[0010] S1: Encode the value of each mass-to-charge ratio in the secondary mass spectrum into an N-dimensional supervector, N>1000, and the supervectors of different mass-to-charge ratios are orthogonal to each other;

[0011] S2: Construct the intensity vector and generate an (m, N) correlation matrix through intensity normalization and Hamming similarity, where N>1000. Generate the intensity vector according to predefined rules;

[0012] S3: Generate a supervector code, perform element-by-element XOR processing on the mass-to-charge ratio vector and the intensity vector, and perform feature screening by setting a threshold to finally generate a supervector code;

[0013] S4: Model training: Optimize model parameters through self-supervised training to obtain a high-dimensional coding representation with strong robustness and excellent generalization performance, and save the obtained model weights to provide accurate and stable feature representation for subsequent mass spectrometry data encoding.

[0014] Compared with the prior art, the advantage of the present invention lies in the proposed protein mass spectrometry data quality evaluation method based on supervector encoding, which fully utilizes the high dimensionality of the supervector, reduces the loss of mass spectrometry information, accelerates the operation speed, and can achieve more accurate classification operations when fused with the SVM classifier; the method extracts the mass-to-charge ratio and intensity value in the mass spectrometry file, encodes the mass-to-charge ratio value to generate a mass-to-charge ratio vector that is as orthogonal as possible, and for the intensity value, generates an association matrix through Hamming distance similarity and intensity normalization, and then, according to a predefined mapping relationship, each intensity corresponds to an intensity vector, and then the two are subjected to element-by-element XOR operation, and then weak features are screened out according to a threshold-based rule, and finally a supervector encoding is generated. Such a vector encoding method can be generated more quickly, and has reduced robustness and loss rate, so that the subsequent SVM model can better obtain mass spectrometry information, thereby performing more accurate classification tasks.

[0015] Furthermore, the specific method of constructing the mass-to-charge ratio vector in step S1 is as follows:

[0016] S1.1 Data reading: First read the original MGF file, read the mass-to-charge ratio value corresponding to each scan number, and assign an index number to each mass-to-charge ratio value.

[0017] S1.2 Construct a mass-to-charge ratio vector. This constructs the mass-to-charge ratio vector using pseudorandom encoding and hashing, ensuring that each vector is both repeatable and sufficiently distinct. For each mass-to-charge ratio value, generate an N-dimensional sparse binary vector using a fixed pseudorandom seed. During this generation, randomly select k different positions from {1, 2, ..., N} and set them to 1, while the remaining positions are set to 0, where N > 1000.

[0018] S1.3 applies Schmidt orthogonalization to the initial mass-to-charge ratio vector set. This aims to convert the original vector set into a set of vectors that are as orthogonal as possible, thereby eliminating the mutual interference and redundant information between vectors with different mass-to-charge ratios to the greatest extent possible, and ensuring that the resulting orthogonal vector set can meet the requirements of large-scale encoding tasks in terms of computational accuracy and numerical robustness. The orthogonalization formula is as follows:

[0019]

[0020] Where k starts from the second term and is set to u1=v for the initial term. 1, <.,.> is the inner product symbol.

[0021] Step S2 constructs the intensity vector, and the specific method is as follows:

[0022] S2.1 Intensity Normalization: First, the spectrum data in the original MGF file is scanned and the intensity information of all peaks is extracted. Based on this information, the global maximum and minimum intensity values ​​are determined. Based on the obtained extreme value range, the original intensity is linearly normalized so that all intensity values ​​are mapped to the closed interval [0, m], ensuring that each original intensity value has a corresponding value within the target interval. The normalization strategy can effectively alleviate the scale differences in intensity distribution between different spectra. The linear intensity normalization formula is as follows:

[0023]

[0024] The I value represents the current intensity value, I, I Max , I Min They represent the current intensity value, the maximum value and the minimum value in the mass spectrum file respectively.

[0025] S2.2 Construct the correlation matrix of intensity distribution: According to the intensity values ​​in the original MGF file, each intensity corresponds to an intensity value in the interval [0,100]. Then according to the definition of Hamming distance:

[0026]

[0027] The Hamming distance between numerically adjacent vectors is made as small as possible, while the Hamming distance between numerically distant vectors is made as large as possible to ensure discrimination. One intensity level corresponds to a binary sparse vector of length N, where N>1000. This constructs a (m, N) vector matrix based on intensity distribution and Hamming distance similarity. By adjusting the position of "1" in the sparse vector, the entire vector matrix has good intensity similarity mapping capabilities and can be used in subsequent spectral vectorization, feature embedding, or SVM neural network models.

[0028] S2.3 generates an intensity vector. Based on the intensity value obtained after intensity normalization and the (m, N) vector matrix generated above, according to the predefined mapping relationship, each intensity value corresponds to a binary sparse vector of length N, where N>1000. Finally, each intensity corresponds to an intensity vector.

[0029] Step S3 generates a supervector code, and the specific method is as follows:

[0030] S3.1 Element-by-element XOR operation, integrating the structural information and intensity level information of the spectrum, we perform element-by-element XOR operation on the previously generated mass-to-charge ratio vector and intensity vector. The operation formula is:

[0031]

[0032] S3.2 performs feature screening based on the threshold, XOR-fusing the mass-to-charge ratio vector and the intensity vector, eliminating low-intensity features based on the set threshold, and then further selecting representative features through a set of dynamic screening strategies based on dimensional distribution and encoding characteristics, ultimately generating a final vector representation that is more suitable for classification model input.

[0033] Step S4: Model training. The specific method is as follows:

[0034] S4.1 Data loading and filtering: The final N-dimensional supervector is generated according to the previous supervector encoding scheme, where N>1000. Samples with a label of -1 are removed to retain only positive and negative samples, which can make model training more accurate.

[0035] S4.2 Feature standardization: Use Z-score to standardize the mass-to-charge ratio value, unify the feature scale, and avoid the influence of feature differences on model training. The formula is:

[0036]

[0037] Among them, x i, μ and σ represent the original eigenvalue, sample mean, and sample standard deviation, respectively.

[0038] S4.3 SVM model training and grid parameter adjustment: The purpose of the SVM classifier is to find an optimal separation hyperplane that maximizes the interval between different classes. Its goal is to minimize the following loss function:

[0039]

[0040] Among them, w is the weight vector, b is the bias, δ i is the soft margin slack variable, c is the regularization parameter, and the optimization needs to meet the following constraints:

[0041]

[0042] To improve model performance, we further used grid search to tune key hyperparameters, including controlling model complexity and error tolerance as well as the kernel function width parameter:

[0043] k(x i ,x j )=exp(-γ*||x i -x j || 2 )

[0044] S4.4 Principal component analysis dimensionality reduction for visualization. The core idea of ​​principal component analysis is to map the original data to a set of new, uncorrelated principal components through orthogonal transformation, where the first few principal components can explain most of the variance in the original data, as expressed as follows:

[0045] Z=X*W

[0046] Among them, Z represents the data after dimensionality reduction, which can be used for visualization. X refers to the original high-dimensional data matrix, and W represents the principal component analysis projection matrix, which contains the first two components.

[0047] After the model training is completed, the trained SVM classifier results are stored in the variable SVM_hypersector, and its output is mapped to a two-dimensional space to show the discrimination and distribution between categories. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 Schematic diagram of the process of the protein mass spectrometry data quality evaluation method based on supervector encoding of the present invention;

[0049] Figure 2 Schematic diagram of the structure of supervector coding of the present invention;

[0050] Figure 3 It is a schematic diagram of the process of the present invention based on the SVM classifier;

[0051] Figure 4This is the true label distribution diagram based on the SVM classifier of the present invention. DETAILED DESCRIPTION

[0052] In order to further understand the content, features and effects of the present invention, the present invention is described in detail below with reference to the accompanying drawings and the following examples.

[0053] Example 1: A method for evaluating protein mass spectrometry data quality based on supervector encoding, comprising the following steps:

[0054] S1: Input the MGF file and read the mass spectrum information one by one, parsing the mass-to-charge ratio and intensity data in the mass spectrum. Perform data preprocessing on the raw mass spectrum data and encode the mass-to-charge ratio into a mass-to-charge ratio vector with a dimension of 5000, and make the two adjacent vectors as orthogonal as possible;

[0055] S2: Constructing the intensity vector. Through a series of preprocessing steps, including intensity normalization and Hamming distance similarity, a vector matrix with a dimension of (100, 5000) is generated. According to a predefined mapping relationship, each intensity level corresponds to a 5000-dimensional binary sparse vector, the intensity vector. This achieves the conversion from the continuous intensity space to the high-dimensional sparse coding space.

[0056] S3: Perform element-by-element XOR on the mass-to-charge ratio vector and intensity vector generated above. Then, based on threshold-based feature selection, effectively remove noise features and weakly expressed dimensions to generate a final 5000-dimensional supervector, providing a more concise and discriminative input representation for subsequent classification models.

[0057] S4: The encoded high-dimensional supervector is input into the SVM classifier to classify the sample. A grid search strategy is used to systematically optimize the model's key hyperparameters to achieve optimal classification performance. To visualize the distribution characteristics of high-dimensional data, principal component analysis is used to reduce the data to a two-dimensional plane. Once the model training reaches the preset termination criteria, the trained classification model weights are saved to an external file for subsequent prediction or deployment.

[0058] The following is a specific example to further illustrate:

[0059] This example uses an MGF mass spectrometry data file from a Q Exactive mass spectrometer, and the data comes from mouse intestinal muscle tissue.

[0060] A custom parsing function is used to read mass spectrum information from the MGF file one by one, and the mass-to-charge ratio and signal intensity of each mass spectrum are parsed. The mass-to-charge ratio is encoded so that the two are as orthogonal as possible to vectors of dimension 5000. Then, based on intensity normalization and Hamming distance similarity, a correlation matrix of the intensity distribution is constructed. According to the predefined mapping relationship, each intensity value corresponds to a 5000-dimensional intensity vector.

[0061] The generated mass-to-charge ratio vector and the intensity vector are subjected to element-by-element XOR operation to fuse the structural features and hierarchical information of the two. The XORed vector is then subjected to feature screening based on the set threshold rule to ultimately generate a 5000-dimensional supervector. Figure 2 Schematic diagram of the supervector encoding process.

[0062] Import the data set containing mass spectrum scan number and its corresponding supervector encoding from the preset data source, and the data set containing scan number and corresponding label. Read the above two CSV format files respectively, and merge data by scan number field. Preferably, the invalid sample with label -1 is eliminated, and only the sample corresponding to the valid label of the two classifications is retained. The supervector in the merged data set is parsed and processed, and it is converted into an integer array by the binary encoding in the form of a string, so as to construct the feature matrix X of a unified format. The corresponding classification label field is extracted as label vector y. The feature matrix X is standardized using standard deviation normalization to ensure that all feature dimensions have zero mean and unit variance, to improve the numerical stability of model training. Subsequently, the feature after standardization is reduced in dimension using principal component analysis, and the dimension is preferably compressed into two dimensions for subsequent visual analysis and result display. Feature matrix X and label vector y are divided into training set and test set, according to 8:2 ratio division. In the training stage, a classification model is constructed based on support vector machine, and the kernel function type is set to radial basis function. At the same time, the key hyperparameters of the model, including the penalty coefficient and kernel function parameters, are tuned through the grid search method, and five-fold cross validation is used to finally obtain the optimal parameter combination and construct the final model. In this embodiment, the SVM classification model is used to perform classification prediction on the sample data in the test set to verify the generalization performance of the model. The test set consists of 2974 samples, of which the number of positive and negative samples is 1543 and 1431 respectively. After comparing and analyzing the classification results output by the model with the actual labels, the following performance evaluation indicators are calculated: the classification accuracy is 67.01%, and the prediction results for category "0" are 0.66, 0.64, and 0.65, respectively; the prediction results for category "1" are 0.68, 0.70, and 0.69, respectively; the overall macro-average and weighted average precision, recall, and F1 scores are all 0.67, indicating that the performance of the model in different categories is relatively balanced. The real label results are as follows: Figure 4 As shown, the horizontal and vertical axes are the coordinates of the first two principal components extracted by principal component analysis (PCA) after the data is standardized, representing the linear combination direction of the mass spectral features, which is the projection of the sample in these two directions of maximum variance. In the figure, "●" and "×" represent category 0 and category 1 respectively. The solid line in the middle represents the decision boundary of the SVM classifier, and the dotted line represents the interval boundary of the SVM classifier. After 15 rounds of training, the results are saved as SVM_hypersector.

Claims

1. A method for evaluating protein mass spectrometry data quality based on supervector encoding, characterized in that The following steps are involved: S1: Encode the value of each mass-to-charge ratio in the secondary mass spectrum into an N-dimensional supervector, N>1000, and the supervectors of different mass-to-charge ratios are orthogonal to each other; S2: Generate an intensity distribution correlation matrix based on Hamming similarity calculations; then normalize the original intensity values. For each normalized intensity value, find the vector of the corresponding row in the pre-generated correlation matrix based on its corresponding Hamming distance and intensity. This vector is the intensity vector for that intensity value. S3: Using element-by-element XOR operations, the mass-to-charge ratio vector and the intensity vector are subjected to feature interaction, followed by feature selection via a programmable comparator. This process integrates bitwise nonlinear transformations and threshold-based feature selection, ultimately outputting an optimized N-dimensional supervector, where N > 1000. S4: The generated composite feature vector is input into a support vector machine (SVM) classifier, and a radial basis kernel function is used to construct a decision hyperplane. A grid search is used to optimize the regularization parameter C and the kernel parameter γ to distinguish between high-quality and low-quality mass spectra, ultimately establishing a mass spectrometry recognition model with high generalization capabilities.

2. A protein mass spectrometry data quality assessment method based on supervector encoding according to claim 1, characterized in that The specific method of encoding the mass-to-charge ratio vector in step S1 is as follows: S1.1 Data reading: First, read the original MGF file and read the mass-to-charge ratio value corresponding to each scan number. Each mass-to-charge ratio value is assigned an index number. S1.2 Construct a mass-to-charge ratio vector. To construct the mass-to-charge ratio vector, use pseudorandom encoding and hashing to ensure that each vector is both repeatable and sufficiently distinguishable. For each mass-to-charge ratio value, generate an N-dimensional sparse binary vector using a fixed pseudorandom seed. During the generation process, randomly select k different positions from {1, 2, ..., N} and set them to 1, while the remaining positions are set to 0, where N > 1000. S1.3 applies Schmidt orthogonalization to the initial mass-to-charge ratio vector set. This aims to convert the original vector set into a set of vectors that are as orthogonal as possible, thereby eliminating mutual interference and redundant information between different vectors to the greatest extent possible. This ensures that the resulting orthogonal vector set can meet the requirements of large-scale encoding tasks in terms of computational accuracy and numerical robustness. The orthogonalization formula is as follows: Where k starts from the second term and is set to u1=v for the initial term. 1, <.,.> is the inner product symbol.

3. The method for evaluating protein mass spectrometry data quality based on supervector encoding according to claim 1, characterized in that Step S2 constructs the intensity vector encoding, and the specific method is as follows: S2.1 Intensity Normalization: First, the spectrum data in the original MGF file is scanned and the intensity information of all peaks is extracted. Based on this information, the global maximum and minimum intensity values ​​are determined. Based on the obtained extreme value range, the original intensity is linearly normalized so that all intensity values ​​are mapped to the closed interval [0, m], ensuring that each original intensity value has a corresponding value within the target interval. The normalization strategy can effectively alleviate the scale differences in intensity distribution between different spectra. The linear intensity normalization formula is as follows: The I value represents the current intensity value, I, I Max , I Min They represent the current intensity value, the maximum value and the minimum value in the mass spectrum file respectively. S2.2 Construct the correlation matrix of intensity distribution: According to the intensity values ​​in the original MGF file, each intensity corresponds to the intensity value in the interval [0, m]. Then according to the definition of Hamming distance: The Hamming distance between numerically adjacent vectors is made as small as possible, and the Hamming distance between numerically distant vectors is made as large as possible to ensure discrimination. One intensity level corresponds to a binary sparse vector of length N, where N>1000. This constructs a (m, N) vector matrix based on intensity distribution and Hamming distance similarity, so that the entire vector matrix has good intensity similarity mapping capabilities and can be used in subsequent spectral vector representation, feature embedding, or SVM neural network models. S2.3 generates an intensity vector based on the intensity value obtained after intensity normalization and the (m, N) vector matrix generated above, where m represents the intensity value and N represents the dimension value. According to the predefined mapping relationship, each intensity value corresponds to a binary sparse vector vector with a length of N dimensions, N>1000, and finally each intensity corresponds to an intensity vector.

4. The method for evaluating protein mass spectrometry data quality based on supervector encoding according to claim 1, characterized in that Step S3 generates a supervector code, and the specific method is as follows: S3.1 Element-by-element XOR operation, integrating the structural information of the spectrum with the intensity level information, we perform element-by-element XOR operation on the previously generated vector and the intensity vector. The operation formula is: S3.2 performs feature screening based on the threshold, XOR-fusing the mass-to-charge ratio vector and the intensity vector, eliminating low-intensity features based on the set threshold, and then further selecting representative features through a set of dynamic screening strategies based on dimensional distribution and encoding characteristics, ultimately generating a final vector representation that is more suitable for classification model input.

5. The method for evaluating protein mass spectrometry data quality based on supervector encoding according to claim 1, characterized in that Step S4: Model training. The specific method is as follows: S4.1 Data loading and filtering: The final N-dimensional supervector is generated according to the previous supervector encoding scheme, with N > 1000. Samples with a label of -1 are removed to retain only positive and negative samples, which can make model training more accurate. S4.2 Feature standardization: Use Z-score to standardize the mass-to-charge ratio value, unify the feature scale, and avoid the influence of feature differences on model training. The formula is: where x i ,μ,σ represent the original eigenvalue, sample mean and sample standard deviation respectively; S4.3 SVM model training and grid parameter adjustment: The purpose of the SVM classifier is to find an optimal separation hyperplane that maximizes the interval between different classes. Its goal is to minimize the following loss function: Among them, w is the weight vector, b is the bias, δ i is the soft margin slack variable, c is the regularization parameter, and the optimization needs to meet the following constraints: To improve model performance, we further used grid search to tune key hyperparameters, including controlling model complexity and error tolerance as well as the kernel function width parameter: k(x i ,x j )=exp(-γ*||x i -x j || 2 ) S4.4 Principal component analysis dimensionality reduction for visualization. The core idea of ​​principal component analysis is to map the original data to a set of new, uncorrelated principal components through orthogonal transformation, where the first few principal components can explain most of the variance in the original data, as expressed as follows: Z=X*W Among them, z represents the data after dimensionality reduction, which can be used for visualization. X refers to the original high-dimensional data matrix, and W represents the principal component analysis projection matrix, which contains the first two components. After the model training is completed, the trained SVM classifier results are stored in the variable SVM_hypersector, and its output is mapped to a two-dimensional space to show the discrimination and distribution between categories.