Method and system for identifying space cluster ions in mass spectrum imaging data

By preprocessing and dimensional reduction of mass spectrometry imaging data, combining random pixel position replacement and image block division, spatial cluster fractions are constructed, and the problem of low spatial cluster ion recognition efficiency in mass spectrometry imaging data in the prior art is solved, and the problem of low spatial cluster ion recognition efficiency in mass spectrometry imaging data is realized. More efficient and accurate analysis results.

CN119400275AActive Publication Date: 2025-02-07XIAMEN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411538584.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

When using the Mantel Test analysis method in the prior art, it is difficult to effectively identify spatial cluster ions in mass spectrometry imaging data, resulting in low analysis efficiency and low recognition accuracy.

Method used

By preprocessing the mass spectrometry imaging data, dimensional reduction, random pixel position replacement, image block division and downsampling, spatial clustering fractions are constructed, and ionic images larger than the preset threshold are filtered out.

Benefits of technology

It improves the analysis efficiency and accuracy of mass spectrometry imaging data, and can more accurately and quickly identify spatial cluster ions, which are suitable for mass spectrometry imaging data and other spatial imaging data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119400275A_ABST
    Figure CN119400275A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for identifying space clustering ions in mass spectrum imaging data, and relates to the technical field of mass spectrum imaging data processing, and the method comprises the steps: S1, preprocessing MSI data to obtain an original ion image set, and carrying out the dimension reduction of the original ion image set to obtain an embedded ion image set; s2, randomizing the original ion image set to obtain a randomized ion image set; s3, dividing all image sets by image blocks to obtain an original ion image block set, an embedded ion image block set and a randomized ion image block set; s4, constructing a sampling probability, and performing down-sampling based on the sampling probability to obtain an original ion image down-sampling set and a randomized ion image down-sampling set; s5, respectively constructing correlation coefficients in the two down-sampling sets, and calculating a space clustering score; and S6, screening based on the space clustering fractions of all the ion images. According to the method, the correlation between the signal intensity difference of the MSI image and the spatial distance is used as the measurement of the spatial clustering degree, and the spatial distribution characteristics of the signal intensity are fully extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mass spectrometry imaging processing, and in particular to a method and system for identifying spatially clustered ions in mass spectrometry imaging data. Background Art

[0002] Mass spectrometry imaging (MSI) is an emerging biological detection technology developed at the beginning of this century. Compared with traditional gas chromatography-mass spectrometry and liquid chromatography-mass spectrometry, MSI technology does not require homogenization of biological tissues. While preserving the integrity of biological tissues, it can provide spatial location information that is difficult to obtain with other mass spectrometry technologies. During the data acquisition process, MSI technology can perform in situ analysis of molecules such as lipids, polysaccharides, amino acids, oligonucleotides, peptides, metabolites and proteins in biological tissues, and obtain information on the spatial distribution and relative abundance changes of these molecules in tissue samples. This capability makes MSI technology widely used in the analysis of spatial heterogeneity of biological tissues.

[0003] Spatially clustered ions refer to ions with a clear spatial structure in the tissue space. Based on spatially clustered ions, the interaction relationship of metabolic processes can be analyzed, and they are an important research object for MSI data analysis. Through the identification of spatially clustered ions, researchers can effectively identify and eliminate spatial noise or nonspecific signals, thereby significantly reducing the complexity of data analysis. In addition, this analysis can help identify molecular markers associated with specific pathological states or physiological processes, which is of great significance for tissue heterogeneity research. Therefore, the identification of spatially clustered ions can not only improve the analysis efficiency of MSI data, but also play an important role in the field of medical research.

[0004] In statistics, the presence of spatially clustered ions is usually manifested as a strong correlation between their spatial position matrix and the intensity distribution matrix. The traditional correlation coefficient is only applicable to the analysis of the correlation between variables within a single data matrix, and is not sufficient to handle the correlation analysis between two independent matrices. The Mantel Test analysis method proposed by Nathan Mantel, a biostatistician at the National Institutes of Health in 1967, provides a solution. This method first calculates the distance matrix of the two data matrices, then flattens the distance matrix into a one-dimensional array and calculates the correlation between the two arrays. In order to verify the significance of this correlation, the Mantel Test uses a permutation test: by randomly permuting the columns or rows in the matrix multiple times, recalculating the correlation, and comparing the correlation of the actual data with the correlation distribution obtained after random permutation. If the actual correlation is significantly higher than the random permutation result, it indicates that there is a significant correlation between the two matrices. Using this method, the correlation between the spatial position matrix and the intensity distribution matrix can be effectively evaluated.

