Nuclear magnetic resonance spectrum consistency evaluation method and system based on direct comparison of images

CN123016018APending Publication Date: 2026-10-30PEKING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611189059.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

这类方法依赖于峰拾取的准确性,对于低信噪比或高度重叠的谱图区域容易出现峰遗漏或误判

Benefits of technology

第一,本发明直接比较谱图矩阵数据,不经过峰拾取步骤,保留了谱图中的全部信号分布信息,避免了峰拾取算法的误差和主观性,相比基于峰列表的分析方法具有更高的信息利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016018A_ABST
    Figure CN123016018A_ABST
Patent Text Reader

Abstract

The application discloses a nuclear magnetic resonance spectrum consistency evaluation method and system based on image direct comparison, and belongs to the technical field of nuclear magnetic resonance testing materials. The application directly compares spectrum matrix data instead of artificial peak picking results, adopts cross-correlation analysis detection of chemical shift drift accelerated by fast Fourier transform, uses a peak area mask to exclude noise interference and calculate a peak area correlation coefficient, introduces a structural similarity index to evaluate overall similarity, and visualizes differences between two spectra through a difference map. The application is automatically realized by software throughout the whole process, does not need manual intervention, is high in calculation efficiency, and is objective and accurate in result. The application can be applied to the fields of biological drug structure consistency evaluation based on nuclear magnetic resonance spectrum comparison, polypeptide and protein function research, and instrument and equipment stability evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of nuclear magnetic resonance testing materials, and particularly relates to a nuclear magnetic resonance spectrum based on direct image comparison. Figure 1 Consistency evaluation methods and systems. Background Technology

[0002] Two-dimensional nuclear magnetic resonance (2D NMR) spectral comparison techniques have become an indispensable research tool in modern analysis. Compared to traditional one-dimensional spectroscopy, 2D NMR (such as TOCSY, HSQC, and NOESY) significantly expands the information capacity and resolution of spectra by introducing an additional frequency dimension, enabling the effective separation and attribution of overlapping signals in complex mixtures. This technique has wide applications in several cutting-edge fields, particularly in pharmaceutical analysis: 2D NMR spectral comparison combined with chemometrics can be used for the identification of prohibited substances and the evaluation of drug quality consistency. With its unique advantages of non-destructive nature, high reproducibility, and rich structural information, 2D NMR spectral comparison is increasingly becoming an important bridge connecting structure and practical applications.

[0003] Existing methods for comparing two-dimensional spectra mainly fall into two categories: The first category is peak-picking-based methods, which require first picking peaks from the spectrum, extracting their chemical shifts and intensities, and then matching and comparing them. These methods rely heavily on the accuracy of peak picking and are prone to peak omissions or misjudgments in low signal-to-noise ratio or highly overlapping spectral regions. The second category is visual spectrum comparison methods, which can only provide qualitative judgments, cannot quantify the degree of difference, and are significantly influenced by subjective factors.

[0004] With advancements in spectral acquisition technology, the sensitivity of high-field NMR instruments has continuously improved, leading to increased resolution and signal-to-noise ratio in spectral data matrices. The spectral matrix itself contains rich signal distribution information, which is often discarded in traditional peak-picking methods. Therefore, it is necessary to propose a method that directly compares spectral images, fully utilizing all the information in the spectral matrix to achieve a more comprehensive and objective consistency evaluation. Summary of the Invention

[0005] The purpose of this invention is to provide a nuclear magnetic resonance spectrum based on direct image comparison. Figure 1 This consistency evaluation method directly compares spectral matrix data, uses Fast Fourier Transform (FFT) to accelerate cross-correlation analysis to detect chemical shift drift, employs peak region masking to eliminate noise and calculates correlation indices, and introduces the Structural Similarity Index (SSIM) to assess overall similarity, thereby achieving consistency evaluation of NMR spectra. Figure 1 A comprehensive quantitative evaluation of consistency.

