Protein side chain identification method based on electron density three-dimensional segmentation
Through the protein side chain recognition method based on electron density three-dimensional segmentation, the segmentation model nnUNet is used to identify residue types in protein crystal diffraction images, solving the problem of the failure of the existing technology in low resolution, and achieving more accurate and reliable protein structure analysis.
Patent Information
- Application Number
- CN202311323138.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
AI Technical Summary
Existing protein crystal diffraction image analysis software is prone to failure when the electron density resolution is low, unable to construct a complete protein structure, and unable to give the 3D profile of residues and the probability density distribution of multiple possible residue types.
A protein side chain recognition method based on three-dimensional segmentation of electron density is proposed. Using MTZ or MRC crystal diffraction data in the PDB database, the electron density submap of the fixed region is intercepted through the Cβ atomic coordinates, and the segmentation model nnUNet is used for prediction, the residue type is identified and the probability density distribution is given.
This method can accurately identify residue types at lower electron density resolution, provide 3D profiles of residues and probability distributions of multiple possible residue types, improving the accuracy and reliability of protein structure analysis.
Smart Images

Figure CN119832970A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to protein segmentation and identification, and more specifically to a protein side chain identification method based on three-dimensional electron density segmentation. Background Art
[0002] The current mainstream protein crystal diffraction image analysis software include: PHENIX, CCP4, CNS, SHELX, MOSFLM, etc. Most of these software use the classical pattern matching method to obtain protein structure from crystal diffraction images.
[0003] However, these methods also have some defects. For example, the algorithm has very high requirements for electron density resolution. Low electron density resolution will cause the algorithm to fail and fail to successfully construct the complete structure. These software can generally only give the structure represented by the ball-and-stick model and cannot give the outline of the residues. These software can generally only give a certain residue type, rather than the probability density distribution of various possible residue types, etc.
[0004] Therefore, it is hoped to provide a method for automatically segmenting protein electron density maps and identifying the types of amino acid residues therein to overcome the above shortcomings. Summary of the invention
[0005] The present disclosure proposes a method for automatically segmenting a protein electron density map and identifying the types of amino acid residues therein. The method uses the MTZ or MRC crystal diffraction data of proteins in the PDB database, and obtains an electron density map from the crystal diffraction data to complete residue sequence identification. First, according to the C β Atomic position information, in C β With the atomic coordinates as the center, a fixed-size area is cut from the electron density map, and then the recognition model is used to predict the type of corresponding residue from the electron density submap in this area. The recognition algorithm used in this method is the segmentation model nnUNet, and the data set is built based on the protein structure public database PDB. This method performs segmentation recognition on the electron density map of a single residue, which can more accurately identify the residue type; at the same time, the segmentation method can give the probability density distribution of the category to which the residue belongs.
[0006] According to a first aspect of the present disclosure, a method for identifying protein side chains is provided. The method may include: inputting an electron density map of a protein containing residues into a segmentation model to obtain a single residue segmentation result; and identifying the amino acid type of the single residue based on the single residue segmentation result.
[0007] In the protein side chain identification method according to the first aspect of the present invention, the protein electron density map containing residues may be a local electron density map of a single residue and its vicinity.
[0008] In the protein side chain recognition method according to the first aspect of the present invention, identifying the amino acid type of a single residue based on the single residue segmentation result may include: calculating the probability distribution results of the single residue being different amino acid types based on the single residue segmentation result.
[0009] Preferably, the segmentation model is based on a UNet model. More preferably, the segmentation model is based on a nnUNet training framework.
[0010] In the protein side chain identification method according to the first aspect of the present invention, the single residue segmentation result may include an amino acid type identification result for each point on the electron density map.
[0011] Therefore, the identifying the amino acid type of a single residue based on the single residue segmentation result may further include: calculating the probability distribution results of different amino acid types within the single residue range based on the amino acid type identification result of each point on the electron density map.
[0012] The segmentation model used in the protein side chain recognition method according to the first aspect of the present invention can be constructed by training through the following steps: obtaining a training set, wherein the training set includes multiple training samples, each training sample includes a single residue and a local electron density map of its vicinity and the amino acid type of the residue; inputting the single residue and the local electron density map of its vicinity into the segmentation model to be trained to obtain a single residue segmentation result of the training sample; and updating the model parameters of the segmentation model based on the single residue segmentation result and the amino acid type of the residue of the training sample.
[0013] Preferably, the size of the local electron density map of a single residue and its vicinity is W*H*D, wherein W, H, and D represent the width, height, and depth of the map, respectively.
[0014] Preferably, the acquisition of the training set may further include: an amino acid type mask map obtained by one-hot encoding according to the amino acid type of the residue, wherein the size of the amino acid type mask map is expressed as W*H*D*N, corresponding to each point on the electron density map, and each point has a vector of length N corresponding to N amino acids, and the N values of the vector correspond to whether each point belongs to one of the N amino acids. If it belongs to the amino acid, the value is 1, otherwise the value is 0.
[0015] Preferably, the size of the single residue segmentation result is W*H*D*N, and each point on the corresponding electron density map has a probability vector of length N, indicating the probability that the point belongs to N amino acid categories.
[0016] Preferably, the updating of the model parameters of the segmentation model based on the segmentation results of a single residue and the amino acid type of the residue in the training sample may further include: calculating the training loss according to the loss function based on the segmentation results of a single residue and the amino acid type mask map of the residue in the training sample, and calculating the parameter gradient to update the model parameters of the segmentation model.
[0017] Preferably, the acquisition of the training set may include: acquiring the electron density map of the entire protein from the MTZ or MRC file; acquiring all C β A list of atomic coordinates and a list of residue amino acid types; for each C β The atomic coordinates and residue amino acid type pairs are extracted from the electron density map of the entire protein in C β The electron density submap in a fixed-size region centered on the atomic coordinates serves as the local electron density map of the single residue and its vicinity.
[0018] Preferably, multiple iterations are performed until the model converges, thereby constructing the segmentation model.
[0019] According to the second aspect of the present disclosure, a method for constructing a segmentation model for protein side chain recognition is provided. The method may include: obtaining a training set, the training set includes multiple training samples, each training sample includes a single residue and a local electron density map near it and the amino acid type of the residue; inputting the single residue and the local electron density map near it into the segmentation model to be trained to obtain a single residue segmentation result of the training sample; based on the segmentation result of the single residue and the amino acid type of the residue of the training sample, updating the model parameters of the segmentation model.
[0020] Preferably, the size of the local electron density map of a single residue and its vicinity is W*H*D, wherein W, H, and D represent the width, height, and depth of the map, respectively.
[0021] Preferably, the acquisition of the training set may further include: an amino acid type mask map obtained by one-hot encoding according to the amino acid type of the residue, wherein the size of the amino acid type mask map is expressed as W*H*D*N, corresponding to each point on the electron density map, and each point has a vector of length N corresponding to N amino acids, and the N values of the vector correspond to whether each point belongs to one of the N amino acids. If it belongs to the amino acid, the value is 1, otherwise the value is 0.
[0022] Preferably, the size of the single residue segmentation result is W*H*D*N, and each point on the corresponding electron density map has a probability vector of length N, indicating the probability that the point belongs to N amino acid categories.
[0023] Preferably, the updating of the model parameters of the segmentation model based on the segmentation results of a single residue and the amino acid type of the residue in the training sample may further include: calculating the training loss according to the loss function based on the segmentation results of a single residue and the amino acid type mask map of the residue in the training sample, and calculating the parameter gradient to update the model parameters of the segmentation model.
[0024] In the method for constructing a segmentation model for protein side chain recognition according to the second aspect of the present invention, the obtaining of a training set may include: obtaining an electron density map of the entire protein from an MTZ or MRC file; obtaining all C β A list of atomic coordinates and a list of residue amino acid types; for each C β The atomic coordinates and residue amino acid type pairs are extracted from the electron density map of the entire protein in C β The electron density submap in a fixed-size region centered on the atomic coordinates serves as the local electron density map of the single residue and its vicinity.
[0025] In the method for constructing a segmentation model for protein side chain recognition according to the second aspect of the present invention, preferably, multiple iterations are performed until the model converges, thereby constructing the segmentation model.
[0026] Preferably, the segmentation model is based on a UNet model. More preferably, the segmentation model is based on a nnUNet training framework.
[0027] According to a third aspect of the present disclosure, a protein side chain identification system is provided. The system may include: a data processing module for processing protein data to obtain an electron density map of the protein containing the residue; a segmentation module for inputting the electron density map of the protein containing the residue into a segmentation model to obtain a single residue segmentation result; and a post-processing module for identifying the amino acid type of the single residue based on the single residue segmentation result.
[0028] According to a fourth aspect of the present disclosure, a computer-implemented protein side chain recognition system is provided. The computer-implemented system can implement the following operations by executing a computer program: processing protein data to obtain an electron density map of a protein containing residues; inputting the electron density map of a protein containing residues into a segmentation model to obtain a single residue segmentation result; and based on the single residue segmentation result, identifying the amino acid type of a single residue.
[0029] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a computer program. The computer program includes instructions. When the instructions are executed by a processor of an electronic device, the electronic device implements the protein side chain recognition method according to the first aspect of the present disclosure.
[0030] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a computer program. The computer program includes instructions. When the instructions are executed by a processor of an electronic device, the electronic device implements the method for constructing a segmentation model for protein side chain recognition according to the second aspect of the present disclosure.
[0031] According to a seventh aspect of the present disclosure, a computer system is provided. The computer system comprises: a processor, a memory, and a computer program. The computer program is stored in the memory and is configured to be executed by the processor. The computer program comprises instructions for implementing the protein side chain recognition method according to the first aspect of the present disclosure.
[0032] According to an eighth aspect of the present disclosure, a computer system is provided. The computer system comprises: a processor, a memory and a computer program. The computer program is stored in the memory and is configured to be executed by the processor. The computer program comprises instructions for implementing the method for constructing a segmentation model for protein side chain recognition according to the second aspect of the present disclosure.
[0033] The method disclosed herein uses a deep learning model to mine knowledge directly from data without algorithm failure. Moreover, the method disclosed herein uses a segmentation model to obtain a 3D profile of the residue, thereby presenting the result more intuitively. In addition, the method disclosed herein can give a probability density distribution of residue types, presenting the most likely residues, and can be used to evaluate the authenticity and credibility of the residue's electron density, thereby proving the reliability of the segmentation result. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The present disclosure will be more fully understood from the following detailed description taken in conjunction with the accompanying drawings, in which like elements are numbered in a similar manner, and in which:
[0035] Figure 1 is a flow chart of a protein side chain recognition method according to an embodiment of the present disclosure.
[0036] Figure 2 It is a schematic diagram of the association between the protein side chain recognition method and the segmentation model construction method according to an embodiment of the present disclosure.
[0037] Figure 3 It is a flowchart of a method for constructing a segmentation model for protein side chain recognition according to an embodiment of the present disclosure.
[0038] Figure 4 Schematic diagram of the modules of the protein side chain recognition algorithm according to the present disclosure.
[0039] Figure 5 This is a schematic diagram of the UNet network structure.
[0040] Figure 6 It is a schematic diagram of the training process of the segmentation model.
[0041] Figure 7 Schematic diagram of protein residue segmentation results according to an embodiment of the present disclosure.
[0042] Figure 8 is a schematic block diagram of a protein side chain recognition system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] Unless otherwise defined, technical and scientific terms used in the present disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which the present disclosure belongs.
[0044] The technical solution of the present disclosure is further described in detail below through examples and in conjunction with the accompanying drawings. Unless otherwise specified, the methods, tools and materials of the embodiments described below are conventional methods, tools and products that can be obtained through public channels or purchased on the market. Those skilled in the art of the present disclosure will understand that the methods, tools and materials described below are only exemplary and should not be regarded as limiting the scope of the present disclosure.
[0045] From the overall perspective of protein side chain recognition methods, Figure 1 A flow chart of a protein side chain recognition method according to an embodiment of the present disclosure is shown.
[0046] like Figure 1 As shown in , the protein side chain identification method 100 according to the present disclosure starts at step S110 , in which the electron density map of the protein containing the residues is input into the segmentation model to obtain a single residue segmentation result.
[0047] In a preferred embodiment, the protein electron density map containing residues can be a local electron density map of a single residue and its vicinity. That is, according to the present disclosure, what is input is a local electron density map of a single residue and its vicinity, such as a region space of fixed size, which may also contain a portion of other nearby residues. Segmentation here refers to distinguishing the outline of a specified residue from this region. In the following, a local electron density map may also be referred to as an electron density submap.
[0048] In a preferred embodiment of the present disclosure, the segmentation model used in method 100 is based on a UNet model. More specifically, the segmentation model is based on a nnUNet training framework. The UNet model and the nnUNet training framework will be described in more detail below.
[0049] Then, in step S120, based on the single residue segmentation result, the amino acid type of the single residue is identified.
[0050] Specifically, in step S120, based on the single residue segmentation result, the probability distribution result of the single residue being different amino acid types can be calculated.
[0051] In step S110, the single residue segmentation result output by the segmentation model may be the amino acid type recognition result of each point on the electron density map. Thus, in step S120, the probability distribution results of different amino acid types within the single residue range may be calculated based on the amino acid type recognition result of each point on the electron density map. This will be described in more detail below.
[0052] As mentioned above, the segmentation and recognition algorithms in the prior art have very high requirements for electron density resolution. Low electron density resolution (such as the electron density map obtained by cryo-electron microscopy) will cause the algorithm to fail and fail to construct the structure. However, in the method disclosed herein, not only can the recognition task be completed using only the electron density map in a very small area around the residue, but the resolution requirement for the electron density map is relatively low, and an electron density map with a relatively low resolution or an electron density map generated by a generation algorithm can be used.
[0053] In addition, the software of the prior art can generally only give the structure represented by the ball-and-stick model, but cannot give the outline of the residue. In contrast, the segmentation result of the method disclosed in the present invention can give the 3D shape outline of the residue, which helps the experts in the field to judge the rationality of the recognition result.
[0054] In addition, the prior art generally can only give a certain residue type, rather than the probability density distribution of the residue type. However, the method disclosed in the present invention can obtain the probability distribution results of different amino acid types after post-processing, that is, the output information is richer.
[0055] Figure 2 A schematic diagram of the association between the protein side chain recognition method and the segmentation model construction method according to an embodiment of the present disclosure is given.
[0056] exist Figure 2 In the schematic diagram 200 shown, the left path shows a method for constructing a segmentation model, while the right path shows a method for identifying protein side chains using the segmentation model.
[0057] Figure 2 The process on the right side is actually Figure 1 The protein side chain recognition method according to an embodiment of the present disclosure is shown. Figure 2 The process on the left will be described in detail below (this process can be regarded as the construction process of the segmentation model used in the protein side chain recognition method, and thus can be used as a pre-process of the recognition method, or it can be regarded as an independent segmentation model construction method, such as Figure 3 ). Figure 2 It can be seen that both the construction of the segmentation model and the protein side chain recognition process require processing of the original protein data. The data processing process will be described in detail below. In the process of segmentation model construction, protein data from PDB and MTZ or MRC files are used as training data after processing to iteratively update the model parameters of the segmentation model to be trained. The fully trained segmentation model can be used for protein side chain recognition, that is, the process of residue category prediction, that is, Figure 2 The process on the right side of the diagram.
[0058] If Figure 2 As a whole method, the whole process is divided into 5 steps (such as Figure 2 Numbers 1-5):
[0059] 1. Process the existing protein PDB data (including MTZ or MRC data, for example) to obtain residue electron density submaps and corresponding residue categories, and construct a training data set;
[0060] 2. Train the segmentation model with the obtained training data;
[0061] 3. Perform data processing on the test protein data to obtain the residue electron density submap;
[0062] 4. Input the test data into the trained segmentation model to obtain the inference result;
[0063] 5. Post-process the model output results to finally obtain the residue category probability distribution.
[0064] The following is a detailed description of the process of the method for constructing a segmentation model for protein side chain recognition according to an embodiment of the present disclosure.
[0065] Figure 3 3 is a flow chart of a method 300 for constructing a segmentation model for protein side chain recognition according to an embodiment of the present disclosure.
[0066] Those skilled in the art should know that Figure 3As shown in , in step S310, a training set should be first obtained, and the training set includes multiple training samples. Specifically, each training sample includes a single residue and its local electron density map near it and the amino acid type of the residue.
[0067] The size of the electron density map of a single residue and its vicinity in the training sample is W*H*D, where W, H, and D represent the width, height, and depth of the map, respectively.
[0068] Acquiring the training set may further include: obtaining an amino acid type mask map according to the amino acid type of the residue by one-hot encoding. The size of the amino acid type mask map may be expressed as W*H*D*N, corresponding to each point on the electron density map, and each point has a vector of length N corresponding to N kinds of amino acids, and the N values of the vector correspond to whether each point belongs to one of the N kinds of amino acids, and if it belongs to the amino acid, the value is 1, otherwise the value is 0. For example, a point on the electron density map has a vector of length N [0 0 0 1 0……0], wherein the fourth value in the vector is 1, indicating that the point on the electron density map belongs to the type of amino acid corresponding to the fourth value.
[0069] More specifically, in step S310, the electron density map of the entire protein can be obtained from, for example, an MRC file, and all C β A list of atomic (i.e., β-carbon) coordinates and a list of residue amino acid types. Then, for each C β The atomic coordinates and residue amino acid type pairs are extracted from the electron density map of the entire protein in C β The electron density submap in a fixed-size region centered on the atomic coordinates serves as the local electron density map of the single residue and its vicinity.
[0070] In step S320, the single residue and the local electron density map in its vicinity are input into the segmentation model to be trained to obtain the single residue segmentation result of the training sample.
[0071] Specifically, in step S320, the size of the obtained single residue segmentation result is W*H*D*N, and each point on the corresponding electron density map has a probability vector of length N, indicating the probability that the point belongs to N amino acid categories.
[0072] In step S330, model parameters of the segmentation model are updated based on the segmentation result of the single residue and the amino acid type of the residue in the training sample.
[0073] Specifically, in step S330, based on the segmentation result of a single residue and the amino acid type mask map of the residue in the training sample, the training loss is calculated according to the loss function, and the parameter gradient is calculated to update the model parameters of the segmentation model.
[0074] More specifically, the amino acid type mask of the residue of the training sample is a value of 0 or 1 determined by the true value, while the segmentation result based on a single residue is composed of the probabilities of belonging to various categories obtained by the segmentation model, that is, each probability value is a floating point number between 0 and 1 after the model prediction. The calculation of the loss is based on both the true value and the probability value (see further embodiments described below).
[0075] The method 300 may further include: performing multiple iterations until the model converges, thereby constructing the segmentation model.
[0076] The deep learning model used in the present disclosure to train and construct the segmentation model is based on the UNet model. More specifically, the segmentation model is based on the nnUNet training framework.
[0077] It will be understood by those skilled in the art that by, for example Figure 3 The segmentation model obtained by this method can be used Figure 1 The protein side chain identification method shown in .
[0078] Specific example embodiments will be given below.
[0079] Algorithm Overview
[0080] The method disclosed in the present invention may include a data processing module, a segmentation module and a post-processing module from the perspective of the algorithm module. Figure 4 Schematic diagram of the algorithm. The data processing module generates data available to the segmentation module from the PDB file and the MTZ or MRC file, namely, the electron density map and its corresponding residue categories; the segmentation module uses the segmentation model to segment the electron density map to obtain the segmentation probability map, and then obtains the category mask based on the segmentation probability map; the post-processing module summarizes the segmentation results as the residue probability density distribution results.
[0081] Among them, the segmentation module is the core module of the algorithm, and the present disclosure selects UNet as the core network of this module. UNet is a U-shaped neural network. Since it was proposed in 2015, it has made great achievements in the field of image segmentation and has been widely used in the field of segmentation. It is one of the most widely used models in the current segmentation task. The backbone structure of UNet adopts an encoder-decoder structure. The left side of the U-shaped structure is the encoding part, and the right side is the decoding part. The left part of the U-shaped structure is the feature extraction network, which is responsible for extracting feature maps at different resolutions; the right part is the feature fusion network, which is responsible for fusing the feature information extracted at different resolutions together. UNet adopts an encoder-decoder structure, which can help the network better understand the semantic information of the image and achieve accurate segmentation while retaining the details of the image. UNet uses a skip-connection mechanism to connect feature maps of similar sizes in the encoder and decoder, which can help the network identify and retain details and local information in the image, thereby improving segmentation accuracy.
[0082] During engineering implementation, the present disclosure uses the nnUNet adaptive framework. This framework uses an automated hyperparameter tuning method to help the network find the optimal hyperparameter combination faster. Many highly effective strategies have been added during preprocessing, training, reasoning, and post-processing, which effectively avoid overfitting and have high accuracy and robustness. For example, data is sliced, resampled, and normalized during preprocessing; five-fold cross validation is used during training, and the loss function combines diceloss and cross entropy loss, and a data augmentation strategy is used during training; patch sampling is used during reasoning, and then the prediction results are integrated; connected domain analysis is used in post-processing to remove outliers.
[0083] Data processing module
[0084] The input of the data processing module is the PDB file and MTZ or MRC file of the protein, and the output is the electron density map of all residues in the protein and their corresponding residue categories. First, the electron density map of the entire protein is obtained from MRC; then, all C β A list of atomic coordinates, and a list of residue types; finally, for each C β The atomic coordinates and residue type pairs are extracted from the electron density map of the entire protein, with the C β The electron density submap in a fixed-size region centered on the atomic coordinates, together with the residue type, constitutes a data sample for segmentation.
[0085] Here, PDB is a file format used to store structural information of proteins and other biomolecules. PDB files are stored in text format and include a file header and atomic structure data records, which contain structural information such as atomic coordinates, connections, structural features, temperature factors, etc. of biomolecules.
[0086] MTZ and MRC are two file formats commonly used to store electron density three-dimensional image data. The former is mainly used to store reciprocal space data obtained by X-ray diffraction, and the latter can store low-resolution 3D density images, tomography images and other types of scientific data.
[0087] Segmentation Module
[0088] The segmentation model UNet is used in the segmentation module. As mentioned in the algorithm overview, UNet is a U-shaped neural network with a structure like Figure 5 As shown. UNet uses the method of downsampling first and then upsampling, so it can better extract and utilize features of different scales and improve the precision of segmentation. The backbone structure of UNet adopts an encoder-decoder structure. The left side of the U-shaped structure is the encoder part, and the right side is the decoder part. The encoder part is a feature extraction network, which is responsible for extracting feature maps at different resolutions; the decoder part is a feature fusion network, which is responsible for fusing the feature information extracted at different resolutions together. UNet adopts an encoder-decoder structure, which can help the network better understand the semantic information of the image and achieve accurate segmentation while retaining the details of the image. UNet uses a skip-connection mechanism to connect feature maps of similar sizes in the encoder and decoder, which can help the network identify and retain details and local information in the image, thereby improving segmentation accuracy.
[0089] The encoder part on the left side of the U-shaped structure is composed of multiple feature extraction modules. The feature extraction module extracts new feature maps from the input image. The feature extraction module is composed of multiple convolutional layers. There is a maximum pooling layer between the feature extraction modules to downsample the feature map. There are 5 feature extraction modules in the figure, and 5 feature maps of different scales will be obtained. The decoder part on the right side of the U-shaped structure corresponds to the encoder part and is composed of 5 feature fusion modules. There is an upsampling layer between the feature fusion modules. Unlike the feature extraction module on the left side, the input of the feature fusion module on the right side is composed of two parts. One part is the feature map of the corresponding scale obtained by the feature extraction module on the left side, and the other part is the feature map obtained by upsampling the feature map obtained by the previous feature fusion module. These two parts of the feature map are fused together as the input of the current feature fusion module. The last feature fusion layer passes through a 1*1 convolutional layer to obtain a segmentation result map. The number of channels of the segmentation result map is the number of residue types + 1. The segmentation result map records the probability of each pixel belonging to which residue category.
[0090] The input of the model is an electron density map containing residues, represented by a three-dimensional array; after model inference, a segmentation result map of the same size is obtained, represented by a four-dimensional array. For each pixel in the input electron density map, 20 probability values are obtained, corresponding to the probability that the pixel belongs to the background and 19 types of residues. Since glycine (GLY) has no residues, it is classified as background in the segmentation.
[0091] Post-processing module
[0092] Statistics are made for the categories of all points in the mask result map obtained by the segmentation module. The mask described here is initially a segmentation probability map obtained by the segmentation model, that is, corresponding to each pixel, it indicates the probability that the pixel belongs to N kinds of amino acids, and the value range is [0,1]. The final mask map obtained in the post-processing module is obtained by further calculating the probability map. Corresponding to each pixel, it indicates which of the N kinds of amino acids the pixel belongs to, and the value is 0 or 1, 0 means not belonging, 1 means belonging, and each pixel belongs to and only belongs to one category. Specifically, the further calculation here is to select the category corresponding to the maximum probability value as the category to which it belongs, and set the value to 1, and the values corresponding to other categories are set to 0. In this way, the category of each pixel point is determined, and subsequent category statistics can be performed.
[0093] In the category statistics, the points of the background category are first removed, and the number of points remaining after removal is S. Then the number of points belonging to the 19 residue categories is counted. i (i=1,2,…,19). Then the probability distribution of the category corresponding to the residue is
[0094] Model Training
[0095] The model training uses the nnUNet adaptive framework. This framework uses an automated hyperparameter tuning method to help the network find the optimal hyperparameter combination more quickly. Many highly effective strategies have been added during preprocessing, training, reasoning, and postprocessing, which can effectively avoid overfitting and have high accuracy and robustness. Five-fold cross-validation is used during training, and reasoning can use an integrated prediction strategy based on this; the loss function combines dice loss and cross-entropy loss, see formulas (1), (2), and (3) below; data augmentation strategies are used during training, including flipping, rotation, translation, β transformation, Gaussian noise, etc.
[0096] The training data of the model consists of two parts, one is the electron density submap of the residue, and the other is the residue type (true value) corresponding to the electron density submap. When selecting the training set, in order to ensure the balance of categories, residue samples can be selected in equal proportions, 10K for each residue, and a total of 190K residue samples.
[0097] The training process is as follows Figure 6 As shown, it can be summarized as follows:
[0098] 1. The electron density map is used as the input of the segmentation model (UNet), and the segmentation probability density map (including the probability density of the residue class or background class to which all pixels belong) is obtained through model prediction;
[0099] 2. According to the residue type and the atomic coordinates contained in the residue, the pixels within the ball with the radius R of the residue atom are marked as 1, and the remaining pixels are marked as 0, thus constructing the segmentation mask map (true value);
[0100] 3. According to the segmentation probability density distribution map (probability value with a value range of [0, 1]) and segmentation mask map (true value with a value of 0 or 1) predicted by the model, calculate the loss, loss L total It consists of two parts: block loss L dice + Cross Entropy Loss L CE , see the following formulas (1), (2), and (3). Where K represents the set of categories k, I represents the set of pixels i to be predicted in a batch, |I| = B*W*H*D, where B, W, H, and D represent the batch size, image width, height, and depth, respectively. The value of the category mask of the i-th pixel of the k-th category represents the true value, that is, whether the category of the i-th pixel is the k-th category, and the value is 0 or 1. represents the probability value predicted by the model for the i-th pixel of the k-th category, which represents the probability that the i-th pixel belongs to the k-th category, and the value range is [0, 1];
[0101] 4. Calculate the gradient of loss to model parameters and update the model parameters according to the gradient;
[0102] 5. After multiple iterations, the model converges.
[0103] L total =L dice +L CE (1)
[0104]
[0105]
[0106] The model training adopts the mini-batch stochastic gradient descent method and uses an exponential learning rate. The formula for how the learning rate changes with the number of iterations is shown in formula (4), where lr0 represents the initial learning rate, lr i Indicates the learning rate used in the i-th iteration, epoch max Indicates the maximum number of iterations. The exponent α is a hyperparameter used to adjust the decay rate. The recommended value is 0.9.
[0107]
[0108] The training dataset size is 190K samples, and the training is iterated for 1000 times (epoch). The training uses an A100 graphics card with 80G video memory and takes about 4 days.
[0109] Algorithm operation and preliminary verification results
[0110] The training environment for the above-mentioned deep segmentation model is a multi-GPU server, ideally configured with 8 GPU cards, each with 80GB of video memory, relying on the powerful floating-point computing capabilities of the GPU to accelerate the training process. After the training is completed, the model can be deployed to different environments, and the reasoning process after the model training is completed does not require particularly powerful computing power to achieve.
[0111] Currently, the algorithm can already identify the types of amino acid residues based on the electron density map. In the test samples, the average recall rate of 19 types of residues exceeds 90%. After excluding 4 types of residues with extremely high similarity, the average recall rate exceeds 95%. Typical segmentation results are as follows: Figure 7 shown.
[0112] Figure 7The segmentation results of two test samples are shown in , each of which has 4 sub-images. The sub-image in the lower left corner is the segmented residue 3D view, and the color represents the category of the residue. The other 3 sub-images are three views of the residue 3D electron density map. The color mask in the three views is the segmentation mask, and each color represents a residue. It should be noted that the mask mentioned here is slightly different from the mask described above. For example, if N colors are used to represent N types of amino acid residues, the value of the mask is [1, N]. That is, the vector of length N (N different probabilities) is replaced by the sequence number of the maximum value (the maximum value among the N values, that is, the maximum probability) (that is, an integer value from 1 to N). It still indicates the category to which the pixel belongs, but it has one less dimension than the mask described above, so one of the N categories can be directly represented by an integer value, instead of using a value of 0 or 1 to represent the belonging relationship of a specific residue type as in the mask described above. Figure (a) is ARG (arginine), Figure (b) is TRP (tryptophan), and Figure (c) is the segmentation result of a polypeptide chain, which contains multiple different types of amino acid residues, marked with different colors.
[0113] The recognition algorithm disclosed in the present disclosure can automatically, quickly and with high quality complete the recognition of residue types at residue sites in the electron density map, and can not only give the category of the residue, but also give the 3D shape of the residue, and at the same time give the probability that the residue belongs to each amino acid. The algorithm disclosed in the present disclosure can provide rich result information for practitioners in related fields, helping them to better understand protein electron density data. The algorithm disclosed in the present disclosure can be used as a basic tool in the field related to protein structure, for quickly parsing electron density maps, and improving the work efficiency and quality of related practitioners.
[0114] Compared with the prior art, the present invention achieves the following implementation effects:
[0115] 1. The algorithm used in the present disclosure uses a segmentation model to obtain a probability distribution of residue types, rather than just giving the category to which the residues belong, and is more informative.
[0116] 2. The algorithm used in the present disclosure can also give the 3D shape contour of the residue, which helps field experts to judge the rationality of the recognition results.
[0117] 3. The algorithm used in the present invention only uses the electron density map in a very small area around the residue to complete the recognition task. Compared with the overall segmentation of the entire electron density map of the protein, this has the following advantages: less GPU memory usage, smaller model size, and better segmentation effect.
[0118] 4. The algorithm used in the present disclosure has relatively low requirements on the resolution of the electron density map, and can be used for electron density maps with relatively low resolution or electron density maps generated by the generation algorithm.
[0119] In addition, those skilled in the art should also note the following differences between the present disclosure and the prior art:
[0120] 1. In the prior art, there may be protein segmentation algorithms that use UNet as the basic model, but there is no protein electron density segmentation algorithm model that uses nnUNet as the training framework; the basic model of the present disclosure is UNet, and the nnUNet training framework is used.
[0121] 2. In the prior art, an attention mechanism is generally added to the UNet basic model, but the implementation of the present disclosure does not rely on adding an attention mechanism to the UNet model.
[0122] 3. The prior art generally completes the segmentation learning of several tasks at the same time, such as training of protein secondary structure regions, amino acid residue types, and atomic categories, which means that the size of the segmentation input block at least includes a complete protein secondary structure, that is, the input block size is relatively large. And the segmentation objects corresponding to the three segmentation tasks are of different sizes, which will inevitably lead to poor segmentation accuracy of the model for small-scale objects. The segmentation model used in the present disclosure uses a single residue and its nearby local electron density block as input, and has a smaller physical size. When the size of the model input block is consistent, the resolution of the input block is higher, and thus the segmentation accuracy is higher.
[0123] 4. The output results of the prior art generally only include classification results, while the present disclosure emphasizes that the probability distribution results of different amino acid categories can be output. In addition, the algorithm of the present disclosure can give the 3D shape outline of the segmentation result, which helps field experts judge the rationality of the recognition result, which is not possible with the prior art.
[0124] 5. Among the modules used in the present disclosure, although the concepts of some modules are not innovative, the combination of modules and the application mode of combining modules with actual application scenarios are proposed for the first time in the present disclosure.
[0125] In summary, the present disclosure proposes a method for identifying the type of amino acid residues in proteins. This method only uses the local electron density map of the residues to obtain the type of amino acid residues, and still performs well on low-resolution electron density maps.
[0126] Those skilled in the art should understand that based on the protein side chain recognition method disclosed in the present invention, a protein side chain recognition system can be developed. Figure 88 is a schematic block diagram of a protein side chain recognition system according to an embodiment of the present disclosure. Specifically, the protein side chain recognition system 800 includes a data processing module 810 , a segmentation module 820 and a post-processing module 830 .
[0127] The segmentation module 820 is used to input the electron density map of the protein containing the residues into the segmentation model to obtain a single residue segmentation result.
[0128] The post-processing module 830 is used to identify the amino acid type of the single residue based on the single residue segmentation result.
[0129] Those skilled in the art should understand that the protein side chain recognition system described above can be implemented by a computer. For example, the following operations can be implemented by executing a computer program: processing protein data to obtain an electron density map of the protein containing the residue; inputting the electron density map of the protein containing the residue into a segmentation model to obtain a single residue segmentation result; based on the single residue segmentation result, identifying the amino acid type of the single residue.
[0130] That is to say, although in the protein side chain recognition system according to the present disclosure, the various operating functions corresponding to the protein side chain recognition method are described as modules or sub-modules, those skilled in the art should understand that such modules or sub-modules may be circuit components or other physical components, or may not be composed of circuit components or other physical components, but may be functional modules constructed by computer programs.
[0131] In addition, it should be recognized by those skilled in the art that the method of the present disclosure can be implemented as a computer program. As described above in conjunction with the accompanying drawings, the method of the above embodiment is executed by one or more programs, and the instructions in the program cause the computer or processor to execute the algorithm described in conjunction with the accompanying drawings. These programs can be stored and provided to the computer or processor using various types of non-transient computer-readable media. Non-transient computer-readable media include various types of tangible storage media. Examples of non-transient computer-readable media include magnetic recording media (such as floppy disks, tapes, and hard disk drives), magneto-optical recording media (such as magneto-optical disks), CD-ROMs (compact disk read-only memories), CD-Rs, CD-R / Ws, and semiconductor memories (such as ROMs, PROMs (programmable ROMs), EPROMs (erasable PROMs), flash ROMs, and RAMs (random access memories)). Further, these programs can be provided to the computer using various types of transient computer-readable media. Examples of transient computer-readable media include electrical signals, optical signals, and electromagnetic waves. Transient computer-readable media can be used to provide programs to the computer through wired communication paths or wireless communication paths such as wires and optical fibers.
[0132] For example, according to one embodiment of the present disclosure, a non-transitory computer-readable storage medium may be provided for storing a computer program, wherein the computer program includes instructions that, when executed by a processor of an electronic device, enable the electronic device to implement the protein side chain recognition method as described above.
[0133] In addition, according to the content disclosed in the present disclosure, a computer system can also be provided, the computer system comprising: a processor; a memory; and a computer program. The computer program is stored in the memory and is configured to be executed by the processor. The computer program includes instructions for implementing the protein side chain recognition method described above.
[0134] On the other hand, according to one embodiment of the present disclosure, a non-transitory computer-readable storage medium may be provided for storing a computer program, wherein the computer program includes instructions that, when executed by a processor of an electronic device, enable the electronic device to implement the method for constructing a segmentation model for protein side chain recognition as described above.
[0135] In addition, according to the content disclosed in the present disclosure, a computer system can also be provided, the computer system comprising: a processor; a memory; and a computer program. The computer program is stored in the memory and is configured to be executed by the processor. The computer program includes instructions for implementing the above-mentioned method for constructing a segmentation model for protein side chain recognition.
[0136] The implementation methods of the present disclosure are not limited to the above-mentioned embodiments. Without departing from the spirit and scope of the present disclosure, ordinary technicians in this field can make various changes and improvements to the present disclosure in form and details, and these are considered to fall within the protection scope of the present disclosure.
Claims
1. A method for identifying protein side chains, characterized in that: The method comprises: The electron density map of the protein containing the residues is input into the segmentation model to obtain the single residue segmentation results; Based on the single residue segmentation results, the amino acid type of the single residue is identified.
2. The method according to claim 1, characterized in that The protein electron density map containing residues includes a single residue and a local electron density map near the residue.
3. The method according to claim 1, characterized in that The method of identifying the amino acid type of a single residue based on the single residue segmentation result includes: Based on the single residue segmentation result, the probability distribution results of the single residue being different amino acid types are calculated.
4. The method according to claim 1, characterized in that: The segmentation model is based on the UNet model.
5. The method according to claim 4, characterized in that The segmentation model is based on the nnUNet training framework.
6. The method according to claim 1, characterized in that The single residue segmentation result includes the amino acid type identification result of each point on the electron density map.
7. The method according to claim 6, characterized in that The step of identifying the amino acid type of a single residue based on the single residue segmentation result further comprises: Based on the amino acid type recognition results of each point on the electron density map, the probability distribution results of different amino acid types within a single residue are calculated.
8. The method according to claim 1, characterized in that: The segmentation model is constructed by training through the following steps: Acquire a training set, wherein the training set includes a plurality of training samples, each training sample includes a single residue and a local electron density map near the residue and an amino acid type of the residue; Inputting the single residue and the local electron density map near it into the segmentation model to be trained to obtain the single residue segmentation result of the training sample; Based on the segmentation results of the single residues and the amino acid types of the residues in the training samples, model parameters of the segmentation model are updated.
9. The method according to claim 8, characterized in that The size of the local electron density map of a single residue and its vicinity is W*H*D, where W, H, and D represent the width, height, and depth of the map, respectively.
10. The method according to claim 9, characterized in that The acquisition of the training set further includes: an amino acid type mask map obtained by one-hot encoding according to the amino acid type of the residue, wherein the size of the amino acid type mask map is expressed as W*H*D*N, corresponding to each point on the electron density map, and each point has a vector of length N corresponding to N amino acids, and the N values of the vector correspond to whether each point belongs to one of the N amino acids. If it belongs to the amino acid, the value is 1, otherwise the value is 0.
11. The method according to claim 10, characterized in that The size of the single residue segmentation result is W*H*D*N, and each point on the corresponding electron density map has a probability vector of length N, which represents the probability that the point belongs to N amino acid categories.
12. The method according to claim 11, characterized in that The updating of the model parameters of the segmentation model based on the segmentation result of the single residue and the amino acid type of the residue in the training sample further comprises: Based on the segmentation results of the single residues and the amino acid type mask map of the residues in the training sample, the training loss is calculated according to the loss function, and the parameter gradient is calculated to update the model parameters of the segmentation model.
13. The method according to claim 8, characterized in that The obtaining of the training set comprises: Get the electron density map of the entire protein from MTZ or MRC files; Get all C in a protein from a PDB file β a list of atomic coordinates and a list of residue amino acid types; According to each C β The atomic coordinates and residue amino acid type pairs are extracted from the electron density map of the entire protein in C β The electron density submap in a fixed-size region centered on the atomic coordinates serves as the local electron density map of the single residue and its vicinity.
14. The method according to claim 8, characterized in that After multiple iterations, until the model converges, the segmentation model is constructed.
15. A method for constructing a segmentation model for protein side chain recognition, characterized in that: The method comprises: Acquire a training set, wherein the training set includes a plurality of training samples, each training sample includes a single residue and a local electron density map near the residue and an amino acid type of the residue; Inputting the single residue and the local electron density map near it into the segmentation model to be trained to obtain the single residue segmentation result of the training sample; Based on the segmentation results of the single residues and the amino acid types of the residues in the training samples, model parameters of the segmentation model are updated.
16. The method according to claim 15, characterized in that The size of the local electron density map of a single residue and its vicinity is W*H*D, where W, H, and D represent the width, height, and depth of the map, respectively.
17. The method according to claim 16, characterized in that The acquisition of the training set further includes: an amino acid type mask map obtained by one-hot encoding according to the amino acid type of the residue, wherein the size of the amino acid type mask map is expressed as W*H*D*N, corresponding to each point on the electron density map, and each point has a vector of length N corresponding to N amino acids, and the N values of the vector correspond to whether each point belongs to one of the N amino acids. If it belongs to the amino acid, the value is 1, otherwise the value is 0.
18. The method according to claim 17, characterized in that The size of the single residue segmentation result is W*H*D*N, and each point on the corresponding electron density map has a probability vector of length N, which represents the probability that the point belongs to N amino acid categories.
19. The method according to claim 18, characterized in that The updating of the model parameters of the segmentation model based on the segmentation result of the single residue and the amino acid type of the residue in the training sample further comprises: Based on the segmentation results of the single residues and the amino acid type mask map of the residues in the training sample, the training loss is calculated according to the loss function, and the parameter gradient is calculated to update the model parameters of the segmentation model.
20. The method according to claim 15, characterized in that The obtaining of the training set comprises: Get the electron density map of the entire protein from MTZ or MRC files; Get all C in a protein from a PDB file β a list of atomic coordinates and a list of residue amino acid types; According to each C β The atomic coordinates and residue amino acid type pairs are extracted from the electron density map of the entire protein in C β The electron density submap in a fixed-size region centered on the atomic coordinates serves as the local electron density map of the single residue and its vicinity.
21. The method according to claim 15, characterized in that The method further comprises: constructing the segmentation model through multiple iterations until the model converges.
22. The method according to claim 15, characterized in that The segmentation model is based on the UNet model.
23. The method according to claim 22, characterized in that The segmentation model is based on the nnUNet training framework.
24. A protein side chain recognition system, characterized in that: The system comprises: A data processing module, used for processing protein data to obtain an electron density map of the protein containing the residues; A segmentation module, which is used to input the electron density map of the protein containing the residues into the segmentation model to obtain a single residue segmentation result; A post-processing module is used to identify the amino acid type of a single residue based on the single residue segmentation result.
25. A protein side chain recognition system implemented by a computer, wherein the computer-implemented system implements the following operations by executing a computer program: The protein data are processed to obtain an electron density map of the protein containing the residues; The electron density map of the protein containing the residues is input into the segmentation model to obtain the single residue segmentation results; Based on the single residue segmentation results, the amino acid type of the single residue is identified.
26. A non-transitory computer-readable storage medium for storing a computer program, wherein the computer program includes instructions, which, when executed by a processor of an electronic device, causes the electronic device to implement the protein side chain recognition method as described in any one of claims 1 to 14 or the method for constructing a segmentation model for protein side chain recognition as described in any one of claims 15 to 23.
27. A computer system, comprising: processor; Memory; and A computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor, the computer program comprising instructions for implementing the protein side chain recognition method as described in any one of claims 1 to 14 or the method for constructing a segmentation model for protein side chain recognition as described in any one of claims 15 to 23.