A capsid protein-based virus recognition model construction method and system
By constructing a virus identification model based on capsid proteins and extracting multimodal features using pre-trained models and graph neural networks, the problem of high requirements for experimental environment and equipment in traditional virus identification methods is solved, enabling rapid and low-cost virus classification and identification, and improving the ability to identify emerging and mutated viruses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI AGRICULTURAL UNIVERSITY
- Filing Date
- 2025-11-07
- Publication Date
- 2026-07-07
AI Technical Summary
Traditional virus identification methods have high requirements for experimental environment and equipment, long cycle, and are difficult to identify new and highly variable viruses. Furthermore, classification methods based on viral genome and structural characteristics rely on the integrity of the database and the quality of the training set, have weak generalization ability, and single-dimensional feature extraction makes it difficult to classify distantly homologous proteins.
A virus recognition model based on capsid proteins was constructed. By acquiring capsid protein sequence data, a pre-trained protein language model was fine-tuned, and a message passing neural network was combined to generate structurally similar amino acid sequences to supplement the few-sample class data. Finally, a graph neural network was used to extract multimodal features, and sequence and structural features were fused for multi-level classification.
It enables rapid and low-cost virus classification, alleviates the requirements for experimental environment and equipment, improves the classification accuracy of small sample class data, reduces the difficulty of classifying distantly homologous proteins, and improves the efficiency of preliminary virus identification.
Smart Images