[0006] Another object of the present invention is to provide a nuclear magnetic resonance spectrum based on direct image comparison. Figure 1 The consistency evaluation system implements the various operational steps of the above methods through a modular software architecture, and completes the spectral comparison and analysis in an automated manner.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A nuclear magnetic resonance spectrum based on direct image comparison Figure 1 Consistency evaluation methods include: Obtain a reference NMR two-dimensional spectrum and a test NMR two-dimensional spectrum, and convert the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum into a reference spectrum matrix, a test spectrum matrix, and spectrum region information; Cross-correlation analysis is performed based on the reference spectrum matrix and the test spectrum matrix to obtain the pixel displacement and the maximum cross-correlation number. Based on the spectral region information, the chemical shift exclusion region is determined, and the spectral type is... 1 H- 1 When generating the H spectrum, a diagonal exclusion region is generated, and an effective region mask is generated based on the chemical shift exclusion region and the diagonal exclusion region. Based on the effective region mask, a common peak region is determined from the reference spectrum matrix and the test spectrum matrix, and the peak region correlation coefficient and peak region root mean square deviation are obtained based on the common peak region. Structural similarity analysis is performed based on the reference spectrum matrix and the test spectrum matrix to obtain a structural similarity index; A difference map is generated based on the reference spectrum matrix and the test spectrum matrix; A comprehensive consistency score is obtained based on the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index.

[0008] Further, a reference NMR two-dimensional spectrum and a test NMR two-dimensional spectrum are acquired, and the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum are converted into a reference spectrum matrix, a test spectrum matrix, and spectral region information, including: Read the spectral intensity data, spectral parameters, and spectral type from the UCSF format nuclear magnetic resonance two-dimensional spectrum data file. The spectral parameters include spectral width, sampling frequency, and nuclear magnetic resonance frequency. Generate a reference spectrum matrix and a test spectrum matrix based on the spectrum intensity data; Spectral region information is generated based on spectral parameters. The spectral region information includes the chemical shift range in two dimensions of the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum.

[0009] Further, cross-correlation analysis is performed based on the reference spectral matrix and the test spectral matrix to obtain the pixel shift and the maximum cross-correlation coefficient, including: The reference spectrum matrix and the test spectrum matrix are normalized respectively to obtain the normalized reference spectrum matrix and the normalized test spectrum matrix; Perform fast Fourier transforms on the normalized reference spectrum matrix and the normalized test spectrum matrix respectively to obtain two frequency domain matrices; Multiplying one frequency domain matrix by the conjugate matrix of another frequency domain matrix yields the frequency domain correlation matrix; Perform a fast inverse Fourier transform on the frequency domain correlation matrix to obtain the cross-correlation spectrum; The pixel displacement and maximum cross-correlation coefficient are obtained from the cross-correlation spectrum.

[0010] Furthermore, the pixel displacement and maximum cross-correlation coefficient are obtained based on the cross-correlation spectrum, including: Take the absolute value of the cross-correlation spectrum to determine the location of the maximum absolute value; The pixel displacement is obtained by determining the offset of the position with the maximum absolute value relative to the center position of the cross-correlation spectrum; The maximum cross-correlation coefficient is obtained by determining the cross-correlation value corresponding to the position with the largest absolute value.

[0011] Furthermore, based on the spectral region information, the chemical shift exclusion region is determined, and in the spectral type is... 1 H- 1 During H-spectrum analysis, a diagonal exclusion region is generated. Based on the chemical shift exclusion region and the diagonal exclusion region, an effective region mask is generated, including: The pixel region corresponding to the preset chemical shift region is determined based on the spectral region information, and the pixel region corresponding to the preset chemical shift region is determined as the chemical shift exclusion region; the preset chemical shift region includes the water signal region, and the chemical shift range of the water signal region is 4.6 to 4.8 ppm; In the spectrum type 1 H- 1 When processing the H-spectrum, the diagonal region is determined based on the pixel coordinates, and this diagonal region is designated as the diagonal exclusion region. The exclusion bandwidth of the diagonal region is 3% of the shorter side dimension of the spectrum. An effective region mask is generated based on the chemical shift exclusion region and the diagonal exclusion region.

