Mass spectrum imaging data normalization method and system based on local space structure
Through the normalization method of mass spectrometry imaging data based on local spatial structure, the problem of systematic differences in mass spectrometry imaging data is solved, effective normalization and stability improvement of mass spectrometry data is achieved, and the contrast and resolution of the image are enhanced.
Patent Information
- Application Number
- CN202510069576.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-16
AI Technical Summary
The systemic differences in mass spectrometry imaging data have affected the reliability and comparativeness of data analysis, especially in discovery research, where existing correction methods cannot be relied solely on all problems related to ion suppression.
A method for normalizing mass spectrometry imaging data based on local spatial structure is proposed. By introducing the concept of neighbor set, the neighbor set is determined using the pixel space neighborhood situation and spectral correlation, and the normalization coefficient that minimizes the normalization of pixel neighbors is found through the gradient descent method to achieve normalization of mass spectral data.
While maintaining the biological differences in the data, it effectively eliminates systematic differences, improves the stability and reliability of the data, enhances the contrast and resolution of the images, and makes the spatial boundaries of different tissue areas clearer.
Smart Images

Figure CN119992031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mass spectrometry imaging (MSI) data analysis, and specifically to a mass spectrometry imaging data normalization method and system based on local spatial structure. Background Art
[0002] Mass spectrometry (MS) technology is parallel to spectroscopy technology, and has both high specificity and high sensitivity. It is a technology that identifies compounds by preparing, separating, and detecting gas or liquid phase ions. It can provide rich structural information in the analysis, such as analyzing various types of biomolecules in complex biological matrices. At present, mass spectrometry technology is widely used to study biochemical changes associated with disease progression, and has been successfully applied in the analysis of different biological samples including serum, urine, saliva, and tissues. Mass spectrometry imaging (MSI) is a technology that obtains spatially resolved mass spectrometry information from thin-layer surfaces such as biological tissues. It can obtain the molecular structure of substances, analyze the composition and distribution of substances, and thus explore their potential role in diagnosis or treatment prospects. Therefore, the spatial metabolomics method using mass spectrometry imaging technology can directly observe the distribution of metabolites in tissues, thereby enabling in-depth understanding of disease-related changes in specific structures. In recent years, MSI research has been increasingly used to reveal metabolic reprogramming associated with disease development and to discover key biomarkers with diagnostic potential. Therefore, the quality of MSI image data obtained by mass spectrometry acquisition and its preprocessing are of great significance for subsequent metabolite pathway analysis.
[0003] MSI is widely used in biomedical research. However, there may be many potential systematic differences in mass spectrometry data, including differences between pixels, differences between regions, and differences between slices. These differences are caused by factors at many levels, such as sample storage and collection, equipment differences in mass spectrometers, and changes in laboratory environmental conditions (temperature, humidity), which will affect subsequent data analysis and hinder reliable comparison of data in large-scale studies. In some cases, systematic differences in data may mask true biological differences.
[0004] Systematic differences between pixels are mainly reflected in sample preparation and instrument measurement. Different chemical properties at different locations of tissues will affect solvent extraction efficiency and matrix crystallization, resulting in uneven matrix coating and matrix-related ion suppression, which will cause differences in signal intensity between pixels and affect the overall measurement process. In previous drug MSI studies, Hamm et al. introduced tissue extinction coefficients (TECs) to quantify and correct tissue-specific ion suppression. This method uniformly coats the target compound on the surface of the tissue, and determines TECs by measuring the signal intensity differences of the target compound in different organs. In subsequent experiments, the pre-obtained TECs are used as organ-specific correction factors in the study of drug-treated animals, thereby attempting to reduce the signal intensity differences caused by tissue-specific ion suppression and more accurately reflect the true content or distribution of the target compound in the tissue. However, although this method of introducing TECs has shown certain effects in some cases, it also has limitations, such as being unsuitable for discovery MSI. In discovery studies, each molecule responds differently to ionization and is affected differently by systematic differences between pixels, so it is impossible to rely solely on TECs to solve all problems related to ion suppression.
[0005] During measurement, sections at different locations on the slide may also be affected by different degrees of systematic differences. For example, the difference in thickness between different cross-sectional areas may affect the ionization efficiency or the diffusion of molecules, resulting in differences in signal intensity. In addition, due to differences in the measurement order, the matrix may sublimate or the detector sensitivity may gradually decrease as the measurement proceeds, which may cause deviations in the measurement results between different sections. Although the use of a random measurement order may reduce the effects of these measurement processes to a certain extent, it cannot effectively compensate for the artifacts introduced during the sample preparation process and the effects caused by inconsistent slice thickness.
[0006] Similarly, during the slide preparation stage, subtle differences in operation (such as soaking time, different dates of mass spectrometry imaging, etc.) can also introduce difficult-to-control systematic differences. These accumulated differences reduce the comparability of data between slides, posing challenges to the accurate analysis and interpretation of mass spectrometry imaging data. Determining quality control standards during slide preparation can help solve some problems, but there is currently a lack of quality control standards that can cover all aspects of slide preparation (such as washing, digestion, derivatization, matrix coating, drying, rewetting, and many other steps), and most of the existing quality control standards can only help identify abnormal situations. In terms of solving systematic differences between sections, further exploration and improvement of relevant methods and standards are still needed.
[0007] Therefore, it is necessary to study the mass spectrometry normalization technology to standardize the mass spectrometry data of different samples to eliminate the influence of experimental operation and instrument response on the mass spectrometry data, so as to more accurately compare and analyze the differences between different samples. At present, the commonly used methods for mass spectrometry image data normalization include total ion current normalization (TIC), median normalization, root mean square normalization, etc. The TIC method adjusts the total ion current intensity of each mass spectrum in the image to the same value, and uniformly normalizes all ions therein, that is, the mass spectrum peak area or peak height value of each pixel is divided by the total area or total peak height value of all ion peaks in the pixel. In this way, different mass spectra are comparable in overall signal intensity, reducing the differences caused by factors such as sample quantity and ionization efficiency. The median normalization method calculates the median of all ion intensities of each pixel, and finds a reference standard (usually the median of all pixel medians is used as a reference), and the ratio between the median of each pixel and the reference median is used as the normalization factor. After median normalization, the intensity differences between different pixels of the MSI data are standardized to a certain extent for subsequent analysis. The root mean square normalization method regards all ion intensity values of each pixel as a data sequence and calculates the root mean square value (RMS) of this sequence, that is, first square the intensity value, average it, and then take the square root, and then determine a reference RMS value. A scaling factor is calculated for each pixel so that the RMS values of all pixels tend to be consistent (that is, normalized to the reference RMS value). The advantage of root mean square normalization is that it has a greater weight on stronger signals, which may help retain the true biological differences between samples, but it also makes it more sensitive to outliers.
[0008] In fact, there may be many tissue regions with significant differences in mass spectrometry image data. There is a certain degree of heterogeneity between these regions, but there is a certain degree of similarity between the internal pixels. The above normalization method does not take into account that different pixels may belong to the same or different tissue regions, but only normalizes all pixels under the same conditions, which may weaken the spatial differences between pixels in different tissue regions (such as TIC, median normalization) or amplify the abnormal differences between all pixels caused by noise (such as RMS normalization). Therefore, a normalization method is needed that can normalize mass spectrometry data, eliminate the influence of experimental operations and instruments, and retain the spatial heterogeneity structure. Summary of the invention
[0009] In order to solve the above problems, the present invention proposes a mass spectrometry imaging data normalization method based on local spatial structure, introduces the concept of neighbor set, determines the neighbor set (that is, the set of pixels that can be spatially divided into a unified area) through the pixel spatial adjacency and spectral correlation, and then searches for the normalization coefficient that can minimize the distance between the normalized pixel neighbors based on the gradient descent method. The normalization coefficient is applied to the original image data to achieve normalization, so that all pixels are divided and classified according to spatial position and spectral correlation, and normalized according to different standards. While ensuring the removal of systematic differences between truly similar pixels, the heterogeneity between pixels in different regions or regional boundaries is retained.
[0010] The specific plan is as follows:
[0011] On the one hand, a mass spectrometry imaging data normalization method based on local spatial structure includes:
[0012] S1, import the initial MSI dataset and the spatial position information of each pixel in the MSI image;
[0013] S2, constructing a spatial proximity matrix of MSI image pixels based on the spatial position information of each pixel, calculating the spectral correlation between each pixel in the MSI image, constructing a spectral correlation matrix between pixels based on the spectral correlation, multiplying the spatial proximity matrix and the spectral correlation matrix to obtain an adjacency matrix between MSI image pixels;
[0014] S3, reducing the dimension of the initial MSI data set to obtain a data set after dimension reduction;
[0015] S4, performing a logarithmic transformation on the reduced-dimensional data set, and calculating the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulating the L1 norm distances between all neighbor pixel spectra to obtain a cumulative sum; introducing a penalty coefficient, and constructing an objective function based on the cumulative sum;
[0016] S5, minimizing the objective function by a gradient descent method, and iteratively updating the normalization coefficients of all pixels in the MSI image until convergence, to obtain the final normalization coefficients;
[0017] S6, multiplying the final normalization coefficient by the initial MSI dataset to obtain a normalized MSI dataset.
[0018] Furthermore, in S2, the calculation formula of the spatial proximity matrix of the MSI image pixels is as follows:
[0019]
[0020] Where W represents the spatial proximity matrix of MSI image pixels, w ijIndicates whether pixel i and pixel j are k-order neighbors in spatial position, N is the number of pixels; the calculation formula of the spectral correlation matrix between the pixels is as follows:
[0021]
[0022] Where H represents the spectral correlation matrix between MSI image pixels; h ij represents the spectral correlation coefficient between pixel i and pixel j; T is a given threshold; the calculation formula of the adjacency matrix between pixels of the MSI image is as follows:
[0023] I=(I ij ) N×N =(w ij ·h ij ) N×N ;
[0024] Where I represents the adjacency matrix between pixels in the MSI image; I ij Indicates whether pixel i and pixel j are neighbor pixels, that is, whether they are a pair of pixels adjacent in spatial position and the spectral correlation coefficient between pixels is higher than a given threshold.
[0025] Furthermore, the S4 specifically includes:
[0026] Initialize the normalization coefficient of each pixel in, represents the initial normalization coefficient of pixel i, N is the number of pixels;
[0027] Perform logarithmic transformation on the reduced-dimensional data set, and the calculation formula is as follows:
[0028]
[0029] Among them, x i is the intensity vector of pixel i before logarithmic transformation, The meaning is consistent with the previous text. is the intensity vector of pixel i before and after logarithmic transformation;
[0030] Calculate the L1 norm distance between the two neighbor pixel spectra. The calculation formula is as follows:
[0031]
[0032] in, and represents the intensity vector of neighbor pixels i and j after logarithmic transformation, d ij represents the L1 norm distance between the spectra of neighbor pixels i and j;
[0033] Calculate the sum of the weighted L1 norm distances between all neighbor pixel spectra, and the calculation formula is as follows:
[0034]
[0035] Where l1 represents the sum of the weighted L1 norm distances between all neighbor pixel spectra;
[0036] Introducing the penalty coefficient, we get the objective function L, and the calculation formula is as follows:
[0037]
[0038] Among them, N I is the number of all neighbor pixel pairs, and λ is the penalty coefficient for the normalization coefficient α.
[0039] Furthermore, the S5 specifically includes:
[0040] The pixel normalization coefficient is updated using the gradient descent method, and the calculation formula is as follows:
[0041]
[0042] Among them, t and t-1 represent the t-th and t-1-th iterations respectively. and Respectively represent the normalization coefficient of the i-th pixel at round t and t-1, η (t) Represents the learning rate of the tth round of iteration;
[0043]
[0044] Where η0 is the initial learning rate, R is the learning rate decay factor, τ is the decay step number, and floor(*) means rounding down the number in the brackets;
[0045] When the following conditions are met, the objective function converges and the iteration stops:
[0046]
[0047] Among them, median(*) represents the median operation, and ε represents the convergence criterion;
[0048] The optimal normalization coefficient is exponentially transformed to obtain the final normalization coefficient:
[0049] α′=e α ;
[0050] Among them, α′ is the normalized coefficient obtained by conversion.
[0051] Furthermore, in S6, the normalization coefficient of each pixel is multiplied by the MSI initial data to obtain a normalized MSI data set, and the formula is as follows:
[0052]
[0053] in, is the vector of the i-th pixel in the MSI initial dataset.
[0054] On the other hand, a mass spectrometry imaging data normalization system based on local spatial structure includes:
[0055] A data import module is used to import the initial MSI data set and the spatial position information of each pixel in the MSI image;
[0056] An adjacency matrix construction module is used to construct a spatial adjacency matrix of MSI image pixels based on the spatial position information of each pixel, calculate the spectral correlation between each pixel in the MSI image, construct a spectral correlation matrix between pixels based on the spectral correlation, and multiply the spatial adjacency matrix and the spectral correlation matrix to obtain an adjacency matrix between MSI image pixels;
[0057] The data dimension reduction module is used to reduce the dimension of the initial MSI data set to obtain a data set after dimension reduction;
[0058] The objective function construction module is used to perform logarithmic transformation on the reduced-dimensional data set, calculate the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulate the L1 norm distances between all neighbor pixel spectra to obtain the cumulative sum; introduce a penalty coefficient, and construct the objective function based on the cumulative sum;
[0059] A normalization coefficient convergence module is used to minimize the objective function by using a gradient descent method, and iteratively update the normalization coefficients of all pixels in the MSI image until convergence to obtain the final normalization coefficients;
[0060] The data normalization module is used to multiply the final normalization coefficient by the initial MSI data set to obtain a normalized MSI data set.
[0061] The present invention adopts the above technical solution and has the following beneficial effects:
[0062] (1) The present invention uses a mass spectrometry imaging data normalization method based on local spatial structure to achieve data normalization correction while better retaining the local spatial structure, making the spatial boundaries between different tissue regions clearer and easier to distinguish;
[0063] (2) The present invention minimizes the objective function by introducing gradient descent optimization and uses a penalty coefficient to prevent overfitting. This method greatly improves the stability and reliability of the corrected data. Compared with other normalization methods, the effect of this method on the Moran index value of ions with strong spatial autocorrelation before and after correction is more stable, which shows that while reducing the influence of noise, it also better preserves the true biological differences in the data, providing a solid foundation for subsequent statistical analysis;
[0064] (3) The present invention enhances image contrast and resolution by reducing the difference in pixel intensity within the same tissue area, making the details in the image more obvious. For mass spectrometry imaging, this means that different tissue types or pathological conditions can be distinguished more accurately, helping researchers to more easily discover potential key biomarkers. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flow chart of a method for normalizing mass spectrometry imaging data based on local spatial structure according to an embodiment of the present invention;
[0066] Figure 2 The visualized grayscale image obtained by normalizing using different methods and then performing UMAP dimensionality reduction in the embodiment of the present invention;
[0067] Figure 3 It is a comparison diagram of the ion images of the embodiment of the present invention under different normalization processing methods;
[0068] Figure 4 A diagram showing changes in Moran's index values of different pixels after normalization using different methods according to an embodiment of the present invention;
[0069] Figure 5 4 is a structural block diagram of a mass spectrometry imaging data normalization device based on local spatial structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.
[0071] like Figure 1 As shown, the present invention provides a mass spectrometry imaging data normalization method based on local spatial structure, comprising:
[0072] S1, import the initial MSI dataset and the spatial position information of each pixel in the MSI image.
[0073] Specifically, the verification data set used in this embodiment is a brain MSI data, with a total number of 36523 pixels and a total number of 1309 ions.
[0074] S2, constructing the spatial proximity matrix of MSI image pixels based on the spatial position information of each pixel, calculating the spectral correlation between each pixel in the MSI image, constructing the spectral correlation matrix between pixels based on the spectral correlation, multiplying the spatial proximity matrix and the spectral correlation matrix to obtain the adjacency matrix between MSI image pixels.
[0075] Specifically, the calculation formula of the spatial proximity matrix of the MSI image pixels is as follows:
[0076]
[0077] Where W represents the spatial proximity matrix of MSI image pixels, w ij Indicates whether pixel i and pixel j are k-order neighbors in spatial position, N is the number of pixels; the calculation formula of the spectral correlation matrix between the pixels is as follows:
[0078]
[0079] Where H represents the spectral correlation matrix between MSI image pixels; h ij represents the spectral correlation coefficient between pixel i and pixel j; T is a given threshold; the calculation formula of the adjacency matrix between pixels of the MSI image is as follows:
[0080] I=(I ij ) N×N =(w ij ·h ij ) N×N ;
[0081] Where I represents the adjacency matrix between pixels in the MSI image; I ij Indicates whether pixel i and pixel j are neighbor pixels, that is, whether they are a pair of pixels adjacent in spatial position and the spectral correlation coefficient between pixels is higher than a given threshold.
[0082] Specifically, the dimensionality reduction of this embodiment is to rearrange the variables from large to small according to the non-missing rate of each variable before filling the missing values, starting from the variable with the largest non-missing rate, and sequentially include subsequent variables. If the cumulative non-missing rate (i.e., the proportion of pixels that are not missing on at least one variable) is greater than 80%, then stop including variables, and the variables that have been included are divided into a variable block; repeat the above steps starting from the next variable until all variables are divided into variable blocks; accumulate the variable values in each variable block into new variables, thereby reducing the number of variables and obtaining a reduced-dimensional data set. The number of variables in the reduced-dimensional data set is denoted as q, and the pixel i is denoted as the vector x i ={x i1 ,x i2 ,…,x iq}.
[0083] S3, reducing the dimension of the initial MSI dataset to obtain a dataset after dimension reduction.
[0084] S4, logarithmically transform the reduced-dimensional data set, calculate the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulate the L1 norm distances between all neighbor pixel spectra to obtain the cumulative sum; introduce a penalty coefficient, and construct an objective function based on the cumulative sum.
[0085] The S4 specifically includes:
[0086] Initialize the normalization coefficient of each pixel in, represents the initial normalization coefficient of pixel i, N is the number of pixels;
[0087] Perform logarithmic transformation on the reduced-dimensional data set, and the calculation formula is as follows:
[0088]
[0089] Among them, x i is the intensity vector of pixel i before logarithmic transformation, The meaning is consistent with the previous text. is the intensity vector of pixel i before and after logarithmic transformation;
[0090] Calculate the L1 norm distance between the two neighbor pixel spectra. The calculation formula is as follows:
[0091]
[0092] in, and represents the intensity vector of neighbor pixels i and j after logarithmic transformation, d ij represents the L1 norm distance between the spectra of neighbor pixels i and j;
[0093] Calculate the sum of the weighted L1 norm distances between all neighbor pixel spectra, and the calculation formula is as follows:
[0094]
[0095] Where l1 represents the sum of the weighted L1 norm distances between all neighbor pixel spectra;
[0096] Introducing the penalty coefficient, we get the objective function L, and the calculation formula is as follows:
[0097]
[0098] Among them, N I is the number of all neighbor pixel pairs, and λ is the penalty coefficient for the normalization coefficient α.
[0099] S5, minimize the objective function by the gradient descent method, and iteratively update the normalization coefficients of all pixels in the MSI image until convergence to obtain the final normalization coefficients.
[0100] Specifically, the S5 specifically includes:
[0101] The pixel normalization coefficient is updated using the gradient descent method, and the calculation formula is as follows:
[0102]
[0103] Among them, t and t-1 represent the t-th and t-1-th iterations respectively. and Respectively represent the normalization coefficient of the i-th pixel at round t and t-1, η (t) Represents the learning rate of the tth round of iteration;
[0104]
[0105] Where η0 is the initial learning rate, R is the learning rate decay factor, τ is the decay step number, and floor(*) means rounding down the number in the brackets;
[0106] When the following conditions are met, the objective function converges and the iteration stops:
[0107]
[0108] Among them, median(*) represents the median operation, and ε represents the convergence criterion;
[0109] The optimal normalization coefficient is exponentially transformed to obtain the final normalization coefficient:
[0110] α′=e α ;
[0111] Among them, α′ is the normalized coefficient obtained by conversion.
[0112] S6, multiplying the final normalization coefficient by the initial MSI dataset to obtain a normalized MSI dataset.
[0113] Specifically, the normalization coefficient of each pixel is multiplied by the initial MSI data to obtain the normalized MSI data set. The formula is as follows:
[0114]
[0115] in, is the vector of the i-th pixel in the MSI initial dataset.
[0116] Specifically, the specific parameter settings in this embodiment are shown in Table 1 below.
[0117] Table 1
[0118]
[0119] Specifically, the verification and comparison of the normalization method of this embodiment are as follows:
[0120] (1) UMAP dimensionality reduction visualization: perform maximum-minimum normalization on each ion in the data, then use the UMAP method to reduce the data to three dimensions, calculate the average of the three-dimensional data, input it into the R, G, and B channels, and obtain a grayscale image;
[0121] (2) Single ion image visualization: The maximum-minimum value of the selected ion is normalized, and the normalized value is input into the G channel to obtain a single channel image;
[0122] (3) Calculation of Moran's index: Select an index to measure spatial autocorrelation: Moran's index, which is calculated as follows:
[0123]
[0124] Among them, N is the number of all pixels, x i and x j Represent the intensity of a certain ion at pixels i and j respectively, is the mean intensity of the ion at all pixels; if pixels i and j are neighbors, then w ij =1, otherwise w ij = 0. The value range of the Moran index is from -1 to 1. The closer the value is to 1, the more significant the spatial aggregation pattern is.
[0125] Specifically, Figure 2 The figure shows a visualized grayscale image obtained by normalizing the MSI data using different methods and then performing UMAP dimensionality reduction. The normalization methods used are, from left to right, no normalization, total ion flow normalization, median normalization, root mean square normalization, and normalization based on local spatial structure. The results show that total ion flow normalization reduces the differences between regions of the entire image, median normalization makes it difficult to distinguish different regions, and root mean square normalization seems to retain a lot of details, but in fact different regions are completely mixed together and difficult to distinguish. After normalization based on local spatial structure, the spatial boundaries of the MSI data are clearer and it is easier to distinguish different regions. In summary, the total ion flow, median and root mean square normalization methods will erase some structural differences to a certain extent, while the mass spectrometry imaging data normalization method based on local spatial structure proposed in the present invention can retain more spatial structural differences while normalizing.
[0126] Specifically, Figure 3 The figure shows the comparison of ion images with a mass-to-charge ratio of 229.9384 under different normalization methods. The normalization methods used for comparison are the same as above. The image below each column shows the distribution of the ion after correction by the corresponding method, and the green intensity indicates the concentration of the ion. The Moran's index above the image reflects the spatial autocorrelation of each ion under different normalization methods. The higher the value, the stronger the spatial autocorrelation of the ion. The results show that after correction using the total ion flow normalization, median normalization, and root mean square normalization methods, the Moran's index has decreased to a certain extent, that is, the spatial structure after normalization has decreased; and after correction using the normalization method based on the local spatial structure, the Moran's index has increased to a certain extent, that is, the spatial structure can be retained or even more prominent while normalizing.
[0127] Specifically, Figure 4 The figure shows the changes in the Moran index values of different pixels after normalization using different methods. The horizontal axis represents the Moran index value before normalization, and the vertical axis represents the change in the Moran index after normalization. For all ions with a Moran index greater than 0.5 before correction (i.e., with strong spatial structure), only 45.71% of the ions have an increased Moran index after total ion flow normalization, with an average increase of 0.038, while the rest of the ions have an average decrease of 0.072; after median normalization, 51.43% of the ions have an increased index (average 0.0097), while the rest of the ions have an average decrease of 0.024; after root mean square normalization, only 4.76% of the ions have an increased index (average 0.034), while the rest of the ions have an average decrease of 0.16; and after normalization based on local spatial structure, 93.33% of the ions have an increased Moran index, with an average increase of 0.0033, while the rest of the ions have an average decrease of 0.0014. In summary, there are obvious differences in the impact of different methods on the Moran index value. Among them, the normalization method based on local spatial structure performs outstandingly for ions with a Moran index greater than 0.5 before correction. The Moran index of most ions increases and the fluctuation is relatively small, proving that it retains and even highlights the spatial structure of the image data with high stability.
[0128] In summary, the mass spectrometry imaging data normalization method based on local spatial structure can retain the spatial structure characteristics while correcting the data, and enhance the similarity of pixels in the same tissue area to a certain extent. Compared with other normalization correction methods, it is more stable, has better performance, and is more suitable for subsequent statistical analysis.
[0129] like Figure 5 As shown, this embodiment also discloses a mass spectrometry imaging data normalization system based on local spatial structure, including:
[0130] A data import module 51 is used to import the initial MSI data set and the spatial position information of each pixel in the MSI image;
[0131] The adjacency matrix construction module 52 is used to construct a spatial adjacency matrix of MSI image pixels based on the spatial position information of each pixel, calculate the spectral correlation between each pixel in the MSI image, construct a spectral correlation matrix between pixels based on the spectral correlation, and multiply the spatial adjacency matrix and the spectral correlation matrix to obtain an adjacency matrix between MSI image pixels;
[0132] A data dimension reduction module 53 is used to reduce the dimension of the initial MSI data set to obtain a data set after dimension reduction;
[0133] The objective function construction module 54 is used to perform logarithmic transformation on the data set after dimension reduction, calculate the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulate the L1 norm distances between all neighbor pixel spectra to obtain a cumulative sum; introduce a penalty coefficient, and construct an objective function based on the cumulative sum;
[0134] A normalization coefficient convergence module 55 is used to minimize the objective function by a gradient descent method, and iteratively update the normalization coefficients of all pixels in the MSI image until convergence, to obtain a final normalization coefficient;
[0135] The data normalization module 56 is used to multiply the final normalization coefficient by the initial MSI data set to obtain a normalized MSI data set.
[0136] The specific implementation of a mass spectrometry imaging data normalization system based on local spatial structure is the same as the mass spectrometry imaging data normalization method based on local spatial structure, and will not be repeated in this embodiment.
[0137] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A mass spectrometry imaging data normalization method based on local spatial structure, characterized in that: include: S1, import the initial MSI dataset and the spatial position information of each pixel in the MSI image; S2, constructing a spatial proximity matrix of MSI image pixels based on the spatial position information of each pixel, calculating the spectral correlation between each pixel in the MSI image, constructing a spectral correlation matrix between pixels based on the spectral correlation, multiplying the spatial proximity matrix and the spectral correlation matrix to obtain an adjacency matrix between MSI image pixels; S3, reducing the dimension of the initial MSI data set to obtain a data set after dimension reduction; S4, performing a logarithmic transformation on the reduced-dimensional data set, and calculating the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulating the L1 norm distances between all neighbor pixel spectra to obtain a cumulative sum; introducing a penalty coefficient, and constructing an objective function based on the cumulative sum; S5, minimizing the objective function by a gradient descent method, and iteratively updating the normalization coefficients of all pixels in the MSI image until convergence, to obtain the final normalization coefficients; S6, multiplying the final normalization coefficient by the initial MSI dataset to obtain a normalized MSI dataset.
2. The mass spectrometry imaging data normalization method based on local spatial structure according to claim 1, characterized in that: In S2, the calculation formula of the spatial proximity matrix of the MSI image pixels is as follows: Where W represents the spatial proximity matrix of MSI image pixels, w ij Indicates whether pixel i and pixel j are k-order neighbors in spatial position, N is the number of pixels; the calculation formula of the spectral correlation matrix between the pixels is as follows: Where H represents the spectral correlation matrix between MSI image pixels; h ij represents the spectral correlation coefficient between pixel i and pixel j; T is a given threshold; the calculation formula of the adjacency matrix between pixels of the MSI image is as follows: I=(I ij ) N×N =(w ij ·h ij ) N×N ; Where I represents the adjacency matrix between pixels in the MSI image; I ij Indicates whether pixel i and pixel j are neighbor pixels, that is, whether they are a pair of pixels adjacent in spatial position and the spectral correlation coefficient between pixels is higher than a given threshold.
3. The mass spectrometry imaging data normalization method based on local spatial structure according to claim 1, characterized in that: The S4 specifically includes: Initialize the normalization coefficient of each pixel in, represents the initial normalization coefficient of pixel i, N is the number of pixels; Perform logarithmic transformation on the reduced-dimensional data set, and the calculation formula is as follows: Among them, x i is the intensity vector of pixel i before logarithmic transformation, The meaning is consistent with the previous text. is the intensity vector of pixel i before and after logarithmic transformation; Calculate the L1 norm distance between the two neighbor pixel spectra. The calculation formula is as follows: in, and represents the intensity vector of neighbor pixels i and j after logarithmic transformation, d ij represents the L1 norm distance between the spectra of neighbor pixels i and j; Calculate the sum of the weighted L1 norm distances between all neighbor pixel spectra, and the calculation formula is as follows: Where l1 represents the sum of the weighted L1 norm distances between all neighbor pixel spectra; Introducing the penalty coefficient, we get the objective function L, and the calculation formula is as follows: Among them, N I is the number of all neighbor pixel pairs, and λ is the penalty coefficient for the normalization coefficient α.
4. The mass spectrometry imaging data normalization method based on local spatial structure according to claim 3, characterized in that: The S5 specifically includes: The pixel normalization coefficient is updated using the gradient descent method, and the calculation formula is as follows: Among them, t and t-1 represent the t-th and t-1-th iterations respectively. and Respectively represent the normalization coefficient of the i-th pixel at round t and t-1, η (t) Represents the learning rate of the tth round of iteration; Where η0 is the initial learning rate, R is the learning rate decay factor, τ is the decay step number, and floor(*) means rounding down the number in the brackets; When the following conditions are met, the objective function converges and the iteration stops: Among them, median(*) represents the median operation, and ε represents the convergence criterion; The optimal normalization coefficient is exponentially transformed to obtain the final normalization coefficient: α′=e α ; Among them, α′ is the normalized coefficient obtained by conversion.
5. The mass spectrometry imaging data normalization method based on local spatial structure according to claim 4, characterized in that: In S6, the normalization coefficient of each pixel is multiplied by the MSI initial data to obtain the normalized MSI data set, and the formula is as follows: in, is the vector of the i-th pixel in the MSI initial dataset.
6. A mass spectrometry imaging data normalization system based on local spatial structure, characterized in that: include: A data import module is used to import the initial MSI data set and the spatial position information of each pixel in the MSI image; An adjacency matrix construction module is used to construct a spatial adjacency matrix of MSI image pixels based on the spatial position information of each pixel, calculate the spectral correlation between each pixel in the MSI image, construct a spectral correlation matrix between pixels based on the spectral correlation, and multiply the spatial adjacency matrix and the spectral correlation matrix to obtain an adjacency matrix between MSI image pixels; The data dimension reduction module is used to reduce the dimension of the initial MSI data set to obtain a data set after dimension reduction; The objective function construction module is used to perform logarithmic transformation on the reduced-dimensional data set, calculate the L1 norm distance between neighbor pixel spectra based on the adjacency matrix, accumulate the L1 norm distances between all neighbor pixel spectra to obtain the cumulative sum; introduce a penalty coefficient, and construct the objective function based on the cumulative sum; A normalization coefficient convergence module is used to minimize the objective function by using a gradient descent method, and iteratively update the normalization coefficients of all pixels in the MSI image until convergence to obtain the final normalization coefficients; The data normalization module is used to multiply the final normalization coefficient by the initial MSI data set to obtain a normalized MSI data set.
Citation Information
Patent Citations
Structural variant analysis
CN111566227A
Interactive space segmentation method for mass spectrum imaging data
CN114494175A
Isotope peak identification method and device based on mass spectrum imaging data and readable medium
CN117274639A
Ultrasonic image detection method and system based on artificial intelligence
CN118552504A
Image segmentation method for mass spectrum imaging image of ESI source
CN119295477A