Figure CN121096417B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of virology and bioinformatics, specifically relating to a method and system for constructing a virus recognition model based on capsid proteins. Background Technology
[0002] Traditional biological methods for virus identification primarily rely on wet laboratory experiments, including virus isolation and culture, electron microscopy morphological identification, serological detection methods based on antigen-antibody specific reactions such as enzyme-linked immunosorbent assays (ELISA) and neutralization tests, and PCR-based virus identification methods based on virus-specific nucleic acid sequences. These methods often demonstrate high accuracy in virus identification and play a crucial role in disease prevention and treatment. However, they also have significant limitations: First, these methods typically require specialized biological laboratories, placing high demands on the experimental environment and equipment; wet laboratory experiments are also time-consuming and costly. Second, for emerging and highly variable viruses, existing serological reagents and PCR primers are often insufficient to match unknown or highly variable antigen and nucleic acid sequences, making virus isolation and culture even more challenging.
[0003] With the continuous expansion of viral genome and structural databases and the gradual development of bioinformatics, many virus classification methods based on viral genome and structural information have emerged, such as the sequence alignment technique BLAST, the structural alignment technique Foldseek, and machine learning and deep learning models using k-mer frequencies, genomic features, and structural features. Virus classification using these methods is usually automated, fast, and has low requirements for experimental environments, making it suitable for large-scale virus screening and discovery. However, these methods also have certain limitations: the alignment work is highly dependent on the completeness of existing alignment databases; if the target virus has no similar sequences or structures in the database, it is difficult to identify it. Secondly, single-dimensional feature extraction can easily lead to difficulties in classifying distantly homologous proteins. Furthermore, the performance of deep learning models trained based on viral genome and structural features depends on the quality of the training data; compared to pre-trained large models, their generalization and knowledge transfer capabilities are weaker. Summary of the Invention
[0004] Based on this, this invention proposes a method and system for constructing a virus identification model based on capsid proteins. Capsid protein sequence data and non-capsid protein sequence data are obtained from public databases and fed into a pre-trained protein language model for fine-tuning to achieve capsid protein identification. Automated web crawling technology and protein sequence deduplication tools are used to crawl and process capsid protein sequences with known structures from public databases. For the minority class data, a protein sequence design model based on message passing neural networks is used to generate diverse amino acid sequences with a certain similarity to the three-dimensional structure of a given protein. These sequences, along with the minority class sequences selected from the capsid protein sequence data, constitute supplementary data. AlphaFold2 is used to predict the three-dimensional structure of the supplementary data, thereby supplementing the minority class data and constructing a capsid protein dataset. The capsid protein dataset is then fed into a hybrid framework combining a pre-trained model and a graph neural network to extract sequence and structural features and perform multimodal feature fusion. The fused features are fed into a multi-classifier to achieve multi-level classification of capsid proteins, thereby realizing virus classification.
[0005] This invention is achieved through the following technical solution. A method for constructing a virus recognition model based on capsid proteins, comprising:
[0006] Collect capsid protein sequence data and non-capsid protein sequence data, construct a dataset, and train a capsid protein recognition model;
[0007] The sequences, structural information, and hierarchical classification information of capsid proteins with known structures were obtained. After screening and redundancy removal, a dataset of capsid proteins with known categories was obtained.
[0008] Identify the few-sample categories in the capsid protein dataset where the number of samples is below a preset threshold; for few-sample categories:
[0009] Structural information from a small number of sample classes is input into a protein sequence design model based on a message-passing neural network to generate amino acid sequences with structural similarity as supplementary data.
[0010] And / or, select sequence data corresponding to a small number of sample categories from the collected capsid protein sequence data as supplementary data;
[0011] The three-dimensional structure of sequences in the supplementary data is predicted using a protein structure prediction model and together with the corresponding classification information, they form a supplementary dataset of capsid proteins.
[0012] The capsid protein supplementary dataset and the capsid protein dataset are merged to form the final capsid protein dataset, which is used to train the capsid protein classification model.
[0013] Further preferred, the capsid protein recognition model includes a pre-trained protein language model and a classification head module. The query projection layer, bond projection layer, value projection layer and output projection layer of the multi-head attention mechanism in the protein language model encoder are replaced with a custom linear layer with LoRA mechanism, and the backbone parameters of the original protein language model are frozen. Fine-tuning is achieved through additive low-rank matrix and multiplicative scaling matrix.
[0014] Further optimization involved crawling capsid protein sequence data, structural information, and hierarchical classification information from the Viro3D database and processing them to obtain dataset 1; downloading capsid protein sequence data, structural information, and hierarchical classification information from the PDB database from the NCBI public database and processing them to obtain dataset 2; merging dataset 1 and dataset 2 to obtain a capsid protein dataset with known categories.
[0015] Further optimization involves the following specific process for generating structurally similar amino acid sequences using a protein sequence design model:
[0016] The structural information of the input few-sample class samples is parsed to obtain the atomic coordinate tensor and calculate the tensor representing the predicted position of the side chain atoms of the residues;
[0017] The geometric sensing features between each residue and its neighboring residues are obtained based on the atomic coordinate tensor.
[0018] An encoder that constructs a neighborhood graph structure and inputs it into a protein sequence design model is used. In the neighborhood graph structure, vertices represent each residue and edges represent the geometric perception features between each residue and its neighboring residues. The receptive field is expanded layer by layer through stacked multi-layer encoders and message passing mechanism to realize the layer-by-layer update of nodes and edges, allowing each residue to gradually learn its context in the three-dimensional structure, and finally outputting nodes and edges rich in geometric and topological features.
[0019] The autoregressive mask is constructed according to the decoding order, and the encoder output is organized to obtain the structural prior. In the autoregressive decoding stage, amino acid residues are generated cyclically position by position based on the neighboring residue index, neighboring edge features and structural prior.
[0020] Further optimization involves obtaining the geometric sensing features between each residue and its neighboring residues based on the atomic coordinate tensor as follows:
[0021] First, convert the Ca atom coordinate tensor A tensor transformation is performed, and the distances between Ca atoms in each residue are calculated. Based on a predefined nearest-neighbor residue count V, the V nearest neighbors to each residue are determined, resulting in a shape... Neighboring residue index tensor Then, a tensor D representing the Ca atom distances between each residue and its V neighboring residues is obtained. The neighboring residue distance values are then transformed into a Gaussian radial basis function with dimension D. The feature vectors are then obtained, and the distance feature vectors between the N, Ca, C, O, and Cb atoms of each residue and the N, Ca, C, O, and Cb atoms of their V neighboring residues are obtained in turn. The distance information between atoms in the sequence of the PDB file is then fused to obtain the geometric sense features between each residue and its neighboring residues.
[0022] Further optimization involves, in each encoder layer, the message passing mechanism including message acquisition, message construction, message aggregation, and node and edge updates; for each residue... First, collect the node features and corresponding edge features of all V neighboring residues, and then concatenate the node features and edge features to obtain the message; then... The node features are expanded by one dimension and V times to allow for feature splicing with V neighboring residues, resulting in a spliced structure containing residues. , The message aggregates all neighboring residues and corresponding edges; then, the spliced features are transformed linearly and nonlinearly using a multilayer perceptron, and the features of its V neighboring residues are further summed and aggregated to achieve message aggregation; finally, the node features are updated through residual connections, layer normalization and other steps, and the updated node features are propagated to the corresponding edges to achieve edge feature update.
[0023] Further preferably, in the autoregressive decoding stage, for each residue position to be generated, the neighboring residue index is obtained from the neighboring residue index tensor, and then the neighboring edge feature is obtained. The encoder outputs the structural prior at the residue position to be generated, and the generated neighboring residue sequence information and the neighboring edge feature are concatenated to obtain the mixed feature E1. The neighboring residue index, neighboring edge feature, structural prior, and mixed feature E1 of the residue position to be generated are passed into a sub-loop to achieve layer-by-layer update of node features through stacked multi-layer decoder layers. In each sub-loop, the node feature E0 of the current layer at the residue position to be generated is obtained from the decoder state list. The neighboring node features of the residue position to be generated in the current layer of the decoder state list are concatenated with the mixed feature E1 to obtain the mixed feature E2. The mixed feature E2 is combined with the autoregressive mask and then fused with the structural prior of the encoder output at the residue position to be generated to obtain the mixed feature E3. The mixed feature E3 is then combined with the node features. The updated features of the residue positions to be generated are passed to the current decoder layer and written into the state list of the next decoder layer. Finally, the state of the last hidden layer after multiple layers of message passing is mapped to 21 dimensions, weighted by probability, and randomly sampled to obtain the generated residues, and the generated sequence tensor is updated. .
[0024] Further preferably, the capsid protein classification model consists of a pre-trained protein language model, a multi-level, multi-scale convolutional architecture based on graph neural networks, and a classifier;
[0025] Sequence features were extracted from capsid protein sequence information using a pre-trained protein language model.
[0026] Structural features for extracting capsid protein structural information are extracted using a multi-level, multi-scale convolutional architecture based on graph neural networks.
[0027] Structural features and sequence features are fused to obtain fused features, which are then fed into a multi-classifier to classify capsid protein viruses.
[0028] Further preferably, the pre-trained protein language model includes an encoder module composed of multiple stacked encoders, and the output of each encoder layer will be used as the input of the next encoder layer; each encoder layer consists of two parts: first, a multi-head attention mechanism that introduces relative position information is used to capture the correlation between various positions of the amino acid sequence, and after residual connection operation, the features are nonlinearly transformed through the fully connected layer of the feedforward layer and the activation function.
[0029] Further optimization involves extracting structural features of capsid protein structure information based on a multi-level, multi-scale convolutional architecture using graph neural networks. This includes: for the structure of each capsid protein sequence, firstly, obtaining the residue-corresponding sequence from the PDB file. Residue sequence index and shape 3D coordinate tensor After the Geometric transformations and data augmentation operations yielded standardized three-dimensional coordinates. And after the A series of geometric transformations yields a shape of Tensors describing the local geometry of the protein backbone ;
[0030] Numbering sequence of residues An embedding operation is performed to map each residue to a high-dimensional vector. Then , , and The input consists of four stacked processing modules of different scales. Each processing module consists of two sub-modules. Each sub-processing module first compresses the high-dimensional input features to a smaller dimension through feature compression. After information aggregation, the original dimension is restored and the input features are fused through residual connections. Information aggregation is achieved through dynamic graph convolution operations.
[0031] The present invention also provides a virus recognition system based on capsid proteins, comprising:
[0032] The capsid protein recognition module stores the trained capsid protein recognition model for recognizing capsid proteins.
[0033] The capsid protein classification module stores the trained capsid protein classification model, which is used to classify capsid proteins.
[0034] This invention employs a fine-tuned large-scale model for capsid protein identification, combining various protein sequence and structure processing tools for dataset construction. It utilizes four innovative strategies: a protein sequence design model based on message-passing neural networks, a data augmentation strategy using AlphaFold2 to supplement few-sample class data, and a hybrid architecture combining pre-trained models and graph neural networks for protein multimodal feature extraction. This enables multi-level, multi-label classification of viruses. This invention overcomes the limitations of traditional wet laboratory virus identification, which requires high-quality experimental environments and equipment and involves long experimental cycles. It also alleviates the data imbalance problem caused by insufficient few-sample class data and the difficulty in classifying distantly homologous proteins due to single-dimensional feature extraction. This invention helps biologists and virologists improve the efficiency of preliminary virus identification, thereby advancing life sciences and contributing to disease prevention and control. Attached Figure Description
[0035] Figure 1 This invention provides a method and system flowchart for constructing a virus recognition model based on capsid proteins;
[0036] Figure 2 This is a diagram illustrating the overall framework of this method;
[0037] Figure 3 This is a graph showing the ability of the capsid protein recognition model in this invention to distinguish between various types of data.
[0038] Figure 4 This is a graph showing the predictive ability of the capsid protein classification model in this invention for labels at each level. Detailed Implementation
[0039] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0040] Reference Figure 1 A method for constructing a virus recognition model based on capsid proteins, comprising the following steps:
[0041] Step 1: Obtain capsid protein sequence data and non-capsid protein sequence data (including cellular proteins and non-capsid viral proteins) from public databases, construct a dataset, and train a capsid protein recognition model.
[0042] Step 2: Crawl capsid protein sequence data, structural information, and hierarchical classification information from the Viro3D database and process them to obtain dataset 1;
[0043] Step 3: Download capsid protein sequence data, structural information, and hierarchical classification information from the PDB database from the NCBI public database and process them to obtain dataset 2;
[0044] Step 4: Merge dataset 1 and dataset 2, and extract the minority class data with a sample size less than the specified threshold. Input the structural information of the minority class data into the protein sequence design model to generate amino acid sequences with structural similarity as supplementary data 1; select the sequence data corresponding to the minority class from the capsid protein sequence data as supplementary data 2.
[0045] Step 5: Use the protein structure prediction model to predict the three-dimensional structure of the sequences of Supplementary Data 1 and Supplementary Data 2, and combine them with the corresponding hierarchical classification information to form Data Set 3;
[0046] Step 6: Merge dataset 1, dataset 2, and dataset 3 to obtain the capsid protein dataset, which is used to train the capsid protein classification model.
[0047] In step one of this embodiment, refer to Figure 2 First, cellular protein sequences, including actin, tubulin, histones, and ATP synthase, were downloaded from the NCBI database. Non-capsid viral protein sequences, such as RdRp, envelope glycoproteins, spike proteins, and reverse transcriptase, were used as negative samples. Then, all capsid protein sequences were obtained as positive samples. The CD-HIT tool was used to remove redundancy from both negative and positive samples, thus constructing a dataset for fine-tuning the protein language model. The CD-HIT tool was used to determine the i-th capsid protein sequence. Does it belong to the first sequence clusters The specific execution process is as follows. First, the sequence of the i-th capsid protein is determined. With the sequence clusters Representative sequence How many have the same length? The subsequences are obtained, and the process is shown in formulas (1) and (2):
[0048] (1);
[0049] (2);
[0050] in, Represents protein sequence All lengths are The set of subsequences, This indicates that in protein sequence S, from the first... The position to the first Sequence segments at positions, Indicates the length of protein sequence S; Indicates the first Capsid protein sequence and The same length is The number of subsequences, Indicates the capsid protein sequence All lengths in The set of subsequences, Indicates the representative sequence All lengths in The set of subsequences. When When a certain preset threshold or density is reached, the two sequences are considered to be highly similar, and a local alignment procedure is initiated to calculate the capsid protein sequence through local alignment. and represent sequences The sequence similarity is used to determine the capsid protein sequence. If the sequence similarity is greater than the user-defined threshold, the capsid protein sequence is considered to be a capsid protein sequence. Belongs to sequence cluster .
[0051] The LoRA technique was used to efficiently fine-tune the parameters of a pre-trained protein language model. First, a ProtT5-XL-UniRef50 protein language model pre-trained on the UniRef50 dataset was loaded, and a classification head module containing a global average pooling layer, a non-linear activation layer, a fully connected layer, and an output layer was constructed. These two modules were then combined to build a capsid protein recognition model. The encoder of the protein language model consisted of a multi-head attention mechanism and a feedforward layer, both with residual connections, which were then normalized. Next, a custom LoRA linear layer with multiplicative scaling and additive low-rank matrices was defined. Then, LoRA was injected into the constructed binary classification model: the query projection layer Q, key projection layer K, value projection layer V, and output projection layer OT of the multi-head attention mechanism in the protein language model encoder were replaced with the custom linear layer with the LoRA mechanism. Finally, the backbone parameters of the original protein language model were frozen, and efficient fine-tuning of the capsid protein recognition model was achieved by updating the additive low-rank matrix and multiplicative scaling matrix. The LoRA fine-tuning process is shown in formula (3):
[0052] (3);
[0053] in, and These represent the modified and original linear layer weight matrices, respectively. Line 1 The value of the element in the column, and Let the ranks of the multiplicative scaling matrix and the additive low-rank matrix be represented respectively. and Let TA and TB, representing the factors constituting the multiplicative scaling matrix, respectively, be in the th... Line 1 The sum of the elements of the column in the first position Line 1 Column elements, and Let SA and SB represent the factors that constitute the additive low-rank matrix in the th order. Line 1 The sum of the elements of the column in the first position Line 1 The elements of the column.
[0054] Table 1
[0055]
[0056] Table 1 shows the experimental results of the capsid protein recognition model obtained by LoRA fine-tuning the protein language model for capsid protein recognition, which has high recognition accuracy.
[0057] Based on the latest version of the virus classification table published by the International Committee on Taxonomy of Viruses (ICCV), hierarchical classification information of virus domains, kingdoms, phyla, classes, orders, and families is obtained. In step two of this embodiment, automated web crawling technology is first used to obtain the record-id of capsid proteins, the genbank-id of their corresponding multi-proteins, protein-seq sequences, and the confidence scores (pLDDT) of predicted structures from the Viro3D database. The corresponding PDB files are then crawled to obtain structural information (three-dimensional structures). Next, capsid proteins with a pLDDT confidence score greater than 70 are selected, and hierarchical classification information is obtained from the NCBI database based on their corresponding multi-protein genbank-ids. This information is then combined with the latest version of the virus classification table published by the ICCV to determine their labels at the domain, kingdom, phylum, class, order, and family levels, thus obtaining dataset 1.
[0058] In step three of this embodiment, capsid protein sequence data from the PDB database is first retrieved from the NCBI database. Then, the CD-HIT tool is used to remove redundancy from all retrieved capsid protein sequences based on a 99.99% similarity threshold, resulting in deduplicated capsid protein sequences. Next, the hierarchical classification information corresponding to the deduplicated capsid protein sequences is obtained from the NCBI database, and its label at the domain, kingdom, phylum, class, order, and family levels is determined using the latest version of the virus classification table published by the International Committee on Taxonomy of Viruses. Then, based on its retrieval number (PDB-id), the CIF file of the corresponding protein multimer is crawled from the PDB data, and the corresponding capsid protein sequence is extracted from the CIF file, converted into a PDB file to obtain structural information, thus obtaining dataset 2.
[0059] In step four of this embodiment, dataset 1 and dataset 2 are merged, and the number of samples for each label at the category level is calculated. When the number of samples is less than a predetermined threshold, the category is considered a minority category. Next, the PDB files (containing structural information) corresponding to the minority category data in datasets 1 and 2 are input into a protein sequence design model based on a message-passing neural network to generate diverse amino acid sequences that have a certain similarity to the given protein's three-dimensional structure. The specific sequence generation process is as follows.
[0060] First, the incoming PDB file is parsed and processed. The atomic coordinates named N, Ca, C, and O on the capsid protein backbone and their corresponding amino acid names are read, resulting in a file of length [length missing]. tensor and a shape of The coordinate tensor T, coordinate tensor elements in , , These represent the sequence number of the capsid protein. The residue of the first One main chain atom in , , Coordinate information in three dimensions , The format is as follows:
[0061] .
[0062] in This indicates the length of the capsid protein sequence in the PDB file. Used to record amino acid sequences They are the first The numerical codes corresponding to each residue are extracted. The data with indices 0, 1, 2, and 3 in the second dimension all have shapes. The N-atom coordinate tensor of all residues in the capsid protein sequence Ca atomic coordinate tensor C atomic coordinate tensor and O atom coordinate tensor Furthermore, a tensor representing the predicted positions of the residue side chain atoms is obtained through coordinate tensor calculation. .
[0063] The next step is to construct the protein's geometry-aware features. First, the Ca atom coordinate tensor... A tensor transformation is performed, and the distances between Ca atoms in each residue are calculated. Based on a predefined nearest-neighbor residue count V, the V nearest neighbors to each residue are determined, resulting in a shape... Neighboring residue index tensor , Each element Let represent the index of the q-th neighboring residue of the p-th residue. Then, we obtain a tensor D representing the interatomic distances of each residue to its V neighboring residues, where the elements in D... Let represent the distance between the Ca atom of the p-th residue and the Ca atom of the q-th neighboring residue, and its calculation process is shown in formula (4):
[0064] (4);
[0065] in It is the difference between the Ca atoms of the p-th residue and its q-th neighboring residue in the c-th coordinate direction. This is a very small constant used to ensure numerical stability. Furthermore, the Gaussian radial basis function is used to transform the neighbor residue distance values into a dimension of... eigenvectors, where This is the number of Gaussian kernels, and the specific calculation process is shown in formula (5):
[0066] (5);
[0067] in This represents the response value of the Ca atom distance between the p-th residue and its q-th neighboring residue under the g-th Gaussian kernel. This represents the first and smallest Gaussian kernel center value. This represents the last and largest Gaussian kernel center value. Next, the distance feature vectors of the N, Ca, C, O, and Cb atoms of each residue and their V neighboring residues' N, Ca, C, O, and Cb atoms are sequentially obtained, and then fused with the distance information between atoms in the sequence of the PDB file to obtain the geometrically sensed features between each residue and its neighboring residues.
[0068] The next step is to construct a neighborhood graph structure and input it into the encoder of the protein sequence design model. In the neighborhood graph structure, vertices represent individual residues, initially without storing any valid information, while edges represent the geometrically perceptual features between each residue and its neighboring residues. The encoder receives the node features, edge features, and neighboring residue indices for each residue. Through stacked multi-layer encoders and a message-passing mechanism, the receptive field is expanded layer by layer, enabling the progressive updating of nodes and edges. This allows each residue to gradually learn its context within the three-dimensional structure, ultimately outputting nodes and edges rich in geometric and topological features. Within each encoder layer, the message-passing process includes message acquisition, message construction, message aggregation, and updating of nodes and edges. For each residue… First, collect the node features and corresponding edge features of all V neighboring residues, and then concatenate the node features and edge features to obtain the message; then... The node features are expanded by one dimension and V times to allow for feature splicing with V neighboring residues, resulting in a spliced structure containing residues. , The message aggregates all neighboring residues and corresponding edges; then, the spliced features are transformed linearly and nonlinearly using a multilayer perceptron, and the features of its V neighboring residues are further summed and aggregated to achieve message aggregation; finally, the node features are updated through residual connections, layer normalization and other steps, and the updated node features are propagated to the corresponding edges to achieve edge feature update.
[0069] The next step is to construct an autoregressive mask based on the decoding order and organize the encoder output to obtain the structural prior. First, the randomly generated numbers at each position are sorted by size to obtain a list of position indices for the generation order. After one-hot encoding, the generated shape is The tensor TT reflects the temporal generation order, and the elements in TT Indicates the first The position generated in the first step. Then, TT is further transformed into a shape as... The dependency tensor TA reflects the order of generation in the space, and the elements in TA... Indicates whether the th residue can be seen when the th residue is generated at the th position. The generation sequence information of each residue reflects the generation dependency. This is then mapped onto a neighborhood graph, generating a shape... Proximity dependency tensor , elements in This indicates whether the generation sequence information of the q-th neighboring residue can be seen when a residue is generated at position p, thus constructing an autoregressive mask. and , and These represent the prior structural positions that can be obtained through residue generation and the positions of neighboring residues that have already been generated, respectively. Finally, the encoder output is processed, and the global structural features of the protein are obtained by concatenating the node features and corresponding edge features of each residue's neighboring residues, combined with an autoregressive mask. We obtain the structural priors for the autoregressive decoding stage.
[0070] The final step is the autoregressive decoding stage, which generates residues position by position through a loop. The generation principle is shown in formula (6):
[0071] (6);
[0072] in This indicates that in a given protein three-dimensional structure Generate amino acid sequence The probability, This indicates that in a given protein three-dimensional structure and the already generated first At residue , the first residue is generated. residues The probability, Representing amino acid sequences The generated first 4 residues. The autoregressive decoding stage first constructs a decoder state list of length 4. and shape Generated sequence tensor Where dim is the embedding dimension and the decoder state list The system stores the initial node features input to the decoder and the output node features of the first, second, and third layer encoders. Store the embedding vectors of the currently generated residues. For each residue position to be generated... From the neighboring residue index tensor Obtain the index of its neighboring residues, then obtain the neighboring edge features, and the encoder outputs the position of the residue to be generated. The structure prior on the top, and splicing from The obtained generated neighboring residue sequence information and neighboring edge features yield a mixed feature E1, which is used to determine the position of the residue to be generated. The neighboring residue index, neighboring edge features, structural priors, and hybrid features E1 are passed to a sub-loop to update the node features layer by layer through stacked multi-layer decoders. In each sub-loop, the decoder state list is obtained. The current layer at the location of residues to be generated The node feature E0 on the concatenation decoder state list The location of residues to be generated in the current layer The neighboring node features and the mixed feature E1 are combined to obtain the mixed feature E2. The mixed feature E2 is then combined with the autoregressive mask. The refusion encoder output at the position of the residue to be generated The structure prior yields the hybrid feature E3. This hybrid feature E3, along with the node feature E0, is then fed into the decoder of the current layer to obtain the updated positions of the residues to be generated. The node features are then written into the list of residues to be generated in the next decoder state. Finally, the state of the last hidden layer after multiple layers of message passing is linearly transformed and normalized to be mapped onto 21 dimensions. After probability weighting and random sampling, the generated residues are obtained, and the generated sequence tensor is updated. Thus, supplementary data 1 was obtained.
[0073] Next, obtain the hierarchical classification information of the deredundant capsid protein sequence from the NCBI database, and obtain the hierarchical labels of the sequence by combining the latest version of the virus classification table. Select a small number of sample categories and obtain supplementary data 2.
[0074] In step five of this embodiment, Alphafold2 is used to predict the three-dimensional structure of the supplementary amino acid sequence, thereby obtaining structural information, which, together with the tag information of the corresponding sequence data at the domain, kingdom, phylum, class, order, and family levels, constitutes dataset 3.
[0075] In step six of this embodiment, dataset 1, dataset 2 and dataset 3 are first merged to obtain the final capsid protein dataset, which is then further divided into training set, validation set and test set for training and testing the capsid protein classification model.
[0076] Data preprocessing is performed to generate the necessary sequence and structural information. For the amino acid sequence of each capsid protein: first, invalid characters in the amino acid sequence are converted into special markers, then all are converted to uppercase letters and concatenated with spaces to form a string. Next, the pre-trained protein language model ProtT5's word segmenter is loaded to process the capsid protein sequence, returning a dictionary-like sequence of residue numbers padded to the same length. and its corresponding mask For the structure of each capsid protein sequence: first, obtain the residue-corresponding sequence from the PDB file. Residue sequence index and shape 3D coordinate tensor After the A series of geometric transformations and data augmentation operations yielded standardized 3D coordinates for model input. And after the A series of geometric transformations yields a shape of Tensors describing the local geometry of the protein backbone This allows us to obtain the capsid protein sequence and structural information of the input model.
[0077] The next step is to extract sequence features from the capsid protein sequence using the pre-trained protein language model ProtT5-XL-UniRef50. First, the encoder portion of ProtT5-XL-UniRef50 is loaded and all parameters are frozen. The data obtained during the preprocessing stage is then processed. and It is passed into it. Then... Each residue's corresponding index is mapped to a high-dimensional vector, which is then passed to an encoder module composed of multiple stacked encoders for iterative traversal. The output of each layer serves as the input to the next. Each encoder layer consists of two parts: first, a multi-head attention mechanism that incorporates relative positional information captures the positional correlations of the amino acid sequence; after operations such as residual connections, the features are nonlinearly transformed using a fully connected feedforward layer and an activation function to enhance the model's expressive power. The relative positional encoding method is as follows: in the first encoder layer, the relative distance between two residues is calculated and mapped to a finite number of distance buckets, and then passed through a vector of shape... The embedded layer looks up a table to generate the shape as The bias matrix is divided more finely as the distances are closer and more sparsely as the distances are farther. Indicates the number of buckets away. Indicates the length of the filled amino acid sequence. This represents the number of attention heads. Each attention head will have a different bias value for the same relative distance, and this bias value is passed to the subsequent encoder for reuse. This bias value is added to the attention score to enable the model to better learn long-distance and short-distance dependencies between residues. The specific calculation process is shown in formula (7):
[0078] (7);
[0079] in Indicates the first The attention vector of the i-th residue in the attention head, where L' represents the length of the padded amino acid sequence. and Representing the i-th and i-th respectively The feature vector of each residue, , and They represent the first A query with attention heads, a weight matrix of keys and values, Indicates the first The i-th residue and the i-th residue in the bias matrix of the attention head The bias term value corresponding to the distance between residues is then taken. The output of the last encoder layer, after being normalized without subtracting the mean and without bias terms, and only through scaling control, outputs the final hidden state representing the amino acid sequence context awareness. The layer normalization process is shown in formula (8):
[0080] (8);
[0081] in express The Middle The residue in the corresponding feature vector The value of each component Indicates the output of the last encoder layer. The residue in the corresponding feature vector The value of each component Indicates the size of the feature dimension. It is a very small constant. The weight matrix represents the weight matrix at the th... The values of each component are then used. Finally, average pooling is performed on the feature vector of each amino acid sequence to obtain the final sequence features.
[0082] The next step is to utilize a multi-level, multi-scale convolutional architecture based on graph neural networks to extract structural features of capsid protein structure information. Firstly, [the text abruptly ends here]. An embedding operation is performed to map each residue to a high-dimensional vector. Then , , and Four stacked processing modules at different scales are input, each consisting of two sub-modules. These modules capture local structural features by aggregating features from surrounding residues within a certain spatial range and progressively expanding the receptive field to achieve hierarchical modeling across multiple scales. Each sub-processing module first compresses the high-dimensional input features to a smaller dimension, then restores the original dimension after information aggregation and fuses the input features through residual connections. Information aggregation is achieved through dynamic graph convolution operations, specifically as follows:
[0083] 1. Based on the given spatial radius Search in All neighboring residues within the range are used to construct a graph structure, where vertices represent residues, edges represent the message passing directions between residues and their neighboring residues, and residues and themselves.
[0084] 2. By obtaining the standardized three-dimensional coordinates, local geometric information and residue order index of the residues represented by the nodes at both ends of the edge, calculate the relative direction, directional similarity, relative spatial distance and relative sequence distance between the two residues, and concatenate the features representing the relative direction, directional similarity and relative spatial distance in the local coordinate system to form a vector describing the spatial relationship between the two residues, and generate the convolution weight matrix w of the edge between the two residues based on this vector and the relative sequence distance.
[0085] 3. A smoothing coefficient is introduced to reduce the influence between neighboring residues that are relatively far apart in sequence or spatial distance. The specific calculation process is shown in formulas (9) and (10):
[0086] (9) ;
[0087] (10);
[0088] in, For the s-th residue and the s-th residue The smoothing coefficient between residues, where e is the natural constant. As an intermediate variable, To convert the input tensor Each element is restricted to a range. And a function that returns the result to a new tensor. and It is a constant. sr and sr are the specified spatial radius and sequence radius, respectively. Indicates according to The spatial distance between the s-th residue and the t-th residue is obtained. This represents the sequence distance between the s-th residue and the t-th residue obtained from TL after a truncation operation.
[0089] 4. Features of neighboring residues (such as...) are analyzed using the convolution weight matrix. Figure 2 The features of the first neighboring residue (c1), the second neighboring residue (c2), and the third neighboring residue (c3) are weighted, summed, and aggregated to generate a message (c) sent to the central residue. This achieves feature extraction of the local structure. Next, after the processing module at each scale is completed, adjacent residue nodes are merged: the TL is divided by 2 and rounded down so that adjacent residues have the same "group number." Furthermore, boundary virtual nodes are introduced, and adjacent residues are compared bit-by-bit, transforming the TL into a continuous grouping index starting from 0. and Take the average of the groups, for The average value of each group is taken and normalized, then the TLs are merged pairwise to generate a new graph structure feature with half the number of nodes. Finally, the last processing module... The output is subjected to global average pooling to obtain a graph-level representation of the input protein structure features, which is then fused with the sequence features through vector concatenation to obtain fused features.
[0090] In step six of this embodiment, the capsid protein classification model also includes a classifier. The classifier uses a multilayer perceptron. First, a multilayer perceptron is constructed to map the results to the domain, kingdom, phylum, class, order, and family levels, respectively. Then, the number of label categories at each level is obtained. , These are the number of label categories at the domain, kingdom, phylum, class, order, and family levels, respectively. The fused features are then fed into multiple multilayer perceptrons and mapped to... The prediction results are obtained on various labels at each classification level. When the labels at each level are consistent, the prediction is considered reliable.
[0091] Table 2
[0092]
[0093] Table 2 shows the experimental results of the capsid protein classification model in this invention on the test set. As shown in Table 2, the capsid protein classification model has high accuracy, precision, recall and F1 score for the task of predicting the category labels of capsid proteins at the domain, kingdom, phylum, class, order and family levels.
[0094] Table 3
[0095]
[0096] Table 3 shows the experimental results at the object level of the capsid protein classification model of this invention compared with other models. As shown in Table 3, the ablation comparison experiment demonstrates that the capsid protein classification model trained in this invention has superior classification performance.
[0097] Figure 3 This is a graph showing the ability of the capsid protein recognition model in this invention to distinguish between various types of data. It illustrates the result of reducing the high-dimensional vector generated by the capsid protein recognition model from sequence data to a low-dimensional space. Label 0 and label 1 represent non-capsid protein sequences and capsid protein sequences, respectively. The two types of samples show a clear clustering and separation trend in the graph, indicating that the capsid protein recognition model has a good ability to identify capsid protein sequences.
[0098] Figure 4This is a graph showing the predictive ability of the capsid protein classification model in this invention for labels at various levels. It illustrates the logits distribution of the model's predictions of the true categories at different levels (domain, kingdom, phylum, class, order, family). For the domain and kingdom levels, the predictive ability for all categories is displayed; for the phylum, class, order, and family levels, labels for 10 categories are randomly displayed. Figure 4 It can be seen that the logits distribution of most labels at various levels shows high concentration and discriminative power, indicating that the model has good performance in hierarchical classification tasks.
[0099] Another embodiment of the present invention provides a virus recognition system based on capsid proteins, comprising:
[0100] The capsid protein recognition module stores the trained capsid protein recognition model for recognizing capsid proteins.
[0101] The capsid protein classification module stores the trained capsid protein classification model, which is used to classify capsid proteins.
[0102] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for constructing a virus recognition model based on capsid proteins, characterized in that, include: Capsid protein sequence data and non-capsid protein sequence data were collected to construct a dataset and train a capsid protein recognition model. The capsid protein recognition model includes a pre-trained protein language model I and a classification head module. The query projection layer, bond projection layer, value projection layer, and output projection layer of the multi-head attention mechanism in the protein language model encoder were replaced with a custom linear layer with a LoRA mechanism. The backbone parameters of the original protein language model were frozen, and fine-tuning was achieved through additive low-rank matrices and multiplicative scaling matrices, as shown in the following equation: ; in, and These represent the modified and original linear layer weight matrices, respectively. Line 1 The value of the element in the column, and Let the ranks of the multiplicative scaling matrix and the additive low-rank matrix be represented respectively. and Let TA and TB, representing the factors constituting the multiplicative scaling matrix, respectively, be in the th... Line 1 The sum of the elements of the column in the first position Line 1 Column elements, and Let SA and SB represent the factors that constitute the additive low-rank matrix in the th order. Line 1 The sum of the elements of the column in the first position Line 1 Column elements; Dataset 1 was obtained by crawling capsid protein sequence data, structural information, and hierarchical classification information from the Viro3D database and processing them. Dataset 2 was obtained by downloading capsid protein sequence data, structural information, and hierarchical classification information from the PDB database from the NCBI public database and processing them. Datasets 1 and 2 are merged, and data of the minority class with a sample size less than a specified threshold are extracted. The structural information of the minority class data is input into a protein sequence design model based on a message-passing neural network to generate amino acid sequences with structural similarity as supplementary data 1. Sequence data corresponding to the minority class are selected from the capsid protein sequence data as supplementary data 2. The protein structure prediction model is used to predict the three-dimensional structure of the sequences of Supplementary Data 1 and Supplementary Data 2, which together with the corresponding hierarchical classification information constitute Data Set 3. Merge datasets 1, 2, and 3 to obtain the capsid protein dataset, which is used to train the capsid protein classification model.
2. The method according to claim 1, characterized in that, The specific process of generating structurally similar amino acid sequences using a protein sequence design model is as follows: The structural information of the input few-sample class samples is parsed to obtain the atomic coordinate tensor and calculate the tensor representing the predicted position of the side chain atoms of the residues; The geometric sensing features between each residue and its neighboring residues are obtained based on the atomic coordinate tensor. An encoder that constructs a neighborhood graph structure and inputs it into a protein sequence design model is used. In the neighborhood graph structure, vertices represent each residue and edges represent the geometric perception features between each residue and its neighboring residues. The receptive field is expanded layer by layer through stacked multi-layer encoders and message passing mechanism to realize the layer-by-layer update of nodes and edges, allowing each residue to gradually learn its context in the three-dimensional structure, and finally outputting nodes and edges rich in geometric and topological features. The structure prior is obtained by constructing an autoregressive mask based on the decoding order and organizing the encoder output; In the autoregressive decoding stage, amino acid residues are generated cyclically position by position based on the neighboring residue index, neighboring edge features, and structural priors.
3. The method according to claim 2, characterized in that, In the autoregressive decoding stage, for each residue position to be generated, the neighboring residue index is obtained from the neighboring residue index tensor, and then the neighboring edge feature is obtained. The encoder outputs the structural prior at the residue position to be generated, and splices the generated neighboring residue sequence information and the neighboring edge feature to obtain the hybrid feature E1. The neighboring residue index, neighboring edge feature, structural prior and hybrid feature E1 of the residue position to be generated are passed into a sub-loop to realize the layer-by-layer update of node features through stacked multi-layer decoders. In each sub-loop, the node feature E0 of the current layer at the position of the residue to be generated is obtained from the decoder state list. The neighboring node features of the position of the residue to be generated in the current layer are concatenated with the mixed feature E1 to obtain the mixed feature E2. The mixed feature E2 is combined with the structural prior of the encoder output at the position of the residue to be generated by the autoregressive mask and then fused to obtain the mixed feature E3. The mixed feature E3 and the node feature E0 are passed to the decoder of the current layer to obtain the updated node features of the position of the residue to be generated and written into the position of the residue to be generated in the next decoder state list. Finally, the state of the last hidden layer after multiple layers of message passing is mapped to 21 dimensions, and the generated residue is obtained by probability weighting and random sampling, and the generated sequence tensor is updated.
4. The method according to claim 1, characterized in that, The capsid protein classification model consists of a pre-trained protein language model II, a multi-level, multi-scale convolutional architecture based on graph neural networks, and a classifier. Sequence features were extracted from capsid protein sequence information using a pre-trained protein language model II. Structural features for extracting capsid protein structural information are extracted using a multi-level, multi-scale convolutional architecture based on graph neural networks. Structural features and sequence features are fused to obtain fused features, which are then fed into a multi-classifier to classify capsid protein viruses.
5. The method according to claim 4, characterized in that, The pre-trained protein language model II includes an encoder module composed of multiple stacked encoders. The output of each encoder layer will serve as the input of the next encoder layer. Each encoder layer consists of two parts: first, a multi-head attention mechanism that introduces relative position information is used to capture the correlation between various positions of the amino acid sequence; after residual connection operation, the features are nonlinearly transformed through a fully connected layer of the feedforward layer and an activation function. The relative position encoding method is as follows: In the first layer encoder, the relative distance value between two residues is calculated and mapped to a finite number of distance buckets, and then encoded through a shape of... The embedded layer looks up a table to generate the shape as The bias matrix, where Indicates the number of buckets away. Indicates the length of the filled amino acid sequence. This indicates the number of heads of attention.
6. The method according to claim 4, characterized in that, Structural features for extracting capsid protein structural information based on a multi-level, multi-scale convolutional architecture using graph neural networks include: for the structure of each capsid protein sequence: first, obtaining the residue-corresponding sequence from the PDB file. Residue sequence index and shape 3D coordinate tensor After the Geometric transformations and data augmentation operations yielded standardized three-dimensional coordinates. And after the A series of geometric transformations yields a shape of Tensors describing the local geometry of the protein backbone ; Numbering sequence of residues An embedding operation is performed to map each residue to a high-dimensional vector. Then , , and The input consists of four stacked processing modules of different scales. Each processing module is composed of two sub-modules. Each sub-processing module first compresses the high-dimensional input features to a smaller dimension through feature compression. After information aggregation, the original dimension is restored and the input features are fused through residual connections. Information aggregation is achieved through dynamic graph convolution operations. The dynamic graph convolution operation includes: finding all neighboring residues within a given spatial radius to construct a graph structure; obtaining the normalized three-dimensional coordinates, local geometric information, and residue order index of the residues represented by the nodes at both ends of the edge; calculating the relative direction, directional similarity, relative spatial distance, and relative sequence distance between two residues; concatenating the features representing the relative direction, directional similarity, and relative spatial distance in the local coordinate system into a vector describing the spatial relationship between the two residues; generating a convolution weight matrix for the edge between the two residues based on this vector and the relative sequence distance; introducing a smoothing coefficient to reduce the influence between neighboring residues with large relative sequence distances or relative spatial distances; and weighting and summing the features of neighboring residues using the convolution weight matrix to generate a message sent to the central residue. After each scale of processing module is completed, adjacent residue nodes are merged: residue order indexing. Dividing by 2 and rounding down ensures that adjacent residues have the same group number. Further, by introducing boundary virtual nodes and comparing adjacent residues position by position, the TL is transformed into a continuous grouping index starting from 0. and Take the average of the groups, for The average value of each group is taken and normalized. Then, the TLs are merged in pairs to generate a new graph structure feature with half the number of nodes.
7. A virus recognition system based on capsid proteins, characterized in that, include: The capsid protein recognition module stores the trained capsid protein recognition model for recognizing capsid proteins. The capsid protein classification module stores a capsid protein classification model trained according to any one of claims 1-6, and is used to classify capsid proteins.
Citation Information
Patent Citations
Immunogen prediction system and method based on protein three-dimensional structure and graph neural network
CN116206676A
Global function domain introduced Cas protein classification method and system
CN120340624A