[0012] Further, based on the effective region mask, a common peak region is determined from the reference spectrum matrix and the test spectrum matrix, and the peak region correlation coefficient and peak region root mean square deviation are obtained based on the common peak region, including: Within the area defined by the effective region mask, pixels above the peak region percentile threshold in the reference spectrum matrix and the test spectrum matrix are selected respectively to obtain the reference peak region and the test peak region. The common peak region is obtained by the intersection of the reference peak region and the test peak region; Extract the pixel intensity sequence of the reference spectrum matrix and the pixel intensity sequence of the test spectrum matrix within the common peak region; The peak region correlation coefficient and peak region root mean square deviation are calculated based on the two pixel intensity sequences.

[0013] Further, structural similarity analysis is performed based on the reference spectral matrix and the test spectral matrix to obtain a structural similarity index, including: A sliding window method is used to obtain local window data of the reference spectrum matrix and the test spectrum matrix; Calculate brightness similarity, contrast similarity, and structural similarity based on local window data; The structural similarity index is obtained based on brightness similarity, contrast similarity, and structural similarity.

[0014] Further, generating a difference map based on the reference spectrum matrix and the test spectrum matrix includes: Calculate the pixel-by-pixel signed difference between the test spectrogram matrix and the reference spectrogram matrix; A difference map is generated based on the signed differences pixel by pixel.

[0015] Furthermore, based on the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index, a comprehensive consistency score is obtained, including: A weighted average was calculated for the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index; The weighted average result is used as the overall consistency score.

[0016] A nuclear magnetic resonance spectrum based on direct image comparison Figure 1 Consistency evaluation system, including: Memory, used to store computer programs; A processor is used to implement the steps of the above-described method when executing the above-described computer program.

[0017] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: First, this invention directly compares the spectral matrix data without going through the peak picking step, thus preserving all signal distribution information in the spectrum. This avoids the errors and subjectivity of peak picking algorithms and has a higher information utilization rate compared to peak list-based analysis methods.

[0018] Second, this invention employs Fast Fourier Transform to accelerate cross-correlation analysis, reducing the computational complexity from the traditional O(n)... 2 The computational efficiency of displacement detection is reduced to O(nlogn), which greatly improves the computational efficiency of displacement detection and is suitable for batch processing of large-scale spectral data.

[0019] Third, the present invention uses peak region masking technology to select only the regions with signals in the spectrum for correlation calculation, effectively eliminating the interference of noise regions and making the correlation index more objective and reliable.

[0020] Fourth, this invention introduces a structural similarity index, which comprehensively considers the brightness, contrast and structure of the spectrum, and can better reflect the subjective judgment of the human eye on the similarity of the spectrum than the simple correlation coefficient.

[0021] Fifth, this invention supports automatic exclusion of water signals and diagonal regions. Users can also flexibly specify any ppm region (chemical shift region) for exclusion, adapting to different types of spectra and different analytical needs.

[0022] Sixth, this invention automates the entire process through software, requiring no manual intervention, and boasts high computational efficiency and accuracy. Attached Figure Description

[0023] Figure 1 This refers to the nuclear magnetic resonance spectrum based on direct image comparison in this embodiment of the invention. Figure 1 Flowchart of consistency evaluation method; Figure 2A As described in the embodiments of the present invention 1 H- 1 H NOESY spectrum overlay comparison diagram; Figure 2B As described in the embodiments of the present invention 1 H- 1 H NOESY peak region mask diagram; Figure 2C As described in the embodiments of the present invention 1 H- 1 H NOESY cross-correlation analysis plot; Figure 2D As described in the embodiments of the present invention 1 H- 1 H NOESY Consistency Index Bar Chart; Figure 3A As described in the embodiments of the present invention 1 H- 15 Comparison results of N HSQC spectra; Figure 3B As described in the embodiments of the present invention 1 H- 13 Comparison results of C HSQC spectra; Figure 3C As described in the embodiments of the present invention 1 H- 1 Comparison results of H TOCSY spectra. Detailed Implementation