[0005] Although the Mantel Test analysis method provides an effective statistical tool for correlation analysis between two matrices, it is not specifically designed for MSI data. MSI data has the characteristics of low signal-to-noise ratio and high dimensionality, which makes the direct use of the Mantel Test in MSI data to identify spatially clustered ions often lead to problems such as low time efficiency and low recognition accuracy. Therefore, it is urgent to develop a new method that can reflect the spatial correlation of MSI data and adapt to its complexity and the requirements of efficient data processing. Summary of the invention

[0006] In response to the above problems, the present invention provides a method for identifying spatially clustered ions in mass spectrometry imaging data, which improves the analysis efficiency and accuracy of mass spectrometry imaging data and further promotes the application of mass spectrometry imaging technology in biomedical research.

[0007] In one aspect, a method for identifying spatially clustered ions in mass spectrometry imaging data comprises the following steps:

[0008] S1, preprocessing the mass spectrometry imaging data to obtain an original ion image set; performing dimensionality reduction on the original ion image set to obtain an embedded ion image set;

[0009] S2, randomly permuting the positions of the pixels of each ion image in the original ion image set to obtain a randomized ion image set;

[0010] S3, dividing all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set into image blocks in the same manner, to obtain an original ion image block set, an embedded ion image block set and a randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided from each ion image are the same;

[0011] S4, constructing a sampling probability based on the embedded ion image block set, and using the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set, respectively, to obtain an original ion image downsampled set and a randomized ion image downsampled set;

[0012] S5, constructing the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; constructing the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as the single ion image in the original ion image downsampling set; constructing the spatial clustering score of the single ion image based on the two correlation coefficients;

[0013] S6, repeating step S5, calculating the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screening out ion images greater than a preset threshold, and obtaining a screened ion image set.

[0014] Preferably, the mass spectrometry imaging data is preprocessed, specifically including:

[0015] Peak alignment: aligning the ion peaks of each pixel of the mass spectrometry imaging data with a reference peak to correct the mass-to-charge ratio drift of each ion peak; the reference peak is the peak with the highest correlation with other ion peaks;

[0016] Spectral peak extraction, retaining spectral peaks that meet the set intensity and are at the local maximum; the set intensity is determined based on the noise intensity; the noise intensity is determined by the median absolute deviation method;

[0017] Image normalization operation.

[0018] Preferably, in S2, the pixels of each ion image in the original ion image set are randomly permuted to obtain a randomized ion image set, and the specific steps are as follows:

[0019] S21, the original ion image set is segmented into background region and tissue region using clustering method;

[0020] S22, extracting pixels of the tissue area in the ion image of the original ion image set, and performing random position replacement to keep the number of pixels of each ion image unchanged;

[0021] S23, repeating step S22 until the positions of all ion images are randomly replaced to obtain a randomized ion image set.

[0022] Preferably, in S3, a sliding window method is used to divide all ion images in the original ion image set, the embedded ion image set and the randomized ion image set into image blocks.

[0023] Preferably, in S4, the sampling probability is constructed based on the embedded ion image block set, specifically as follows:

[0024] Get the standard deviation of the kth image patch in the embedded ion image patch set as follows:

[0025]

[0026] Where j represents the jth embedded ion image, j = (1, 2, .., n); n represents the embedding dimension; e j,k represents the kth image patch of the jth ion image in the embedded image patch set; σ represents the standard deviation; K represents the total number of image patches in a single ion image;

[0027] The sampling probability of the kth image block in the ion image block set is constructed based on the standard deviation as follows:

[0028]

[0029] Preferably, in S4, the number of sampling points for downsampling is expressed as:

[0030] S k =w 2 ×ρ k

[0031] Where w represents the number of pixels in the sliding window; S k Indicates the number of sampling points of the kth image block.

[0032] Preferably, in S5, the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set is constructed; the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as the single ion image in the original ion image downsampling set is constructed, specifically as follows:

[0033] Calculate the kth image block m of the i-th ion image of the original ion image downsampling set M i,k The signal strength difference between any two sampling points a and b is and spatial distance And calculate the correlation coefficient between the signal strength difference of the sampling points and the spatial distance, which is expressed as:

