Compound structure identification database construction method, system, equipment and medium
Through deep learning models and transfer learning technology, combined with the molecular structure and retention time data of compounds, a more accurate compound structure identification database was constructed, which solved the problem of low database accuracy in existing technologies and improved the accuracy and efficiency of compound identification.
Patent Information
- Application Number
- CN202510744807.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-10-17
Smart Images

Figure CN120808979A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of database establishment, in particular to a compound structure identification database construction method, system, device and medium. BACKGROUND
[0002] Retention time (RT) is a key parameter in chromatographic analysis, which refers to the time from sample injection to the target compound being detected by the detector, i.e. the residence time of the compound in the chromatographic column. As an important auxiliary parameter for compound identification, liquid chromatography retention time can provide additional orthogonal information, thereby improving the accuracy and reliability of the analysis. Therefore, it can be seen that it is of great significance to construct a database with retention time. However, due to the complexity of small molecule compounds, the diversity of chromatographic conditions and the limited experimental data, the traditional retention time prediction model still has great limitations in generalization ability and accuracy.
[0003] In recent years, the development of artificial intelligence technology has provided powerful data processing capabilities for scientific research, especially in large-scale text analysis and information extraction. In metabolomics research, liquid chromatography-mass spectrometry (LC-MS) technology is the core tool for compound identification, and the construction and improvement of the database directly affect the accuracy and efficiency of identification. Traditional compound information extraction methods, such as ChemDataExtractor, can automatically parse literature data, but still have certain limitations in compound screening and data cleaning, which may lead to the deletion of compound names or the failure to completely remove incorrect data, which may limit the performance of the final constructed database.
[0004] In summary, the compound structure identification database constructed by the existing method has low accuracy, which limits the performance of the database. SUMMARY
[0005] The present application aims to provide a compound structure identification database construction method, system, device and medium, which can improve the data in the compound structure identification database and improve the accuracy of the compound structure identification database, thereby improving the performance of the database.
[0006] In a first aspect, the embodiments of the present application provide a compound structure identification database construction method, which comprises:
[0007] obtaining a model training data set, a model verification data set, a migration training data set and a migration verification data set containing the molecular structure and retention time of the compound;
[0008] inputting the model training dataset into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and verifying the plurality of trained retention time prediction models by using a model verification dataset to select an optimal retention time prediction model;
[0009] inputting the transfer training dataset and the transfer verification dataset into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model;
[0010] inputting compound structure data to be predicted into the target retention time prediction model for prediction to obtain a predicted retention time;
[0011] constructing a compound structure identification database according to the predicted retention time.
[0012] Compared with the prior art, the first aspect of the present application has the following beneficial effects:
[0013] The method comprises the following steps: obtaining a model training dataset, a model verification dataset, a transfer training dataset and a transfer verification dataset containing molecular structures and retention times of compounds; inputting the model training dataset into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and verifying the plurality of trained retention time prediction models by using a model verification dataset to select an optimal retention time prediction model; inputting the transfer training dataset and the transfer verification dataset into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model; inputting compound structure data to be predicted into the target retention time prediction model for prediction to obtain a predicted retention time; and constructing a compound structure identification database according to the predicted retention time. In this way, by selecting an optimal retention time prediction model from a plurality of retention time prediction models, a more accurate compound retention time can be predicted, and the prediction accuracy of the model is further improved through transfer learning. Finally, according to the predicted retention time, a compound structure identification database is constructed, which can improve the data in the compound structure identification database and improve the accuracy of the compound structure identification database, thereby improving the performance of the database.
[0014] In some embodiments, the inputting the model training dataset into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models comprises:
[0015] preprocessing data in the model training dataset to obtain an atomic feature matrix and an atomic adjacency matrix;
[0016] a plurality of retention time prediction models are constructed based on a graph convolution network, a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, a long short-term memory network structure and a gated recurrent unit, respectively;
[0017] inputting the atomic feature matrix and the atomic adjacency matrix into the plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models.
[0018] In some embodiments, the pre-processing of the data in the model training dataset to obtain an atomic feature matrix and an atomic adjacency matrix comprises:
[0019] obtaining a SMILES string or an InChI string corresponding to a compound in the model training dataset, the SMILES string or the InChI string being used to describe the molecular structure of the compound;
[0020] converting the SMILES string or the InChI string into a graph structure of the compound molecule;
[0021] based on the graph structure of the compound molecule, counting the number of atoms of each compound molecule;
[0022] based on the number of atoms and the graph structure of the compound molecule, constructing an atomic feature matrix containing atomic features and an atomic adjacency matrix containing the connection relationship between atoms, wherein the atomic features include the number of hydrogen bonds, atomic mass, hybridization state, whether in a ring, aromaticity, whether a heteroatom, bond type, number of implicit valence electrons, number of explicit valence electrons, atomic charge, number of free radical electrons, and chirality marker.
[0023] In some embodiments, the transfer training dataset and the transfer validation dataset include a first transfer training dataset, a first transfer validation dataset, a second transfer training dataset, and a second transfer validation dataset, and the transfer learning of the optimal retention time prediction model to obtain a target retention time prediction model comprises:
[0024] performing first transfer learning of the optimal retention time prediction model using the first transfer training dataset and the first transfer validation dataset to obtain a retention time prediction model after transfer learning, wherein the first transfer training dataset and the first transfer validation dataset are small sample datasets;
[0025] performing second transfer learning of the retention time prediction model after transfer learning using the second transfer training dataset and the second transfer validation dataset to obtain a target retention time prediction model, wherein the second transfer training dataset and the second transfer validation dataset are datasets of tea and wine positive and negative ion modes.
[0026] In some embodiments, the inputting of the compound structure data to be predicted into the target retention time prediction model for prediction to obtain a predicted retention time further comprises:
[0027] obtain a positive and negative ion mass spectrum data file and a target literature containing compound names;
[0028] parse the positive and negative ion mass spectrum data file to obtain an initial compound structure identification database;
[0029] parse the target literature to obtain parsed text;
[0030] extract compound names in the parsed text using a large language model, and screen the extracted compound names to obtain screened compound names;
[0031] obtain an INCHIKEY corresponding to the screened compound names, and search the initial compound structure identification database for liquid chromatography and mass spectrometry data matching the INCHIKEY, set the liquid chromatography and mass spectrometry data of the matched compound to a confidence level of 1, and set the liquid chromatography and mass spectrometry data of the compound without a match to a confidence level of 2;
[0032] use the SMILES string or InChI string of the compound with a confidence level of 2 as the predicted compound structure data;
[0033] input the predicted compound structure data into the target retention time prediction model for prediction to obtain the predicted retention time corresponding to the compound with a confidence level of 2.
[0034] In some embodiments, the screening of the extracted compound names to obtain screened compound names comprises:
[0035] remove duplicate compound names in the extracted compound names to obtain de-duplicated compound names;
[0036] eliminate invalid compound names in the de-duplicated compound names to obtain remaining compound names;
[0037] remove synonymous compound names in the remaining compound names to obtain screened compound names.
[0038] In some embodiments, the construction of the compound structure identification database according to the predicted retention time comprises:
[0039] calculate the precursor ion mass-to-charge ratio according to the precursor ion type and the exact mass of the compound with a confidence level of 2, and generate secondary mass spectrometry data using a CFM-ID tool, wherein the CFM-ID tool is a tool for predicting small molecule mass spectrometry data;
[0040] Combine liquid chromatography and mass spectrometry data with a confidence level of 1 and liquid chromatography and mass spectrometry data containing predicted retention time, secondary mass spectrometry data, and theoretically calculated precursor ion mass-to-charge ratio with a confidence level of 2 to construct a compound structure identification database.
[0041] In a second aspect, the embodiments of the present application further provide a compound structure identification database construction system, the system comprising:
[0042] a data acquisition unit configured to acquire a model training data set, a model verification data set, a transfer training data set, and a transfer verification data set containing molecular structures and retention times of compounds;
[0043] a model selection unit configured to input the model training data set into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and to verify the plurality of trained retention time prediction models using the model verification data set to select an optimal retention time prediction model;
[0044] a transfer learning unit configured to input the transfer training data set and the transfer verification data set into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model;
[0045] a data prediction unit configured to input compound structure data to be predicted into the target retention time prediction model for prediction to obtain predicted retention time;
[0046] a database construction unit configured to construct a compound structure identification database according to the predicted retention time.
[0047] In a third aspect, the embodiments of the present application further provide an electronic device comprising at least one control processor and a memory in communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform a compound structure identification database construction method as described above.
[0048] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium storing computer executable instructions for causing a computer to perform a compound structure identification database construction method as described above.
[0049] It can be understood that the beneficial effects of the above-mentioned second to fourth aspects compared with the related art are the same as the beneficial effects of the above-mentioned first aspect compared with the related art, and reference can be made to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0050] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the following drawings in which:
[0051] Figure 1 is a flowchart of an embodiment of the method for constructing a compound structure identification database provided by the present application;
[0052] Figure 2 is a flowchart of the model training in the best embodiment of the method for constructing a compound structure identification database provided by the present application;
[0053] Figure 3 is a flowchart of the database construction in the best embodiment of the method for constructing a compound structure identification database provided by the present application;
[0054] Figure 4 is a structural schematic diagram of an embodiment of the system for constructing a compound structure identification database provided by the present application. DETAILED DESCRIPTION
[0055] Embodiments of the present application are described in detail below with reference to the accompanying drawings, in which the same or similar elements or elements having the same or similar functions are denoted by the same or similar reference numerals throughout. The embodiments described below are exemplary and are intended to explain the present application, and should not be understood as limiting the present application.
[0056] In the description of the present application, if there is a description to first, second, etc., it is only for the purpose of distinguishing technical features, and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of indicated technical features.
[0057] In the description of the present application, it should be understood that the orientation description, such as up, down, etc., indicates the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and should not be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore should not be understood as limiting the present application.
[0058] In the description of the present application, it should be noted that, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and the person skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0059] In recent years, the development of artificial intelligence technology has provided powerful data processing capabilities for scientific research, especially in large-scale text analysis and information extraction. In metabolomics research, liquid chromatography-mass spectrometry (LC-MS) technology is the core tool for compound identification, and the construction and improvement of the database directly affect the accuracy and efficiency of identification. Traditional compound information extraction methods, such as ChemDataExtractor, while being able to automatically parse literature data, still have certain limitations in compound screening and data cleaning, leading to the misdeletion of compound names or the failure to completely remove incorrect data, which may limit the performance of the final constructed database.
[0060] To solve the problem of low accuracy of the compound structure identification database constructed by the existing method and the limitation of the performance of the database, the present application provides a compound structure identification database construction method, system, device and medium.
[0061] Reference Figure 1 The compound structure identification database construction method provided by the embodiments of the present application provides a flowchart of the compound structure identification database construction method. The compound structure identification database construction method is applied to an electronic device, which can be a server or a mobile terminal, etc. As shown in Figure 1 The compound structure identification database construction method can include the following steps:
[0062] Step S100, obtaining a model training data set, a model verification data set, a migration training data set and a migration verification data set containing the molecular structure and retention time of the compound;
[0063] Step S200, inputting the model training data set into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and verifying the plurality of trained retention time prediction models using the model verification data set to select the optimal retention time prediction model;
[0064] Step S300, inputting the migration training data set and the migration verification data set into the optimal retention time prediction model for migration learning to obtain a target retention time prediction model;
[0065] Step S400, inputting the compound structure data to be predicted into the target retention time prediction model for prediction to obtain the predicted retention time;
[0066] Step S500, constructing a compound structure identification database according to the predicted retention time.
[0067] In the embodiment, the model training dataset, the model verification dataset, the transfer training dataset and the transfer verification dataset containing the molecular structure and the retention time of the compound are obtained; the model training dataset is input into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and the model verification dataset is used to verify the plurality of trained retention time prediction models to select an optimal retention time prediction model; the transfer training dataset and the transfer verification dataset are input into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model; the compound structure data to be predicted is input into the target retention time prediction model for prediction to obtain a predicted retention time; and the compound structure identification database is constructed according to the predicted retention time. In this way, the optimal retention time prediction model is selected from the plurality of retention time prediction models, the more accurate compound retention time can be predicted, the prediction accuracy of the model is further improved through transfer learning, the data in the compound structure identification database is improved according to the predicted retention time, the accuracy of the compound structure identification database is improved, and the performance of the database is improved.
[0068] The above model training dataset, model verification dataset, transfer training dataset and transfer verification dataset are all datasets containing the molecular structure and the corresponding retention time of the compound. The retention time prediction model is trained through the molecular structure and the retention time of the compound, so that the retention time prediction model can predict the retention time of the compound according to the molecular structure of the compound.
[0069] In some embodiments, the model training dataset is input into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, including:
[0070] The data in the model training dataset is preprocessed to obtain an atomic feature matrix and an atomic adjacency matrix;
[0071] A plurality of retention time prediction models are constructed based on a graph convolution network, a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, a long short-term memory network structure and a gated recurrent unit, respectively;
[0072] The atomic feature matrix and the atomic adjacency matrix are input into the plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models.
[0073] In the embodiment, the data in the model training data set is preprocessed to obtain an atomic feature matrix and an atomic adjacency matrix; a plurality of retention time prediction models are constructed based on a graph convolution network, a one-dimensional convolution neural network, a two-dimensional convolution neural network, a long short-term memory network structure and a gated recurrent unit respectively; and the plurality of retention time prediction models are trained based on the atomic feature matrix and the atomic adjacency matrix to obtain a plurality of trained retention time prediction models. In this way, since each network model focuses on different feature details, the prediction results are different, and therefore different retention time prediction models are constructed by using a plurality of network structures, thereby laying a good data foundation for subsequent selection of an optimal retention time prediction model to predict the retention time.
[0074] The above training of the plurality of retention time prediction models based on the atomic feature matrix and the atomic adjacency matrix, wherein some of the retention time prediction models only need to be trained based on the atomic feature matrix, and some of the retention time prediction models need to be trained based on the atomic feature matrix and the atomic adjacency matrix together, and the specific training process can be changed according to the specific retention time prediction model, and the embodiment is not limited in detail.
[0075] In some embodiments, the data in the model training data set is preprocessed to obtain an atomic feature matrix and an atomic adjacency matrix, including:
[0076] The SMILES string or InChI string corresponding to the compound in the model training data set is obtained to describe the molecular structure of the compound.
[0077] The SMILES string or InChI string is converted into a graph structure of the compound molecule.
[0078] Based on the graph structure of the compound molecule, the number of atoms of each compound molecule is counted.
[0079] According to the number of atoms and the graph structure of the compound molecule, an atomic feature matrix containing atomic features and an atomic adjacency matrix containing the connection relationship between atoms are constructed, wherein the atomic features include the number of hydrogen bonds, atomic mass, hybridization state, whether in a ring, aromaticity, whether a heteroatom, bond type, number of implicit valence electrons, number of explicit valence electrons, atomic charge, number of free radical electrons, and chirality marker.
[0080] In the embodiment, the SMILES string or InChI string corresponding to the compound in the model training data set is obtained to describe the molecular structure of the compound; the SMILES string or InChI string is converted into a graph structure of the compound molecule; the number of atoms of each compound molecule is counted based on the graph structure of the compound molecule; and an atomic feature matrix containing atomic features and an atomic adjacency matrix containing the connection relationship between atoms are constructed according to the number of atoms and the graph structure of the compound molecule, wherein the atomic features include the number of hydrogen bonds, atomic mass, hybridization state, whether in a ring, aromaticity, whether a heteroatom, bond type, number of implicit valence electrons, number of explicit valence electrons, atomic charge, number of free radical electrons, and chirality marker. In this way, by converting the SMILES string or InChI string into the graph structure of the compound molecule, and then constructing the feature matrix and the adjacency matrix, the retention time prediction model trained later can better learn the complex topological relationship between atoms, adapt to the complex nonlinear relationship inside the molecule, and lay a good data foundation for obtaining a prediction accurate retention time prediction model later.
[0081] The above constructing the atomic feature matrix containing atomic features and the atomic adjacency matrix containing the connection relationship between atoms according to the number of atoms and the graph structure of the compound molecule can be constructing the atomic feature matrix containing atomic features, and using the number of atoms as the index of the matrix to construct the atomic feature matrix and the atomic adjacency matrix.
[0082] In some embodiments, the migration training data set and the migration validation data set include a first migration training data set, a first migration validation data set, a second migration training data set, and a second migration validation data set, and the migration training data set and the migration validation data set are used to perform migration learning on the optimal retention time prediction model to obtain a target retention time prediction model, including:
[0083] The first migration training data set and the first migration validation data set are used to perform first migration learning on the optimal retention time prediction model to obtain a retention time prediction model after migration learning, wherein the first migration training data set and the first migration validation data set are small sample data sets.
[0084] The second migration training data set and the second migration validation data set are used to perform second migration learning on the retention time prediction model after migration learning to obtain a target retention time prediction model, wherein the second migration training data set and the second migration validation data set are data sets of tea and wine positive and negative ion modes.
[0085] In the embodiment, the optimal retention time prediction model is subjected to first transfer learning by using a first transfer training dataset and a first transfer validation dataset, to obtain a retention time prediction model after transfer learning, wherein the first transfer training dataset and the first transfer validation dataset are small sample datasets; the retention time prediction model after transfer learning is subjected to second transfer learning by using a second transfer training dataset and a second transfer validation dataset, to obtain a target retention time prediction model, wherein the second transfer training dataset and the second transfer validation dataset are datasets of tea and wine positive and negative ion modes. In this way, the target retention time prediction model obtained through twice transfer learning can predict accurate results, and the accuracy of compound time prediction is improved.
[0086] In some embodiments, the compound structure data to be predicted is input into the target retention time prediction model for prediction to obtain a predicted retention time, and the method further comprises:
[0087] Obtaining positive and negative ion mass spectrum data files and target literature containing compound names;
[0088] Pars ing the positive and negative ion mass spectrum data files to obtain an initial compound structure identification database;
[0089] Pars ing the target literature to obtain parsed text;
[0090] Extracting the compound names in the parsed text by using a large language model, and screening the extracted compound names to obtain screened compound names;
[0091] Obtaining INCHIKEY corresponding to the screened compound names, and searching the initial compound structure identification database for liquid chromatography and mass spectrometry data matching the INCHIKEY, setting the liquid chromatography and mass spectrometry data of the matched compounds to a confidence level of 1, and setting the liquid chromatography and mass spectrometry data of the compounds without matching and the corresponding positions to a confidence level of 2;
[0092] The SMILES string or InChI string of the compound with a confidence level of 2 is used as the compound structure data to be predicted;
[0093] The compound structure data to be predicted is input into the target retention time prediction model for prediction to obtain a predicted retention time corresponding to the compound with a confidence level of 2.
[0094] In the embodiment, the INCHIKEY corresponding to the screened compound name is obtained, and the liquid chromatography and mass spectrometry data matched with the INCHIKEY in the initialized compound structure identification database is searched, the liquid chromatography and mass spectrometry data of the compound matched successfully is set as a confidence level 1, and the compound without matching success and the liquid chromatography and mass spectrometry data position corresponding thereto are set as a confidence level 2; the SMILES string or InChI string of the compound with the confidence level 2 is taken as the to-be-predicted compound structure data; and the to-be-predicted compound structure data is input into the target retention time prediction model for prediction to obtain the predicted retention time corresponding to the compound with the confidence level 2. In this way, the liquid chromatography and mass spectrometry data matched with the screened compound name in the initialized compound structure identification database is searched first, only the compound without matching (i.e. the compound with the confidence level 2) needs to predict the retention time, which can reduce the time cost of the construction of the compound structure identification database and better perfect the data in the compound structure identification database.
[0095] The target retention time prediction model can be a positive ion mode retention time prediction model or a negative ion mode retention time prediction model. Because the compound has positive and negative ion mode data, when the positive ion mode data of the compound is predicted, the positive ion mode retention time prediction model is used, and when the negative ion mode data of the compound is predicted, the negative ion mode retention time prediction model is used.
[0096] In some embodiments, the extracted compound names are screened to obtain screened compound names, including:
[0097] The repeated compound names in the extracted compound names are removed to obtain de-duplicated compound names;
[0098] The invalid compound names in the de-duplicated compound names are removed to obtain remaining compound names;
[0099] The synonymous compound names in the remaining compound names are removed to obtain the screened compound names.
[0100] In the embodiment, the repeated compound names in the extracted compound names are removed to obtain de-duplicated compound names, the invalid compound names in the de-duplicated compound names are removed to obtain remaining compound names, and the synonymous compound names in the remaining compound names are removed to obtain the screened compound names. In this way, the compound names are de-duplicated, which can improve the accuracy of the compound structure identification database and improve the performance of the database.
[0101] In some embodiments, the compound structure identification database is constructed according to the predicted retention time, including:
[0102] According to the precursor ion type corresponding to the compound with a confidence level of 2 and the accurate mass, the mass-to-charge ratio of the precursor ion is calculated, and the CFM-ID tool is used to generate the secondary mass spectrum data, wherein the CFM-ID tool is a tool for predicting small molecule mass spectrum data;
[0103] The liquid chromatography and mass spectrometry data with a confidence level of 1 and the liquid chromatography and mass spectrometry data with a confidence level of 2 containing the predicted retention time, the secondary mass spectrum data, and the theoretically calculated mass-to-charge ratio of the precursor ion are combined to construct a compound structure identification database.
[0104] In this embodiment, by combining the liquid chromatography and mass spectrometry data with a confidence level of 1 and the liquid chromatography and mass spectrometry data with a confidence level of 2 containing the predicted retention time, the secondary mass spectrum data, and the theoretically calculated mass-to-charge ratio of the precursor ion, a more perfect compound structure identification database can be obtained, and a more accurate compound structure identification database can be obtained.
[0105] For the convenience of those skilled in the art, a set of best embodiments is provided below:
[0106] In recent years, the rapid development of deep learning technology has brought important changes to the fields of chemical informatics and mass spectrometry. Among them, liquid chromatography retention time as an important auxiliary parameter for compound identification can provide additional orthogonal information, thereby improving the accuracy and reliability of the analysis. However, due to the complexity of small molecule compounds, the diversity of chromatographic conditions, and the limited nature of experimental data, traditional QSRR prediction models still have great limitations in generalization ability and accuracy. Therefore, introducing deep learning models to process molecular data and learning their structural features to improve prediction accuracy has become one of the research hotspots in recent years.
[0107] The development of artificial intelligence technology provides powerful data processing capabilities for scientific research, especially in large-scale text analysis and information extraction. In metabolomics research, LC-MS (liquid chromatography-mass spectrometry) technology is the core tool for compound identification, and the construction and improvement of the database directly affect the accuracy and efficiency of identification. Traditional compound information extraction methods, such as ChemDataExtractor, although can automatically parse literature data, still have certain limitations in compound screening and data cleaning, which may lead to the deletion of compound names or the failure to completely remove incorrect data, and these misjudgments may limit the performance of the final constructed database. Therefore, exploring more efficient data mining methods to optimize the LC-MS database construction process has become an important direction of research.
[0108] Therefore, in order to solve the problems of inaccurate retention time prediction and limited performance of data LC-MS database, the application of deep learning algorithms in compound retention time prediction is studied in this embodiment, covering graph neural network (GNN), convolutional neural network (CNN) and recurrent neural network (RNN), and the applicability of each is discussed according to its characteristics. Among them, GNN effectively learns the molecular graph structure information through the message passing mechanism, which is suitable for feature representation of chemical structure data; CNN extracts key features through local receptive field and weight sharing, which is suitable for processing fixed-length molecular descriptors; RNN can model sequence data and is suitable for learning time-related information.
[0109] In addition, transfer learning is a popular technique in the field of deep learning in recent years. It can improve the prediction performance of small sample datasets by transferring the knowledge of existing models when the target task data is limited. In this embodiment, the prediction effects of different deep learning models will be compared and analyzed through experiments, and the applicability of transfer learning on small sample datasets will be discussed, providing new ideas and methods for compound retention time prediction. The final prediction model obtained by training (i.e. the target retention time prediction model) lays a good data foundation for subsequent construction of compound structure identification database.
[0110] In this embodiment, ChatGPT and Kimi are used to extract compound names, and traditional ChemDataExtractor is used for comparative analysis to select a better tool and optimize the construction process of the food small molecule compound structure identification database. Finally, LC-MS compound structure identification databases specific to tea and wine are constructed, and mixed standard samples and actual samples are used for evaluation to verify the effectiveness of the database. The research results of this embodiment show the potential of large language models in domain knowledge extraction, laying a method foundation for future construction of more comprehensive and high-quality LC-MS compound structure identification databases. The technical solutions of this embodiment specifically include the following contents:
[0111] 1. Training data source and preprocessing.
[0112] 1.1 Training data source.
[0113] In this embodiment, seven datasets are used in total, including the SMRT dataset, the FEM_long and LIFE_old datasets from the PredRet database, and the tea LC-MS positive and negative ion datasets and the wine LC-MS positive and negative ion datasets. The detailed information of each dataset is as follows:
[0114] (1) The SMRT (Small Molecule Retention Time) dataset is a large public dataset published by the Siuzdak team, mainly used to support machine learning-based retention time prediction research. The dataset covers metabolites, natural products and drug-like small molecules, with a molecular weight range of 113.08 Da to 738.87 Da, covering a wide range of chemical diversity. All small molecule retention time data in the dataset are obtained using a unified chromatography method, and the detailed information is as follows:
[0115] Agilent 1100 / 1200 series HPLC system connected to Q-TOF mass spectrometer G6538A, using Zorbax Extend-C18 reversed-phase chromatographic column (2.1x50mm, 1.8μm). The mobile phase A is water + 0.1% formic acid, and the mobile phase B is acetonitrile + 0.1% formic acid, with a gradient elution program of 5% B for 3 min, 50% B linearly increased in 2 min, 85% B linearly increased in 15 min, and kept at 85% B for 3 min, with a flow rate of 100μL·min -1 . All analyses were performed in positive and negative ion modes.
[0116] In this embodiment, 70182 data were selected from the dataset to construct the pre-trained model.
[0117] (2) The PredRet (Predicted Retention Time) database is an experimental dataset containing small molecule retention time, where different datasets are derived from different chromatography methods and generated by independent laboratories. It is used to evaluate the migration performance of machine learning models in different chromatography systems, especially the generalization ability of the model when migrating from one chromatography system (such as the SMRT dataset) to another.
[0118] In this embodiment, the FEM_long and LIFE_old datasets are selected to verify the migration ability of the pre-trained model, and the chromatographic information of the two is as follows:
[0119] FEM_long uses Waters ACQUITY UPLC HSS T3 C18 chromatographic column, mobile phase A is water containing 0.1% formic acid, and mobile phase B is methanol containing 0.1% formic acid.
[0120] LIFE_old used Waters ACQUITY UPLC BEH C18 column, mobile phase A was 0.1% formic acid in water, mobile phase B was 0.1% formic acid in acetonitrile.
[0121] In this example, 412 and 193 data from FEM_long and LIFE_old data sets were selected for small sample data migration test, respectively.
[0122] (3) The chromatographic conditions of the tea and wine positive and negative ion data sets of this example are as follows:
[0123] The tea non-targeted metabolomics positive and negative ion mode data were collected by ExionLC UPLC system combined with quadrupole time-of-flight mass spectrometer (TripleTOF 5600, AB SCIEX, USA). Kinetex F5 column (100mm×2.1mm, particle size 2.6μm, Phenomenex, USA) was used, and the column temperature was 30℃. The mobile phase A was 0.1% formic acid in water, and the mobile phase B was acetonitrile. The flow rate was 0.3mL·min -1 . The gradient elution conditions were as follows: 0-0.5min, 5% B; 0.5-3min, 5%-40% B; 3-9min, 40%-90% B; 9-12min, 95% B; 12-12.1min, 95%-5% B; 12.1-15min, 5% B. The injection volume was 5μL.
[0124] The wine non-targeted metabolomics positive and negative ion mode data were collected by ExionLC UPLC system combined with quadrupole time-of-flight mass spectrometer (TripleTOF 5600, AB SCIEX, USA). Kinetex F5 column (100mm×2.1mm, particle size 2.6μm, Phenomenex, USA) was used, and the column temperature was 40℃. The mobile phase A was 5mM ammonium acetate and 0.1% formic acid, and the mobile phase B was prepared by adding 5mM ammonium acetate and 0.1% acetic acid in methanol. The gradient elution program was as follows: 0.0-1.0min (5% B, flow rate was 0.40mL·min -1 ), 1.0-11min (5%-100% B, flow rate was 0.55mL·min -1 ), 11-12min (100% B, flow rate was 0.60mL·min -1 ), 12-12.1min (100%-5% B, flow rate was 0.40mL·min -1 ), 12.1-14min (5% B, flow rate was 0.40mL·min -1 ). The injection volume was 2μL.
[0125] The tea positive and negative ion data selected in this embodiment are 527 and 210, respectively, and the grape wine positive and negative ion data are 177 and 230, respectively. The four data sets are used for small sample positive and negative ion data migration test.
[0126] 1.2 Training data preprocessing.
[0127] After loading the data using the pandas library of Python, first read the SMILES or InChI string and its corresponding retention time, and unify the unit of retention time into seconds (s) to provide higher time precision, retain more detailed information, and reduce rounding errors, which helps to improve the prediction accuracy of the model. Then use the Chem.MolFromSmiles or Chem.MolFromInchi function in the rdkit library to convert the SMILES or InChI string into the graph structure of the molecule. Next, the code function is used to count the number of atoms in each molecule, and the adjacency matrix (i.e. atom adjacency matrix) and feature matrix (i.e. atom feature matrix) are further constructed according to the number of atoms and the graph structure. The adjacency matrix is mainly used for graph neural network (GNN), which represents the connection relationship between atoms in the molecule; while the feature matrix contains multiple atomic features, which may directly or indirectly affect the retention time of the compound. The atomic features in the feature matrix include the following 12 items, as shown in Table 1.
[0128] Table 1 Atomic features that directly or indirectly affect the retention time of the compound
[0129]
[0130]
[0131] All features of this embodiment are normalized to ensure that they are in the same scale, preventing some feature values from being too large or too small to adversely affect model training. Through this data preprocessing step, the retention time prediction model can effectively capture the complex nonlinear relationship in the molecular structure, thereby improving the prediction accuracy of the retention time.
[0132] 2. Pre-training model (i.e. retention time prediction model) construction.
[0133] The present embodiment constructs a pre-training model, aiming to select the most suitable deep learning algorithm (i.e., the optimal retention time prediction model). Using the SMRT database as a sample set, the retention time prediction models constructed by using the graph convolution network (GCN), one-dimensional convolutional neural network (1D-CNN), two-dimensional convolutional neural network (2D-CNN), long short-term memory network structure (LSTM), and gated recurrent unit (GRU) with self-designed architecture are trained respectively. All models use uniform hyperparameter settings, the ratio of training set and validation set (i.e., model training dataset and model validation dataset) is 8:2, the optimizer uses Adam, the initial learning rate is 0.01, the loss function is MAE, Batch_Size is set to 512, and the training times Epoch is 500. At the same time, in order to improve the effect and stability of model training, two important callback functions are introduced in the experiment: ReduceLROnPlat eau and ModelCheckpoin. ReduceLROnPlateau callback dynamically adjusts the learning rate according to the change of the validation set loss, and automatically reduces the learning rate when the validation loss does not improve within the set number of rounds (in the experiment, if it does not improve after 20 Epoch, the learning rate is reduced by half, and the minimum is not less than 1e -8 ), to avoid falling into local optimal solution in the training process and improve the fine training of the model. ModelCheckpoint callback monitors the validation set loss and saves the current model when it is minimized, ensuring that the final saved model is the one with the best performance, while reducing the storage space occupation. The combination of these two callbacks helps to improve the training stability and generalization ability of the model.
[0134] 3. Model evaluation index.
[0135] The present embodiment includes three main experiments: pre-training model construction, small sample set transfer learning verification, and transfer learning instance application. To evaluate the performance of the models in the above experiments, the following four indicators are used in the present embodiment: determination coefficient (R 2 ), mean square error (MRE), median relative error (MedRE), and mean absolute error (MAE). The calculation formulas of each index are as follows:
[0136]
[0137]
[0138] where y i represents the true value, is the predicted value, is the mean of the true value, and n is the sample size. Specifically, R 2The model fitting degree to the data is measured, and the value is closer to 1, indicating that the model fitting effect is better; MRE measures the relative error between the predicted value and the true value, and the smaller the value, the higher the accuracy; MedRE is the median of the relative error of all samples. It is more robust to extreme values and can provide more stable error evaluation; MAE measures the average absolute error between the predicted value and the true value, indicating the absolute size of the prediction error, and the smaller the value, the more accurate the model.
[0139] 4. Experimental software and hardware equipment.
[0140] In terms of software, Python programming language version 3.7.6 was used for data processing and analysis experiments. In order to facilitate code writing and debugging, the integrated development environment (IDE) selected Jupyter Notebook. In addition, the deep learning framework adopted TensorFlow, ensuring the efficiency of the model development and training process.
[0141] In terms of hardware, the computer used in this embodiment was purchased and assembled by the laboratory, and the main hardware configuration is as follows: CPU is Intel i5-12490F, memory is Kingston 16GBx2 dual-channel DDR4, GPU is NVIDIA GeForce RTX3090, and video memory size is 24GB. This hardware configuration provides sufficient computing power, ensuring the efficiency and stability of the deep learning model training process.
[0142] The performance of each model obtained by training for 500 epochs in this embodiment is shown in Table 2.
[0143] Table 2 is the performance of different algorithm models
[0144]
[0145]
[0146] The results show that GCN is superior to other algorithms in various performance indicators, the main reason being that it can effectively process the graph structure data of the compound, combining the dual information of the adjacency matrix and the feature matrix to learn the complex topological relationship between atoms. Compared with traditional CNN and RNN, GCN can better capture long-distance dependencies, generate global representations through layer-by-layer aggregation of information, and thus adapt to the complex nonlinear relationships within molecules. In addition, GCN successfully avoids overfitting through appropriate network architecture and regularization methods, improving the stability of training and the generalization ability of the model. These advantages make GCN perform outstandingly in the compound retention time prediction task. Therefore, the model trained by GCN is selected as the pre-trained model for subsequent experiments.
[0147] 5. Transfer learning.
[0148] The main advantage of transfer learning is that it can reduce the requirement for labeled data in the target task, improve learning efficiency, and promote cross-domain applications. The process can be summarized as the following three steps. First, model pre-training, which means training the model on the source task to acquire the source task knowledge. Common pre-trained models such as ResNet50, ResNet101, VGG16, VGG19 in the field of computer vision; BERT, GPT in the field of natural language processing all provide strong feature representation ability in their feature field; the second step is knowledge transfer, which means transferring the knowledge learned from the source task to the target task, which may include sharing model parameters, using feature representation of the source task, etc.; the last step is fine-tuning, which means adjusting the parameters of the pre-trained model on the data of the target task, such as freezing certain layers, fine-tuning the parameters of the layers, and adjusting other hyperparameters (optimizing learning rate, fine-tuning loss function, etc.). Through the above three ways, the learning effect of the target task can be effectively improved, while keeping the useful knowledge learned from the source task.
[0149] Reference Figure 2 There are two transfer experiments in this embodiment. Transfer experiment 1 verifies the effect of transfer learning on the two small sample sets FEM_long and LIFE_old downloaded on PredRet; transfer experiment 2 uses tea and grape wine samples with similar data volume to verify the transfer effect of specific food in different ionization mode data. Load the GCN pre-trained model obtained in step 4, freeze the first 8 layers, and open the subsequent layers for training. All models introduce ReduceLROnPlateau and ModelCheckpoint callback functions.
[0150] 5.1 Transfer experiment 1.
[0151] The training hyperparameters and results of each dataset in transfer experiment 1 are as follows:
[0152] (1) Transfer experiment 1—FEM_long.
[0153] The ratio of training set to validation set is 8:2, the optimizer uses Adam, the initial learning rate is 0.01, the loss function is MAE, the Batch_Size is set to 8, and the training times Epoch is 100.
[0154] (2) Transfer experiment 1—LIFE_old.
[0155] The ratio of training set to validation set is 8:2, the optimizer uses Adam, the initial learning rate is 0.01, the loss function is MAE, the Batch_Size is set to 16, and the training times Epoch is 100.
[0156] According to the results of the migration experiment, the models trained by the FEM_long and LIFE_old datasets achieved 0.919 and 0.811, respectively, with better results, but the MAE value in the GCN-RT(FEM_long) model was relatively high. The reason may be that the retention time range of the FEM_long dataset is relatively wide (41.4-3672), which is much larger than that of the LIFE_old dataset (30.589-336.985). As an evaluation indicator, MAE measures the average absolute difference between the predicted value and the true value, so a few outliers may have a greater impact on the MAE value. Nevertheless, in combination with other evaluation indicators, the GCN-RT(FEM_long) model still shows good results. In summary, on the basis of reasonable setting of hyperparameters, transfer learning can still achieve good training results on small sample datasets.
[0157] 5.2 Migration Experiment 2.
[0158] The training hyperparameters and results of each dataset in the migration experiment 2 are as follows:
[0159] (1) Migration Experiment 2 - Tea positive and negative ion modes.
[0160] The ratio of training set to validation set is 8:2, the optimizer uses SGD, the initial learning rate is 0.1, the loss function is Huber, Batch_Size is set to 64, and the training times Epoch are 100.
[0161] (2) Migration Experiment 2 - Wine positive and negative ion modes.
[0162] The ratio of training set to validation set is 8:2, the optimizer uses SGD, the initial learning rate is 0.1, the loss function is Huber, Batch_Size is set to 64, and the training times Epoch are 100.
[0163] Based on the experience of migration experiment 1, the combination of optimizer and loss function in migration experiment 2 is adjusted from Adam+MAE in migration experiment 1 to SGD+Huber. Compared with Adam, SGD emphasizes the control of step size at each parameter update, which can usually provide a more robust solution, especially in the case of a higher risk of overfitting. Since SGD does not need to save the second moment (gradient square) of each iteration, it has lower memory consumption, so it is suitable for larger models or scenarios that require high parallel computing. The Huber loss function combines the advantages of mean square error (MSE) and mean absolute error (MAE), and has stronger robustness to outliers. Specifically, when the loss value is small, the Huber loss behaves like MSE, with a larger gradient that can accelerate convergence; when the loss value is large, the gradient becomes small, thereby avoiding the adverse effects of excessive gradient on model training. This makes Huber loss more advantageous than MAE in handling outliers. The results show that the models trained by tea positive and negative ion modes are 0.892 and 0.873, respectively, and the models trained by wine positive and negative ion modes are 0.877 and 0.926, respectively. The rest of the evaluation indicators are also generally better. This shows that, on the basis of reasonable setting of hyperparameters, transfer learning can achieve good training effect on small sample positive and negative ion data sets.
[0164] Currently, liquid chromatography retention time prediction is increasingly valued in compound identification, as it provides information orthogonal to tandem mass spectrometry. This example uses seven datasets for experiments, and liquid chromatography retention time prediction is achieved through three experiments. In the data preprocessing stage, the SMILES and InChI strings of the compounds are converted into adjacency matrices and feature matrices composed of 12 compound atomic features, capturing the complex nonlinear relationships in the molecular structure.
[0165] Experiment one uses SMRT large data set combined with five self-designed deep learning network architecture to build pre-training model, and trains under the same hyperparameters. The results show that GCN reaches 0.854, which has better performance than the other four architectures; Experiment two uses FEM_long and LIFE_old two small sample data sets with different chromatographic methods from PredRet database for migration test. Under the same model conditions, the model trained by FEM_long and LIFE_old reaches 0.919 and 0.811 respectively, and good results are obtained; Experiment three discusses the migration application of specific food, using tea and wine positive and negative ion data sets, based on the experience of experiment two, using the optimizer (SGD) and loss function (Huber) combination more suitable for the actual situation of the data. The results show that the model trained by tea positive and negative ion mode data reaches 0.892 and 0.873 respectively; the model trained by wine positive and negative ion mode data reaches 0.877 and 0.926 respectively, and better results are obtained. In summary, the pre-training model in experiment one not only performs well on small sample data sets, but also can be further refined into positive ion mode and negative ion mode prediction, widening the application range of deep learning algorithm in compound retention time prediction.
[0166] This embodiment selects the GCN model with the highest prediction accuracy after data training as the optimal retention time prediction model, and further performs transfer learning on the GCN model to improve the accuracy of the GCN model in predicting compound retention time. This lays a good data foundation for later construction of compound structure identification database.
[0167] 6. Use a large language model to extract compound information.
[0168] This embodiment uses the currently most powerful large language model ChatGPT4o for Prompt training and optimization. The experimental process is as follows:
[0169] First, manually extract some text passages containing tea or wine related compounds from the downloaded literature, then input these texts and the preliminarily designed Prompt into LLM, and then optimize the Prompt according to the results obtained, and repeat the process until the final Prompt that can fully extract compound information is formed.
[0170] 6.1 Introduction of large language model.
[0171] ChatGPT and Kimi are two advanced large language models currently available, both based on deep learning and natural language processing techniques. ChatGPT, developed by OpenAI, has strong text understanding and generation capabilities, and is widely used in code writing, dialogue interaction, and other fields, especially in handling complex logical reasoning tasks. It supports multilingual communication and can provide structured text analysis. In addition, ChatGPT can combine plugins or APIs to further expand its use scenarios; Kimi, a large language model developed by Moonshot AI, excels in efficient information processing and strong context understanding, making it suitable for long text reading, literature analysis, and other tasks. Moreover, compared to ChatGPT, Kimi has a more fluent interaction mode and supports longer context memory, which makes it perform well in technical questions and knowledge organization. In general, ChatGPT and Kimi have their own strengths.
[0172] In this embodiment, since a large amount of literature and abstract data needs to be processed in batches, local code is used to call API services to improve data processing efficiency. The API of ChatGPT can be obtained through the official platform of OpenAI https: / / platform.openai.com / . After registering an OpenAI account and logging in to the platform, create a new API key in the API Keys management interface and use it for identity verification when calling. The model selected for this research is GPT-4. The API of Kimi can be obtained through the official platform of Moonshot AI https: / / platform.moonshot.cn / . After user registration and login, access keys can be generated on the API Key management page. The model selected for this research is moonshot-v1-8k.
[0173] 6.2 Large language model Prompt design.
[0174] Prompt (prompt) is the input text used by large language models (such as ChatGPT, Kimi) to receive instructions and generate responses. The form of Prompt can be a simple sentence, question, instruction, or even a more complex paragraph, and its core function is to guide the model to generate answers in the expected way.
[0175] In the data mining task of the chemical field, the design of Prompt needs to meet more stringent requirements, mainly following the following three principles:
[0176] (1) Minimize hallucination: In chemical applications, LLMs generating false or misleading information can lead to serious experimental biases. Therefore, the Prompt design should minimize the false information generated by the model as much as possible and ensure that the answers are based on reliable data. For example, when extracting compounds related to tea / wine, if proper restrictions are not made, the LLM may mistakenly extract unrelated compounds in the literature or even generate non-existent compound names.
[0177] (2) Provide detailed instructions: By introducing explicit contextual information and specific instructions in the Prompt, the accuracy of the model's generated results can be improved. For example, when extracting tea / wine-related compounds, provide specific screening criteria (e.g., return only singular compound names, extract only specific compound names).
[0178] (3) Request structured output: In data mining tasks, the consistency of output format is crucial for subsequent analysis. Therefore, the Prompt should explicitly require the LLM to return data in a specific format (such as tables, JSON, etc.) to improve the efficiency of data processing. For example, in chemical research, if no format constraints are set, the LLM may output data in the form of lists, paragraphs, or non-standardized tables, increasing the difficulty of subsequent organization.
[0179] 6.2 Related code environment configuration.
[0180] The programming language used in this example is Python 3.8.2, and the IDE is jupyrter notebook. All code environment dependency library configurations are as shown in Table 3.
[0181] Table 3 Code environment dependency library configuration
[0182]
[0183]
[0184] 7. Comparison of large language models and ChemDataExtractor compound information extraction capabilities.
[0185] To compare the compound information extraction capabilities of large language models and traditional data mining methods such as ChemDataExtractor, this example sets up a control test based on tea literature data. Based on the consideration of manual verification accuracy and API cost control, taking tea as an example, the control test randomly selects 4 related articles and uses GPT-4, moonshot-v1-8k, and ChemDataExtractor to extract compound information from the articles.
[0186] The large language model extraction process includes PDF parsing, text segmentation, ChatGPT API interaction, data parsing and storage, as well as the introduction of asynchronous programming and error retry mechanism to improve processing efficiency and stability. First, the code uses the fitz library to parse PDF and segment the text according to 1000 characters to adapt to the input limit of OpenAI API. Then, each text block is extracted by ChatGPT API for compound name extraction, using an optimized Prompt to ensure the accuracy of the extraction results. After extraction, the code parses the table data returned by ChatGPT, removes duplicates (only within the same article) and stores it as a CSV file.
[0187] Among them, asynchronous programming is achieved through the async and await keywords, which allows the program to not block the main thread when waiting for external API responses, and can handle other tasks in parallel. In the code, async defines an asynchronous function, and await is used to wait for the completion of asynchronous operations. When calling the ChatGPT API, the program will not stop due to waiting for API responses, ensuring that other tasks can continue to execute. The error retry mechanism is used when encountering request failures or network problems, and the program will automatically retry the request to avoid terminating the program due to a single failure.
[0188] Since the principle of code running is to first extract a single article and then add a loop to achieve batch extraction, the deduplication mentioned in the previous text is only for single article deduplication, and there is still a possibility of duplicate compounds in the final saved CSV file. Based on this, the comparison chart of the extraction results of the two large language models and ChemDataExtractor is shown in Table 4.
[0189] Table 4: Comparison of large language model and ChemDataExtractor extraction results
[0190]
[0191]
[0192] Table 3 shows that large language models (GPT-4, moonshot-v1-8k) have higher accuracy and reliability than traditional ChemDataExtractor in the task of extracting tea compound information. Specifically, ChemDataExtractor initially extracted 960 names, but after deduplication, only 408 remained, of which 202 were effective compounds, and only 132 were finally confirmed as tea characteristics. This indicates that this method has strong ability in large-scale information extraction, but the amount of redundant information is too large, resulting in a significant decrease in the proportion of effective data in the subsequent screening process, and the overall accuracy is low.
[0193] In comparison, large language models performed better in targeted compound identification. Moonshot-v1-8k initially extracted 194 names, with 169 remaining after deduplication. While superior to GPT-4 in the initial extraction phase, further screening revealed only 94 valid compounds, ultimately confirming 89 tea compounds. While this improved accuracy compared to ChemDataextractor, it suffered from significant data loss, impacting the final extraction results.
[0194] GPT-4, however, performed more consistently across all stages. It initially extracted 172 names, which were reduced to 151 after deduplication, resulting in 148 active compounds, demonstrating strong information filtering capabilities. Ultimately, it identified 146 tea compounds, far exceeding other methods. This demonstrates that GPT-4 not only demonstrates high accuracy in the initial extraction phase but also maintains high precision in subsequent active compound screening and feature identification. Therefore, GPT-4 was selected as the data mining method for subsequent research.
[0195] 8. Tea / wine literature data search formula.
[0196] (1) The search formula for tea literature data is as follows:
[0197] (((tea AND LC-MS)OR(tea AND LC-MS AND Metabolomics))OR((tea AND UHPLC-QTOF-MS)OR(tea AND UHPLC-QTOF-MS AND Metabolomics)))OR(((tea AND LC-MS)OR(tea AND LC-MS AND Metabolomics))OR((tea AND UHPLC-QTOF-MS)OR(tea AND UHPLC-QTOF-MS AND Metabolomics))AND("Longjing"OR"Tieguanyin"OR"Pu'er"OR"Da HongPao"OR"Biluochun"OR"Sencha"OR"Matcha"OR"Gyokuro"OR"Assam"OR"Darjeeling"OR"Ceylon"OR"Earl Grey"))
[0198] The above literature search formula aims to retrieve studies using LC-MS or UHPLC-QTOF-MS technology to analyze tea metabolites, with a particular focus on the following representative world-famous tea varieties:
[0199] 1) Chinese tea: such as Longjing, Tieguanyin, Pu'er, Da Hong Pao, Biluochun.
[0200] 2) Japanese tea: such as Sencha, Matcha, Gyokuro.
[0201] 3) Indian tea: such as Assam, Darjeeling.
[0202] 4) Sri Lankan tea: such as Ceylon.
[0203] 5) British tea: such as Earl Grey.
[0204] (2) Wine literature data search formula as follows:
[0205] (((wine AND LC-MS) OR (wine AND LC-MS AND Metabolomics)) OR ((wine AND UHPLC-QTOF-MS) OR (wine AND UHPLC-QTOF-MS AND Metabolomics))) OR (((wine AND LC-MS) OR (wine AND LC-MS AND Metabolomics)) OR ((wine AND UHPLC-QT OF-MS) OR (wine AND UHPLC-QTOF-MS AND Metabolomics)) AND ("Lafite" OR "Latour" OR "Margaux" OR "Pavillon Rouge" OR "Haut-Brion" OR "Mouton Rothschild" OR "Tignanello" OR "Barbaresco" OR "Unico" OR "Roda" OR "Opus One" OR "Grange" OR "Hill of Grace"))
[0206] The above literature search formula aims to retrieve researches using LC-MS or UHPLC-QTOF-MS technology to analyze wine metabolites, with special attention to the following several representative world-renowned red wine brands and wineries:
[0207] 1) French red wine: such as Lafite, Latour, Margaux, Pavillon Rouge, Haut-Brion, Mouton Rothschild.
[0208] 2) Italian red wine: such as Tignanello, Barbaresco.
[0209] 3) Spanish red wine: such as Unico, Roda.
[0210] 4) American red wine: such as Opus One.
[0211] 5) Australian red wine: such as Grange, Hill of Grace.
[0212] Through the literature retrieval formula, this embodiment retrieves and downloads the abstract data and complete literature data of the relevant literature from the Web of Science and PubMed databases, respectively.
[0213] 9. Database (i.e. compound structure identification database) construction.
[0214] Reference Figure 3 Before constructing the tea / wine LC-MS database, it is necessary to first establish a tea / wine compound name database. Specifically, according to the literature data search formula of the previous step, the literature is retrieved and screened, and finally 399 tea-related literature (PDF format) and 1491 abstract data (Excel format) are obtained. Similarly, there are a total of 412 wine-related literature (PDF format) and 1542 abstract data (Excel format). All the literature data in PDF format are sorted out, and the abstract data is converted from Excel format to PDF format using Python script for subsequent text parsing.
[0215] After data preprocessing, the GPT-4 API is called using the code to batch parse the literature and abstract data, extract the compound names, and store the extraction results as a CSV file. The number of compounds extracted initially is 12420 (tea) and 14086 (wine), although the large language model has high extraction accuracy, but due to the use of loop extraction, only the same chapter can ensure that there are no duplicates. Therefore, further duplicate data removal is required. After screening, a total of 8096 tea compound data and 8221 wine compound data are finally obtained.
[0216] To further reduce the time cost, the extracted compound data is no longer manually screened, but directly input into PubChem REST API for checking. For compounds that can be successfully matched, key information such as molecular formula, SMILES, INCHIKEY, and accurate mass is obtained; for entries that cannot be matched, it is determined as invalid compound name and automatically deleted. Subsequently, based on INCHIKEY, synonymous compounds are further removed, and the final number of screened compounds is 6358 (tea) and 6612 (wine), respectively. At this point, the compound name database construction is completed.
[0217] Next, the data with confidence level 1 is integrated. First, the positive and negative ion mass spectrum data files (MSMS-Public_experiment spectra-neg-VS19.msp and MSMS-Public_experiment spectra-pos-VS19.msp) are downloaded from the official website, and then a Python script is used to combine the two positive and negative ion databases into one file named MSDIAL.msp. According to the generated MSDIAL.msp file, information such as precursor ion mass, ion mode, collision energy, and secondary mass spectrum peak is extracted. In the matching stage, INCHIKEY (a text identifier for identifying compounds) is used to search the MSP database and extract the corresponding LC-MS data. The matched compounds are sorted into the database, and the unmatched ones are marked as null and set as low confidence data. In the data updating process, the LC-MS data of the matched compounds are marked with confidence level 1, and the unmatched ones are marked with confidence level 2.
[0218] Finally, the LC-MS data of tea / wine with confidence level 2 is completed. First, the data set is divided according to the ion mode, and the precursor ion mass-to-charge ratio is calculated to complete the key LC-MS information. Then, the transfer learning model (i.e. target retention time prediction model) is used to predict the retention time of the compound, and CFM-ID 4.0 is called to generate its secondary mass spectrum data. Finally, the data with confidence level 1 and confidence level 2 are integrated and converted to MSP format for application in MS-DIAL software. At this point, the tea and wine positive and negative ion LC-MS databases based on large language models are constructed, named POS_LCMS-TDB(LLM), NEG_LCMS-TDB(LLM), POS_LCMS-WDB(LLM), and NEG_LCMS-WDB(LLM), respectively.
[0219] 10. Performance evaluation of LC-MS database based on large language model.
[0220] 10.1 Tea, wine mixed standard solution and actual sample solution.
[0221] The actual tea samples used in this example were Enshi Yulu, a total of 43 tea samples were collected, covering three grades (TJ, YJ, EJ), all samples were purchased from Enshi, Hubei, and numbered as ESYL01 to ESYL43. The tea samples were ground and passed through a 60-mesh sieve and stored in a 4°C refrigerator for subsequent analysis. 20 mg of tea powder was weighed into a 2 mL centrifuge tube, 1 mL of 70% methanol solution was added, and ultrasonic extraction was carried out at 60°C for 10 min. After extraction, the sample was cooled and centrifuged at 12000 rpm for 10 min, the supernatant was diluted 5 times, then filtered through a 0.22 μm polytetrafluoroethylene (PTFE) membrane into a sample bottle, and three replicates were prepared for each sample. In addition, all tea samples were mixed by equal volume to prepare quality control (QC) samples, and stored in a 4°C refrigerator for testing.
[0222] The tea mixed standard contains 29 compounds, including L-lysine (≥98%, Solabio), L-histidine (≥98%, Solabio), L-serine (≥98%, Solabio), L-glutamic acid (≥98%, Solabio), procyanidin B1 (≥98%, Source Leaf), procyanidin B2 (≥98%, Mannstein), L-tyrosine (≥98%, Solabio), L-isoleucine (≥98%, Solabio), L-phenylalanine (≥98%, Solabio), epigallocatechin (≥98%, Anpuro), theophylline (≥98%, Anpuro), L-tryptophan (≥98%, Solabio), (+ / -)-catechin (≥98%, Source Leaf), caffeic acid (≥98%, Solabio), quercetin (≥98%, Solabio), vitexin (≥98%, Solabio), myricetin (≥98%, Aladdin), naringenin (≥98%, Solabio), catechin gallate (≥98%, Source Leaf), epicatechin gallate (≥98%, Anpuro), 4-hydroxycoumarin (≥98%, Source Leaf), gallic acid (≥98%, Source Leaf), luteolin (≥98%, Solabio), apigenin (≥98%, Solabio), D-(-)-quinic acid (≥98%, Source Leaf), L-arginine (≥98%, Solabio), L-threonine (≥98%, Solabio), L-leucine (≥98%, Solabio), quercetin-3-glucoside (≥98%, Solabio).
[0223] The actual wine samples used were Cabernet Sauvignon dry red wines, a total of 45 bottles were collected, and these wine samples were all produced in representative geographical regions of various countries and purchased directly from the producers. Specifically, the red wine samples were sourced from Yinchuan (n = 17), Qinhuangdao (n = 12), and Turpan (n = 16). All wines were re-packaged into 50 mL vials under a nitrogen environment and immediately sealed in vacuum bags and then stored in a refrigerator at -18°C. Before analysis, the samples were thawed at 4°C and filtered through a 0.22 μm polytetrafluoroethylene membrane before use. In addition, 500 μL of each of the 45 samples was mixed in equal volumes to prepare a quality control (QC) sample.
[0224] The wine mixture standard contained 17 compounds, including L-theanine (≥98%, Anpure), theobromine (≥98%, Aldrich), theophylline (≥98%, Anpure), epicatechin (≥98%, Source Leaf), procyanidin C1 (≥98%, Solabio), caffeic acid (≥98%, Solabio), myricetin-3-O-galactoside (≥98%, Vekcia), 4-coumaric acid (≥98%, Aldrich), epigallocatechin gallate (≥98%, Source Leaf), 3,4-dihydroxybenzoic acid (≥98%, Aldrich), kaempferol-3-O-rutinoside (≥98%, Solabio), myricetin (≥98%, Solabio), quercetin (≥98%, Solabio), kaempferol (≥98%, Aldrich), epicatechin gallate (≥98%, Anpure), palmitic acid (≥98%, Dextérbio), stearic acid (≥98%, Dextérbio).
[0225] To evaluate the accuracy of the four databases constructed based on large language models in compound identification, the tea leaf, wine mixture standard solution and actual sample solution described above were identified using MS-DIAL, with a defined deviation of mass-to-charge ratio and retention time of less than 0.01 Da and 3 s, respectively, and a mass spectrum information matching similarity of greater than 0.7. Among the 29 compounds in the tea leaf mixture standard, 24 were successfully identified in positive ion mode and 20 were successfully identified in negative ion mode, for a total of 29, with an identification accuracy of 100%. Compared with the traditional ChemDataExtractor, the accuracy of the database constructed in this embodiment was improved by 41.4%.
[0226] The actual sample of tea was successfully identified 904 compounds in positive ion mode, and 800 compounds in negative ion mode. Due to the limited space, the similarity of MS-DIAL mass spectrum information was further adjusted to 1 during the verification of this embodiment, at this time 128 compounds were successfully identified in positive ion mode, and 29 compounds were successfully identified in negative ion mode. Compared with the traditional ChemDataExtractor results, 30 and 5 compounds were identified in positive and negative ions, respectively.
[0227] Among the 17 compounds in the wine mixed standard, 10 were successfully identified in positive ion mode, 17 were successfully identified in negative ion mode, and a total of 17 were successfully identified, with an accuracy rate of 100%. Compared with the traditional ChemDataExtractor, the accuracy of the database constructed in this embodiment was improved by 23.5%.
[0228] The actual sample of wine was successfully identified 662 compounds in positive ion mode, and 1149 compounds in negative ion mode. Further adjusting the similarity of MS-DIAL mass spectrum information to 1, at this time 153 compounds were successfully identified in positive ion mode, and 142 compounds were successfully identified in negative ion mode. Compared with the traditional ChemDataExtractor results, 30 and 14 compounds were identified in positive and negative ions, respectively.
[0229] The identification ability of the above four databases has been greatly improved, and the core reason is that LLM has optimized the extraction process of compound names. This optimization not only improves the integrity of the database, but also reduces the cleaning errors caused by manual processing, thereby enhancing the identification performance of the database.
[0230] The research focus of this embodiment improves the traditional ChemDataExtractor compound name extraction process, and uses a large language model to replace the traditional ChemDataExtractor. In the extraction of compound names, 6358 and 6612 compound names of tea and wine are obtained respectively. This embodiment successfully constructs four tea and wine compound structure identification databases POS_LCMS-TDB(LLM), NEG_LCMS-TDB(LLM), POS_LCMS-WDB(LLM) and NEG_LCMS-WDB(LLM), and evaluates their performance. The results show that the tea standard sample is identified in positive and negative ion modes respectively, and 24 and 20 compounds are identified, a total of 29 compounds, with an identification accuracy of 100%; 10 and 17 compounds are identified respectively, a total of 17 compounds, with an identification accuracy of 100%. In the actual sample identification, the tea is identified in positive and negative ion modes respectively when the mass spectrum information matching similarity score is greater than 0.7, and 904 and 800 compounds are identified respectively, and 662 and 1149 compounds are identified respectively. Compared with the traditional data mining method of ChemDataExtractor, the LLM constructed LC-MS database is better in accuracy, efficiency and time cost, and has high application value.
[0231] Reference Figure 4 The embodiment of the application also provides a compound structure identification database construction system, which comprises a data acquisition unit 100, a model selection unit 200, a transfer learning unit 300, a data prediction unit 400 and a database construction unit 500, wherein:
[0232] The data acquisition unit 100 is used for acquiring a model training data set, a model verification data set, a transfer training data set and a transfer verification data set containing molecular structures and retention times of compounds;
[0233] The model selection unit 200 is used for inputting the model training data set into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and verifying the plurality of trained retention time prediction models by using the model verification data set to select an optimal retention time prediction model;
[0234] The transfer learning unit 300 is used for inputting the transfer training data set and the transfer verification data set into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model;
[0235] The data prediction unit 400 is used for inputting the compound structure data to be predicted into the target retention time prediction model for prediction to obtain a predicted retention time;
[0236] The database construction unit 500 is configured to construct a compound structure identification database according to the predicted retention time.
[0237] It should be noted that, since the compound structure identification database construction system in the embodiment and the compound structure identification database construction method described above are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment, and thus will not be described in detail herein.
[0238] The embodiment of the present application further provides an electronic device, comprising at least one control processor and a memory connected to the at least one control processor in communication.
[0239] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0240] The non-transitory software programs and instructions required to implement the compound structure identification database construction method of the above-mentioned embodiment are stored in the memory, and when executed by the processor, the compound structure identification database construction method of the above-mentioned embodiment is executed, for example, the method steps S100 to S700 in the above-described Figure 1 are executed.
[0241] The system embodiment described above is only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0242] The embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are executed by one or more control processors, so that the one or more control processors execute the compound structure identification database construction method in the above-mentioned method embodiment, for example, execute the functions of the method steps S100 to S700 in the above-described Figure 1
[0243] As will be appreciated by one of ordinary skill in the art, all or some steps, systems of the above-disclosed methods can be implemented as software, firmware, hardware, or any suitable combination thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media.
[0244] The above is a specific description of the preferred embodiments of the present application, but the embodiments of the present application are not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the embodiments of the present application, and these equivalent modifications or replacements are included in the scope defined by the claims of the embodiments of the present application.
[0245] The embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the above-described embodiments. Those skilled in the art can make various changes within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present application.
Claims
1. A method for constructing a compound structure identification database, characterized in that: The method comprises: Obtain a model training dataset, a model validation dataset, a migration training dataset, and a migration validation dataset containing the molecular structures and retention times of the compounds; Inputting the model training data set into multiple retention time prediction models for training to obtain multiple trained retention time prediction models, and using a model validation data set to validate the multiple trained retention time prediction models to select the optimal retention time prediction model; Inputting the migration training data set and the migration verification data set into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model; Inputting the structure data of the compound to be predicted into the target retention time prediction model to perform prediction to obtain a predicted retention time; A compound structure identification database is constructed based on the predicted retention times.
2. The method for constructing a compound structure identification database according to claim 1, wherein: The model training data set is input into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, including: Preprocessing the data in the model training data set to obtain an atomic feature matrix and an atomic adjacency matrix; Multiple retention time prediction models were constructed based on graph convolutional networks, one-dimensional convolutional neural networks, two-dimensional convolutional neural networks, long short-term memory network structures, and gated recurrent units. The atomic feature matrix and the atomic adjacency matrix are input into the multiple retention time prediction models for training to obtain multiple trained retention time prediction models.
3. The method for constructing a compound structure identification database according to claim 2, wherein: The data in the model training data set is preprocessed to obtain an atomic feature matrix and an atomic adjacency matrix, including: Obtaining a SMILES string or InChI string corresponding to the compound in the model training data set, which is used to describe the molecular structure of the compound; Converting the SMILES string or the InChI string into a graph structure of a compound molecule; Counting the number of atoms in each compound molecule based on the graph structure of the compound molecule; According to the number of atoms and the graph structure of the compound molecule, an atomic feature matrix containing atomic features and an atomic adjacency matrix containing the connection relationship between atoms are constructed, wherein the atomic features include the number of hydrogen bonds, atomic mass, hybridization state, whether it is in a ring, aromaticity, whether it is a heteroatom, bonding type, the number of hidden valence electrons, the number of explicit valence electrons, atomic charge, the number of free radical electrons, and chiral label.
4. The method for constructing a compound structure identification database according to claim 1, wherein: The migration training dataset and the migration verification dataset include a first migration training dataset, a first migration verification dataset, a second migration training dataset, and a second migration verification dataset. The optimal retention time prediction model is subjected to migration learning using the migration training dataset and the migration verification dataset to obtain a target retention time prediction model, including: Using the first migration training dataset and the first migration verification dataset, performing a first migration learning on the optimal retention time prediction model to obtain a retention time prediction model after migration learning, wherein the first migration training dataset and the first migration verification dataset are small sample datasets; The second migration training dataset and the second migration verification dataset are used to perform a second migration learning on the retention time prediction model after the transfer learning to obtain a target retention time prediction model, wherein the second migration training dataset and the second migration verification dataset are datasets of positive and negative ion modes of tea and wine.
5. The method for constructing a compound structure identification database according to claim 1, wherein: The method further comprises: inputting the structure data of the compound to be predicted into the target retention time prediction model to perform prediction to obtain the predicted retention time. Obtain positive and negative ion mass spectrum data files and target literature containing compound names; Parsing the positive and negative ion mass spectrometry data files to obtain an initial compound structure identification database; Parsing the target document to obtain a parsed text; extracting compound names from the parsed text using a large language model, and screening the extracted compound names to obtain screened compound names; Obtaining the INCHIKEY corresponding to the screened compound name, and searching the initial compound structure identification database for liquid chromatography and mass spectrometry data that matches the INCHIKEY, setting the liquid chromatography and mass spectrometry data of the successfully matched compound to a confidence level of 1, and setting the liquid chromatography and mass spectrometry data of the unmatched compound and its corresponding liquid chromatography and mass spectrometry data to a confidence level of 2; Using the SMILES string or InChI string of the compound with a confidence level of 2 as the structure data of the compound to be predicted; The structure data of the compound to be predicted is input into the target retention time prediction model for prediction, and the predicted retention time corresponding to the compound with a confidence level of 2 is obtained.
6. The method for constructing a compound structure identification database according to claim 5, wherein: The extracted compound names are screened to obtain the screened compound names, including: Removing duplicate compound names from the extracted compound names to obtain duplicate-free compound names; Eliminating invalid compound names from the deduplicated compound names to obtain remaining compound names; The synonymous compound names in the remaining compound names are removed to obtain the screened compound names.
7. The method for constructing a compound structure identification database according to claim 5, wherein: The step of constructing a compound structure identification database based on the predicted retention time comprises: Calculating the precursor ion mass-to-charge ratio based on the precursor ion type and accurate mass corresponding to the compound with a confidence level of 2, and generating secondary mass spectrometry data using a CFM-ID tool, wherein the CFM-ID tool is a tool for predicting small molecule mass spectrometry data; A compound structure identification database was constructed by combining liquid chromatography and mass spectrometry data with a confidence level of 1 and liquid chromatography and mass spectrometry data with a confidence level of 2, which included predicted retention times, secondary mass spectrometry data, and theoretically calculated precursor ion mass-to-charge ratios.
8. A compound structure identification database construction system, characterized in that: The system comprises: a data acquisition unit, configured to acquire a model training data set, a model validation data set, a migration training data set, and a migration validation data set comprising the molecular structure and retention time of the compound; a model selection unit, configured to input the model training data set into a plurality of retention time prediction models for training to obtain a plurality of trained retention time prediction models, and to verify the plurality of trained retention time prediction models using a model verification data set to select an optimal retention time prediction model; A transfer learning unit, configured to input a transfer training data set and a transfer verification data set into the optimal retention time prediction model for transfer learning to obtain a target retention time prediction model; A data prediction unit, configured to input the structure data of the compound to be predicted into the target retention time prediction model to perform prediction and obtain a predicted retention time; The database construction unit is used to construct a compound structure identification database according to the predicted retention time.
9. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the method for constructing a compound structure identification database as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method for constructing a compound structure identification database according to any one of claims 1 to 7.
Citation Information
Cited By
Mass spectrometer data processing method and system and server
CN121070878A
Construction method of compound retention time prediction model in high performance liquid chromatography
CN121905355A