[0024] To make the above features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings.

[0025] This embodiment discloses a nuclear magnetic resonance spectroscopy method based on direct image comparison. Figure 1 Consistency evaluation methods, such as Figure 1 The process is shown below. This example describes the process for smegglutinin samples from two batches. 1 H- 1 H NOESY, 1 H- 15 N HSQC, 1 H- 13 CHSQC and 1 H- 1 H TOCSY spectra were compared to identify structural differences between the two batches of semaglutide samples.

[0026] Step 1: Data reading.

[0027] The UCSF files for the reference and test spectra are passed to the program. The program uses the sparky module of the nmrglue library to read the UCSF files, parse them to obtain the two-dimensional numerical matrices data1 and data2 corresponding to the reference and test spectra, as well as a parameter dictionary containing parameters such as spectral width, sampling frequency, and NMR frequency. The program extracts the NMR frequency and spectral width information in the first and second dimensions from the parameter dictionary, and calculates the ppm range of the reference and test spectra in both dimensions.

[0028] Step 2: Cross-correlation analysis.

[0029] Normalize data1 and data2 respectively to obtain normalized matrices A and B. Use Fast Fourier Transform (FFT) to transform A and B to the frequency domain and calculate the cross-correlation spectrum C = IFFT(FFT(A) × conj(FFT(B))), where conj represents the conjugate operation and IFFT represents the inverse Fast Fourier Transform. Find the maximum absolute value in the cross-correlation spectrum C, and determine the pixel displacement by the offset of the position of this maximum value relative to the center point of the cross-correlation spectrum. This maximum value is then used as the maximum cross-correlation coefficient. In this embodiment, the maximum cross-correlation coefficient of the two spectra is 0.999, indicating that the two spectra have good alignment at the pixel level.

[0030] Step 3: Preprocessing and mask generation.

[0031] The program determines a preset ppm region to be excluded based on the ppm range corresponding to the spectrum, and excludes the pixel regions corresponding to the preset ppm regions from the valid pixel regions. The preset ppm regions include water signal regions; in this embodiment, the water signal region is 4.6 to 4.8 ppm. For 1 H- 1 H NOESY spectrum and 1 H- 1 The H TOCSY spectrum is used to automatically calculate and exclude diagonal regions based on pixel coordinates. The exclusion bandwidth for diagonal regions is set to 3% of the shorter side size of the spectrum. The program then generates a Boolean mask based on the excluded pixel regions to identify the valid pixel areas.

[0032] Step 4: Peak region analysis.

[0033] The program selects pixels above a peak region percentile threshold as peak regions in both the normalized reference and test spectrogram matrices based on an effective region mask. The default peak region percentile threshold is 85 percentile, which can be adjusted according to spectrogram quality. In this embodiment, the program uses the 85 percentile as the threshold and marks pixels above the threshold as peak regions in the normalized spectrogram matrix. The program performs an intersection operation on the peak region masks of the reference and test spectra to obtain a common peak region mask, and calculates the Pearson correlation coefficient within the common peak region to obtain the peak region correlation coefficient. In this embodiment, the common peak region correlation coefficient is 0.987. The program also calculates the correlation coefficient of all signals within the preprocessed effective mask region; in this embodiment, this correlation coefficient is 0.980. Simultaneously, the program calculates the root mean square deviation (RMSD) of the peak region within the common peak region; in this embodiment, the peak region RMSD is 0.000124.

[0034] Step 5: Similarity assessment.