[0034]

[0035] in, represents the correlation coefficient between the signal intensity difference and spatial distance of the sampling point of the kth image block in the i-th ion image in the original ion image downsampling set M; i = (1, 2, .., N), N represents the number of ion images; cor represents the Spearman correlation coefficient calculation function; m i,k,a Indicates m i,k The signal strength value of sampling point a in m i,k,b Indicates m i,k The signal strength value of sampling point b in x a represents the horizontal coordinate of a; y a represents the vertical coordinate of a; x b represents the horizontal coordinate of b, y b represents the ordinate of b;

[0036] The two sampling points of the randomized ion image sampling set are c and d; the spatial positions of c and a in the image block match, and the spatial positions of d and b in the image block match; the correlation coefficient between the signal intensity difference and the spatial distance of the sampling points in the kth image block of the i-th ion image of the randomized ion image sampling set R is calculated, which is expressed as:

[0037]

[0038] Among them, r i,k,c Represents r i,k The signal strength value of sampling point c; r i,k,d Represents r i,k The signal strength value of sampling point d; x c represents the horizontal coordinate of c; y c represents the ordinate of c; x d represents the horizontal coordinate of d; y d Indicates the d vertical coordinate.

[0039] Preferably, the spatial clustering score of the i-th ion image is the sum of the absolute values ​​of the correlation coefficient differences of all image blocks in the original ion image downsampling set M and the randomized ion image downsampling set R, expressed as:

[0040]

[0041] Here, || represents the absolute value; K represents the total number of image blocks in a single ion image.

[0042] In another aspect, a system for identifying spatially grouped ions in mass spectrometry imaging data comprises the following:

[0043] A data preprocessing module is used to preprocess the mass spectrometry imaging data to obtain an original ion image set; and to perform dimensionality reduction on the original ion image set to obtain an embedded ion image set;

[0044] A pixel position random permutation module is used to randomly permutate the position of pixels of each ion image in the original ion image set to obtain a randomized ion image set;

[0045] An image block division module is used to divide all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set into image blocks in the same manner to obtain an original ion image block set, an embedded ion image block set and a randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided from each ion image are the same;

[0046] A downsampling module is used to construct a sampling probability based on the embedded ion image block set, and use the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set to obtain the original ion image downsampling set and the randomized ion image downsampling set;

[0047] A spatial clustering score construction module is used to construct a correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; construct a correlation coefficient of an image block in the randomized ion image downsampling set at the same position as a single ion image in the original ion image downsampling set; and construct a spatial clustering score of a single ion image based on two correlation coefficients;

[0048] The ion image screening module is used to repeatedly execute the spatial clustering score construction module, calculate the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screen out ion images greater than a preset threshold, and obtain a screened ion image set.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] (1) The present invention utilizes the correlation between the signal intensity difference of pixels in the mass spectrometry imaging ion image and their spatial distance as a measure of spatial clustering, thereby fully extracting the spatial distribution characteristics of the signal intensity;

[0051] (2) The present invention reduces the dimension of mass spectrometry imaging data, which not only concentrates the information of mass spectrometry imaging data, but also reduces the amount of computational data and improves computational efficiency; at the same time, it can also identify spatial clustering ions in local areas for different tissue regions;

[0052] (3) The method for identifying spatially clustered ions in mass spectrometry imaging data of the present invention has wide applicability, not only to the analysis of mass spectrometry imaging data, but also to other spatial imaging data, including spatial transcriptomics and spatial proteomics data. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The present invention is further described in detail below in conjunction with the accompanying drawings;

[0054] Figure 1 A flowchart of a method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention;

[0055] Figure 2 A framework diagram of a method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention;

[0056] Figure 3The method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention is applied to mass spectrometry imaging data of rat brain; wherein the clustering score threshold is 1.732;

[0057] Figure 4 The method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention is used for mass spectrometry imaging data of rat brain and the identification results of the Mantel Test method are compared;

[0058] Figure 5 The method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention is used for mass spectrometry imaging data of rat brain and the time consumption comparison result of the Mantel Test method;

[0059] Figure 6 4 is a structural block diagram of a system for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The present invention is further described below through specific implementation modes.

[0061] See also Figure 1 and Figure 2 As shown, a method for identifying spatially clustered ions in mass spectrometry imaging data comprises the following steps:

[0062] S1, preprocessing the mass spectrometry imaging data to obtain an original ion image set; and performing dimensionality reduction on the original ion image set to obtain an embedded ion image set.

[0063] The MSI data were preprocessed by peak alignment, peak extraction and image standardization to obtain the preprocessed MSI data M. X×Y×N , where X and Y are the horizontal and vertical pixel numbers of the ion image, respectively, and N is the number of ions; and the MSI data M X×Y×N Perform dimensionality reduction to obtain a low-dimensional embedded image E X×Y×n , n is the embedding dimension. The preprocessed MSI data matrix M X×Y×N and the low-dimensional embedded MSI data matrix E X×Y×n They represent the form of ion image sets, respectively: original ion image set M0 = {m i ,i=1,2,…,N} and the embedded ion image set E0={e j ,j=1,2,…,n};

[0064] Exemplarily, the mass spectrometry imaging data preprocessing of this embodiment is specifically as follows:

[0065] Peak alignment: Align the ion peaks of each pixel in the MSI data with the reference peaks to correct the mass-to-charge ratio drift of each ion peak. The peak with the highest correlation with other ion peaks is selected as the reference peak;

[0066] Peak extraction: Spectral peaks that meet the following two conditions are retained to achieve peak extraction: first, the intensity of the spectral peak is more than twice the noise intensity, where the noise intensity is determined by the median absolute deviation method; second, the spectral peak is at a local maximum within a 10ppm window;

[0067] Image standardization: To prevent abnormally high expression signal values ​​from affecting the overall image, pixel values ​​greater than the 95% percentile were set to the 95% percentile value, and the maximum and minimum values ​​were normalized. 75×100×2165 There are 2165 75×100 ion images, that is, the original ion image set M0 = {m i ,i=1,2,...,2165}, where each ion image has 75×100 pixels.

[0068] Exemplarily, the dimensionality reduction in this embodiment is as follows:

[0069] The Python script UMAP package is used to reduce the dimension of the MSI data to obtain a low-dimensional embedded MSI data matrix E 75×100×3 , that is, the embedded ion image set E0 = {e j ,j=1,2,…,3}, where the hyperparameters used in the algorithm are n_neighbors=10, n_components=3, metric='cosine'.

[0070] S2, randomly permuting the positions of the pixels of each ion image in the original ion image set to obtain a randomized ion image set.

[0071] S21, using a clustering method to segment the original ion image set M0 into a background region and a tissue region, and obtaining the spatial position of the tissue region;

[0072] S22, extracting pixels of the tissue area in the ion image and performing random position replacement to keep the number of pixels of each ion image unchanged;

[0073] S23, repeat the above steps until the positions of all ion images are randomly replaced to obtain a randomized MSI data matrix R X×Y×N , or called the randomized ion image set R0 = {r i ,i=1,2,…,N}.

[0074] Exemplarily, the spatial randomization of the ion image in this embodiment is specifically as follows:

[0075] The K-means clustering method in the Python script Scikit-learn package was used to segment the original ion image set M0 into background regions and tissue regions, and the spatial position of the tissue regions was obtained;

[0076] Taking i=1 as an example, extract the pixels of the tissue area in the ion image m1;

[0077] Use the random.shuffle function in the Python script numpy package to randomly permute the pixels extracted in step S21, keeping the number of pixels of each ion image unchanged;

[0078] Repeat the above steps of extracting pixels of tissue regions and performing random position permutation until all ion images are randomly permuted to obtain a randomized MSI data matrix R. 75×100×2165 , that is, the randomized ion image set R = {(r i ),i=1,2,...,2165}.

[0079] S3, all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set are divided into image blocks in the same manner to obtain the original ion image block set, the embedded ion image block set and the randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided for each ion image are the same.

[0080] Using the sliding window method, all ion images in the original ion image set M0, the randomized ion image set R0 and the embedded ion image set E0 are simultaneously divided into K image blocks, and the image block sets are obtained respectively: M1 = {m i,k ,i=1,2,…,N;k=1,2,…,K}, R1={r i,k ,i=1,2,…,N;k=1,2,…,K} and E1={e j,k ,j=1,2,…,n;k=1,2,…,K}.

[0081] Exemplarily, the ion image block division of this embodiment is specifically as follows:

[0082] Using the sliding window method, all ion images in the original ion image set M0, the randomized ion image set R0, and the embedded ion image set E0 are simultaneously divided into 3 rows and 4 columns of image blocks, that is, 12 image blocks, and the image block sets are obtained respectively:

[0083] M1={m i,k ,i=1,2,…,2165;k=1,2,…,12}

[0084] R1={ri,k ,i=1,2,…,2165;k=1,2,…,12}

[0085] E1={e j,k ,j=1,2,…,3;k=1,2,…,12}.

[0086] S4, constructing a sampling probability based on the embedded ion image block set, and using the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set, respectively, to obtain an original ion image downsampled set and a randomized ion image downsampled set.

[0087] Calculate the standard deviation of each image block in the embedded ion image block set E1 And the ratio of the standard deviation of image block k As the sampling probability of image block k, the pixels of each image block in the original ion image block set M1 and the randomized ion image block set R1 are randomly downsampled to obtain the downsampled data set:

[0088] M={m i,k,s ,i=1,2,…,N; k=1,2,…,K; s=1,2,…,S k}

[0089] R = {r i,k,s ,i=1,2,…,N; k=1,2,…,K; s=1,2,…,S k}

[0090] Among them, S k is the number of sampling points of the kth image block, and the specific calculation formula is: S k =w 2 ×ρ k , where w is the number of pixels in the sliding window.

[0091] Exemplarily, the pixel downsampling of the image block in this embodiment is specifically as follows:

[0092] Calculate the standard deviation σ of each image block in the embedded ion image block set E1 k , the specific calculation formula is:

[0093] The ratio of the standard deviation As the sampling probability of image block k, the pixels of each image block in the original ion image block set M1 and the randomized ion image block set R1 are randomly downsampled to obtain the downsampled data set:

[0094] M={m i,k,s ,i=1,2,…,2165; k=1,2,…,12; s=1,2,…,S k}

[0095] R = {r i,k,s ,i=1,2,…,2165; k=1,2,…,12; s=1,2,…,S k}

[0096] Among them, S k =w 2 ×ρ k , in this embodiment, w is 20.

[0097] S5, constructing the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; constructing the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as a single ion image in the original ion image downsampling set; constructing the spatial clustering score of a single ion image based on the two correlation coefficients.

[0098] Assume that the correlation coefficients between the intensity difference between the sampled pixels and their spatial distance in the kth image block of the i-th ion image of the original ion image downsampling set M and the randomized ion image downsampling set R are and Then the spatial clustering score of the i-th ion image is defined as: the sum of the absolute values ​​of the correlation coefficient differences of all image blocks of the i-th ion image in the original ion image downsampling set M and the randomized ion image downsampling set R, that is, The specific steps are as follows:

[0099] S51, calculating the kth image block m of the i-th ion image of the original ion image downsampling set M i,k The signal strength difference between any two sampling points a and b is and spatial distance And calculate the correlation coefficient between the signal strength difference of the sampling points and the spatial distance:

[0100]

[0101] Among them, cor(·) is the Spearman correlation coefficient calculation function, and The specific calculation formula is:

[0102]

[0103] Among them, m i,k,a Indicates m i,k The signal strength value of sampling point a in m i,k,b Indicates m i,k The signal strength value of sampling point b, (x a ,y b) represent the horizontal and vertical coordinates of a respectively, (x b ,y b ) represent the abscissa and ordinate of b respectively;

[0104] S52, the two sampling points of the randomized ion image sampling set are c and d; c matches the spatial position of a in the image block, and d matches the spatial position of b in the image block. Similarly, the kth image block r of the i-th ion image of the randomized ion image sampling set R is calculated. i,k The correlation coefficient between the signal strength difference of the sampling points and the spatial distance is expressed as:

[0105]

[0106] and The specific calculation formula is:

[0107]

[0108] Among them, r i,k,c Represents r i,k The signal strength value of sampling point c, r i,k,d Represents r i,k The signal strength value of the sampling point d, (x c ,y c ) represents the horizontal and vertical coordinates of c, (x d ,y d ) represents the abscissa and ordinate of d;

[0109] S53, calculate the spatial clustering score of the i-th ion image as: i and randomized ion image set R i The absolute value of the correlation coefficient difference of all image blocks is:

[0110]

[0111] Among them, the clustering fraction g i The higher the value, the more obvious the spatial structure of the ion image is and the more biological significance it has.