[0035] The program calculates the structural similarity index of the complete matrices of two spectra. The structural similarity index is calculated using a sliding window method, comprehensively considering the similarity across three dimensions: brightness, contrast, and structure. In this embodiment, an 11×11 Gaussian window with a standard deviation of 1.5 is used, and the brightness and contrast constants are set to their default values. In this embodiment, the structural similarity index value is 0.996.

[0036] Step 6: Visualize the differences.

[0037] The program calculates the pixel-by-pixel signed difference between the test spectrum matrix and the reference spectrum matrix, generates a pixel-level difference map, and calculates the average and maximum difference values ​​based on the absolute values ​​of the pixel-by-pixel differences. The difference map uses a blue-white-red band mapping, where white represents no difference, red indicates that the intensity of the test spectrum is higher than that of the reference spectrum, and blue indicates that the intensity of the test spectrum is lower than that of the reference spectrum.

[0038] Step 7: Overall scoring.

[0039] The program combines the correlation coefficient of peak regions, structural similarity index, and maximum cross-correlation coefficient to calculate a weighted average to obtain a comprehensive consistency score. In this embodiment, the comprehensive consistency score is 0.994, indicating that the two spectra have extremely high consistency.

[0040] See the output results Figures 2A to 2D In summary, the two batches of smegglutinin exhibited extremely high structural similarity.

[0041] Analyze using the same steps 1 H- 15 N HSQC, 1 H- 13 C HSQC and 1 H- 1 The H TOCSY spectrum, and the summary bar chart are shown below. Figures 3A to 3C The results showed that all correlation coefficients were greater than 0.95, with comprehensive scores of 0.968, 0.997, and 0.995, indicating a very high degree of consistency among the spectra. Combined with the results from NOESY, the two batches of smegglutinin ultimately demonstrated extremely high structural consistency.

[0042] The embodiments described above are not intended to limit the present invention. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A method for evaluating the consistency of nuclear magnetic resonance spectra based on direct image comparison, characterized in that, include: Obtain a reference NMR two-dimensional spectrum and a test NMR two-dimensional spectrum, and convert the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum into a reference spectrum matrix, a test spectrum matrix, and spectrum region information; Cross-correlation analysis is performed based on the reference spectrum matrix and the test spectrum matrix to obtain the pixel displacement and the maximum cross-correlation number. Based on the spectral region information, the chemical shift exclusion region is determined, and the spectral type is... 1 H- 1 When generating the H spectrum, a diagonal exclusion region is generated, and an effective region mask is generated based on the chemical shift exclusion region and the diagonal exclusion region. Based on the effective region mask, a common peak region is determined from the reference spectrum matrix and the test spectrum matrix, and the peak region correlation coefficient and peak region root mean square deviation are obtained based on the common peak region. Structural similarity analysis is performed based on the reference spectrum matrix and the test spectrum matrix to obtain a structural similarity index; A difference map is generated based on the reference spectrum matrix and the test spectrum matrix; A comprehensive consistency score is obtained based on the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index.

2. The method as described in claim 1, characterized in that, Acquire a reference NMR two-dimensional spectrum and a test NMR two-dimensional spectrum, and convert the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum into a reference spectrum matrix, a test spectrum matrix, and spectral region information, including: Read the spectral intensity data, spectral parameters, and spectral type from the UCSF format nuclear magnetic resonance two-dimensional spectrum data file. The spectral parameters include spectral width, sampling frequency, and nuclear magnetic resonance frequency. Generate a reference spectrum matrix and a test spectrum matrix based on the spectrum intensity data; Spectral region information is generated based on spectral parameters. The spectral region information includes the chemical shift range in two dimensions of the reference NMR two-dimensional spectrum and the test NMR two-dimensional spectrum.