[0112] Exemplarily, the ion image spatial clustering metric of this embodiment is as follows:

[0113] Taking i=1 and k=1 as an example, calculate the first image block m of the first ion image of the original ion image downsampling set M 1,1 The signal strength difference between any two sampling points a and b is and spatial distance And calculate the correlation coefficient between the signal strength difference of the sampling points and the spatial distance:

[0114]

[0115] Among them, cor(·) is the Spearman correlation coefficient calculation function, and The specific calculation formula is:

[0116]

[0117] Among them, m 1,1,a Indicates m 1,1 The signal strength value of sampling point a in n 1,1,b Indicates m 1,1 The signal strength value of sampling point b, (x a ,y a ) represents the horizontal and vertical coordinates of a, (x b ,y b ) represents the abscissa and ordinate of b;

[0118] Similarly, the first image block r of the first ion image of the randomized ion image downsampling set R is calculated 1,1 In the equation, the correlation coefficient between the signal strength difference of the sampling points and the spatial distance is:

[0119]

[0120] and The specific calculation formula is:

[0121]

[0122] Among them, r 1,1,c Represents r i,1 The signal strength value of sampling point c, r 1,1,d Represents r 1,1 The signal strength value of the sampling point d, (x c ,y c ) represents the horizontal and vertical coordinates of a, (x d ,y d ) represents the abscissa and ordinate of d;

[0123] The correlation coefficient between the signal intensity difference and the spatial distance for different k values ​​is calculated, and the spatial clustering score of the first ion image is calculated as: the sum of the absolute values ​​of the correlation coefficient differences of all image blocks m1 in the original ion image downsampling set M and r1 in the randomized ion image downsampling set R, that is:

[0124] S6, repeating step S5, calculating the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screening out ion images greater than a preset threshold, and obtaining a screened ion image set.

[0125] Calculate the spatial clustering fraction G of all ion images = {g i ,i=1,2,…,N}, and sort the ion images from high to low according to their clustering scores. According to the needs of the actual problem, the clustering score threshold is set, the ion images greater than the set threshold are retained, and the ion images with biological significance are screened to obtain the screened ion image set.

[0126] Exemplarily, the ion image screening of this embodiment is as follows:

[0127] Repeat the acquisition of the spatial clustering score of a single ion image in step S5 for all ion images until the spatial clustering score of all ion images G={g i ,i=1,2,…,2165};

[0128] Sort the spatial clustering scores G of all the above ion images from large to small to obtain the position order of each ion image in the original ion image set M;

[0129] According to the needs of practical problems, the clustering score threshold is set to 1.732, and ion images with spatial clustering scores greater than 1.732 are retained. The number of spatially clustered ions screened is 42.

[0130] According to an embodiment of the present invention, spatial clustering ion identification is performed on MSI data of rat brain, and the screened ions show obvious spatial clustering characteristics. Figure 3 The results of ions with spatial clustering metric scores greater than 1.732 in the MSI data of rat brain are shown. The results show that the embodiments of the present invention can objectively and effectively identify spatially clustered ion images. Figure 4 and Figure 5 The comparison results of the embodiment of the present invention and the Mantel Test method in terms of recognition accuracy and time consumption are shown. The results show that the Mantel Test method makes incorrect judgments when identifying non-clustered ions. For example, the method calculates a small spatial clustering score for ions such as m / z 1339.10 that have obvious spatial clustering characteristics, and misjudges it as a spatial random ion. In contrast, the embodiment of the present invention can determine spatially clustered ions more accurately and quickly. This is due to the strategy for reducing the number of pixels in the image block proposed by the embodiment of the present invention, thereby improving the efficiency of the analysis.

[0131] In summary, the embodiment of the present invention improves the Mantel Test analysis method proposed by predecessors based on the assumption that the intensity distribution and spatial position of spatial clustered ion images should have a strong correlation, and develops a new method for identifying spatially clustered ions in MSI data. The results show that the embodiment of the present invention improves the efficiency of detection while reducing the detection time. The embodiment of the present invention provides researchers with an objective method for screening spatially aggregated ions, further expanding the application of MSI technology in biomedical research.

[0132] The embodiment of the present invention utilizes the correlation between the signal intensity difference of pixels in the MSI ion image and their spatial distance as a measure of spatial clustering, and fully extracts the spatial distribution characteristics of the signal intensity.

[0133] The embodiment of the present invention performs dimensionality simplification on mass spectrometry imaging data, which not only concentrates the information of MSI data, but also reduces the amount of calculated data and improves calculation efficiency; at the same time, it can also identify spatial clustered ions in local areas for different tissue regions.

[0134] It is worth mentioning that a method for identifying spatially clustered ions in mass spectrometry imaging data according to an embodiment of the present invention is not only applicable to the analysis of mass spectrometry imaging data, but also applicable to other spatial imaging data, such as spatial transcriptomics and spatial proteomics data, which is not limited in this embodiment.

[0135] See also Figure 6 As shown, the present invention also discloses a system for identifying spatially clustered ions in mass spectrometry imaging data, comprising:

[0136] The data preprocessing module 601 is used to preprocess the mass spectrometry imaging data to obtain an original ion image set; perform dimensionality reduction on the original ion image set to obtain an embedded ion image set;

[0137] A pixel position random replacement module 602 is used to randomly replace the position of pixels of each ion image in the original ion image set to obtain a randomized ion image set;

[0138] The image block division module 603 is used to divide all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set into image blocks in the same manner to obtain the original ion image block set, the embedded ion image block set and the randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided from each ion image are the same;

[0139] A downsampling module 604 is used to construct a sampling probability based on the embedded ion image block set, and use the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set to obtain the original ion image downsampling set and the randomized ion image downsampling set;

[0140] The spatial clustering score construction module 605 is used to construct the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; construct the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as the single ion image in the original ion image downsampling set; and construct the spatial clustering score of the single ion image based on the two correlation coefficients;

[0141] The ion image screening module 606 is used to repeatedly execute the spatial clustering score construction module to calculate the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screen out ion images greater than a preset threshold, and obtain a screened ion image set.

[0142] Specific implementation of a system for identifying spatially clustered ions in mass spectrometry imaging data The same method for identifying spatially clustered ions in mass spectrometry imaging data will not be repeatedly described in this embodiment.

[0143] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A method for identifying spatially clustered ions in mass spectrometry imaging data, characterized in that: The steps include: S1, preprocessing the mass spectrometry imaging data to obtain an original ion image set; performing dimensionality reduction on the original ion image set to obtain an embedded ion image set; S2, randomly permuting the positions of the pixels of each ion image in the original ion image set to obtain a randomized ion image set; S3, dividing all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set into image blocks in the same manner, to obtain an original ion image block set, an embedded ion image block set and a randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided from each ion image are the same; S4, constructing a sampling probability based on the embedded ion image block set, and using the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set, respectively, to obtain an original ion image downsampled set and a randomized ion image downsampled set; S5, constructing the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; constructing the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as the single ion image in the original ion image downsampling set; constructing the spatial clustering score of the single ion image based on the two correlation coefficients; S6, repeating step S5, calculating the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screening out ion images greater than a preset threshold, and obtaining a screened ion image set.

2. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 1, characterized in that: Preprocess the mass spectrometry imaging data, including: Peak alignment: aligning the ion peaks of each pixel of the mass spectrometry imaging data with a reference peak to correct the mass-to-charge ratio drift of each ion peak; the reference peak is the peak with the highest correlation with other ion peaks; Spectral peak extraction, retaining spectral peaks that meet the set intensity and are at the local maximum; the set intensity is determined based on the noise intensity; the noise intensity is determined by the median absolute deviation method; Image normalization operation.

3. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 1, characterized in that: In S2, the pixels of each ion image in the original ion image set are randomly permuted to obtain a randomized ion image set. The specific steps are as follows: S21, the original ion image set is segmented into background region and tissue region using clustering method; S22, extracting pixels of the tissue area in the ion image of the original ion image set, and performing random position replacement to keep the number of pixels of each ion image unchanged; S23, repeating step S22 until the positions of all ion images are randomly replaced to obtain a randomized ion image set.

4. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 1, characterized in that: In S3, a sliding window method is used to divide all ion images in the original ion image set, the embedded ion image set and the randomized ion image set into image blocks.

5. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 1, characterized in that: In S4, the sampling probability is constructed based on the embedded ion image block set, as follows: Get the standard deviation of the kth image patch in the embedded ion image patch set as follows: Where j represents the jth embedded ion image, j = (1, 2, .., n); n represents the embedding dimension; e j,k represents the kth image patch of the jth ion image in the embedded image patch set; σ represents the standard deviation; K represents the total number of image patches in a single ion image; The sampling probability of the kth image block in the ion image block set is constructed based on the standard deviation as follows:

6. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 5, characterized in that: In S4, the number of sampling points for downsampling is expressed as: S k =w 2 ×ρ k Where w represents the number of pixels in the sliding window; S k Indicates the number of sampling points of the kth image block.

7. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 1, characterized in that: In S5, the correlation coefficient of a single image block of a single ion image in the original ion image downsampling set is constructed; the correlation coefficient of an image block in the randomized ion image downsampling set at the same position as the single ion image in the original ion image downsampling set is constructed as follows: Calculate the kth image block m of the i-th ion image of the original ion image downsampling set M i,k The signal strength difference between any two sampling points a and b is and spatial distance And calculate the correlation coefficient between the signal strength difference of the sampling points and the spatial distance, which is expressed as: in, represents the correlation coefficient between the signal intensity difference and spatial distance of the sampling point of the kth image block in the i-th ion image in the original ion image downsampling set M; i = (1, 2, .., N), N represents the number of ion images; cor represents the Spearman correlation coefficient calculation function; m i,k,a Indicates m i,k The signal strength value of sampling point a in m i,k,b Indicates m i,k The signal strength value of sampling point b in x a represents the horizontal coordinate of a; y a represents the vertical coordinate of a; x b represents the horizontal coordinate of b, y b represents the ordinate of b; The two sampling points of the randomized ion image sampling set are c and d; the spatial positions of c and a in the image block match, and the spatial positions of d and b in the image block match; the correlation coefficient between the signal intensity difference and the spatial distance of the sampling points in the kth image block of the i-th ion image of the randomized ion image sampling set R is calculated, which is expressed as: Among them, r i,k,c Represents r i,k The signal strength value of sampling point c; r i,k,d Represents r i,k The signal strength value of sampling point d; x c represents the horizontal coordinate of c; y c represents the ordinate of c; x d represents the horizontal coordinate of d; y d Indicates the d vertical coordinate.

8. The method for identifying spatially clustered ions in mass spectrometry imaging data according to claim 7, characterized in that: The spatial clustering score of the i-th ion image is the sum of the absolute values ​​of the correlation coefficient differences of all image patches in the original ion image downsampling set M and the randomized ion image downsampling set R, expressed as: Here, || represents the absolute value; K represents the total number of image blocks in a single ion image.

9. A system for identifying spatially clustered ions in mass spectrometry imaging data, comprising: A data preprocessing module is used to preprocess the mass spectrometry imaging data to obtain an original ion image set; and to perform dimensionality reduction on the original ion image set to obtain an embedded ion image set; A pixel position random permutation module is used to randomly permutate the position of pixels of each ion image in the original ion image set to obtain a randomized ion image set; An image block division module is used to divide all ion images in the original ion image set, all ion images in the embedded ion image set and all ion images in the randomized ion image set into image blocks in the same manner to obtain an original ion image block set, an embedded ion image block set and a randomized ion image block set; when dividing the image blocks, the size and number of the image blocks divided from each ion image are the same; A downsampling module is used to construct a sampling probability based on the embedded ion image block set, and use the sampling probability to downsample the pixel points of each ion image block in the original ion image block set and the randomized ion image block set to obtain the original ion image downsampling set and the randomized ion image downsampling set; A spatial clustering score construction module is used to construct a correlation coefficient of a single image block of a single ion image in the original ion image downsampling set; construct a correlation coefficient of an image block in the randomized ion image downsampling set at the same position as a single ion image in the original ion image downsampling set; and construct a spatial clustering score of a single ion image based on two correlation coefficients; The ion image screening module is used to repeatedly execute the spatial clustering score construction module, calculate the spatial clustering scores of all ion images in the original ion image downsampling set and the randomized ion image downsampling set, screen out ion images greater than a preset threshold, and obtain a screened ion image set.

Citation Information

Patent Citations

  • Spectrometric analysis

    CN107646089A

  • Interactive space segmentation method for mass spectrum imaging data

    CN114494175A

  • Method for identifying immune-related microorganisms in colorectal cancer based on multiple omics characteristics

    CN115472214A

  • Analysis method and analysis apparatus of mass analysis data

    JP2013040808A