3. The method as described in claim 1, characterized in that, Cross-correlation analysis is performed based on the reference spectral matrix and the test spectral matrix to obtain pixel shifts and the maximum cross-correlation coefficient, including: The reference spectrum matrix and the test spectrum matrix are normalized respectively to obtain the normalized reference spectrum matrix and the normalized test spectrum matrix; Perform fast Fourier transforms on the normalized reference spectrum matrix and the normalized test spectrum matrix respectively to obtain two frequency domain matrices; Multiplying one frequency domain matrix by the conjugate matrix of another frequency domain matrix yields the frequency domain correlation matrix; Perform a fast inverse Fourier transform on the frequency domain correlation matrix to obtain the cross-correlation spectrum; The pixel displacement and maximum cross-correlation coefficient are obtained from the cross-correlation spectrum.

4. The method as described in claim 3, characterized in that, The pixel displacement and maximum cross-correlation coefficient are obtained from the cross-correlation spectrum, including: Take the absolute value of the cross-correlation spectrum to determine the location of the maximum absolute value; The pixel displacement is obtained by determining the offset of the position with the maximum absolute value relative to the center position of the cross-correlation spectrum; The maximum cross-correlation coefficient is obtained by determining the cross-correlation value corresponding to the position with the largest absolute value.

5. The method as described in claim 1, characterized in that, The chemical shift exclusion region is determined based on the spectral region information, and the spectral type is... 1 H- 1 During H-spectrum analysis, a diagonal exclusion region is generated. Based on the chemical shift exclusion region and the diagonal exclusion region, an effective region mask is generated, including: The pixel region corresponding to the preset chemical shift region is determined based on the spectral region information, and the pixel region corresponding to the preset chemical shift region is determined as the chemical shift exclusion region; the preset chemical shift region includes the water signal region, and the chemical shift range of the water signal region is 4.6 to 4.8 ppm; In the spectrum type 1 H- 1 When processing the H-spectrum, the diagonal region is determined based on the pixel coordinates, and this diagonal region is designated as the diagonal exclusion region. The exclusion bandwidth of the diagonal region is 3% of the shorter side dimension of the spectrum. An effective region mask is generated based on the chemical shift exclusion region and the diagonal exclusion region.

6. The method as described in claim 1, characterized in that, Based on the effective region mask, common peak regions are determined from the reference spectrum matrix and the test spectrum matrix, and peak region correlation coefficients and root mean square deviations are obtained based on the common peak regions, including: Within the area defined by the effective region mask, pixels above the peak region percentile threshold in the reference spectrum matrix and the test spectrum matrix are selected respectively to obtain the reference peak region and the test peak region. The common peak region is obtained by the intersection of the reference peak region and the test peak region; Extract the pixel intensity sequence of the reference spectrum matrix and the pixel intensity sequence of the test spectrum matrix within the common peak region; The peak region correlation coefficient and peak region root mean square deviation are calculated based on the two pixel intensity sequences.

7. The method as described in claim 1, characterized in that, Structural similarity analysis is performed based on the reference spectral matrix and the test spectral matrix to obtain a structural similarity index, including: A sliding window method is used to obtain local window data of the reference spectrum matrix and the test spectrum matrix; Calculate brightness similarity, contrast similarity, and structural similarity based on local window data; The structural similarity index is obtained based on brightness similarity, contrast similarity, and structural similarity.

8. The method as described in claim 1, characterized in that, Generating a difference map based on the reference spectrum matrix and the test spectrum matrix includes: Calculate the pixel-by-pixel signed difference between the test spectrogram matrix and the reference spectrogram matrix; A difference map is generated based on the signed differences pixel by pixel.

9. The method as described in claim 1, characterized in that, Based on the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index, a comprehensive consistency score is obtained, including: A weighted average was calculated for the maximum cross-correlation coefficient, the peak region correlation coefficient, and the structural similarity index; The weighted average result is used as the overall consistency score.

10. A nuclear magnetic resonance spectrum consistency evaluation system based on direct image comparison, characterized in that, include: Memory, used to store computer programs; A processor for executing the above-described computer program to implement the steps of the method according to any one of claims 1-9.