A method, system, device and medium for predicting HIV genotype drug resistance
By constructing an HIV genotype drug resistance prediction model, using the one-hot encoding and PSSM matrix features of the B subtype and non-B subtype data sets, combined with the convolutional neural network and the fusion module, the problem of inaccurate prediction of non-B subtype data in the existing technology is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202410930511.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-07-11
AI Technical Summary
The prediction of resistance to non-B subtype genes in existing HIV genotype resistance assays is not accurate enough, resulting in a bias in the accuracy of the results when applied to non-B subtype data.
By obtaining the B subtype and non-B subtype data sets, one-hot encoding and PSSM matrix calculations are performed, the basic prediction model is trained using convolutional neural networks, and the HIV genotype resistance prediction model is constructed through the fusion module to improve the prediction accuracy of non-B subtype data.
The accuracy of HIV genotype resistance prediction model for B subtype and non-B subtype gene sequences is improved, and the problem of inaccurate prediction of non-B subtype data in the prior art is solved.
Smart Images

Figure CN118866125B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological information data processing, and in particular to a method, system, equipment and medium for predicting HIV genotype drug resistance. Background Art
[0002] Highly active antiretroviral therapy (HAAT) is one of the most effective methods for preventing and treating AIDS. It can not only significantly reduce the mortality rate of AIDS and improve the quality of life of patients, but also reduce the infectiousness of AIDS. However, as the scope of use of antiviral drugs continues to expand, the drug resistance of AIDS patients receiving treatment has increased due to various factors such as different medication compliance and antiviral medication regimens, and the spread of drug-resistant strains will lead to an increase in mortality. Therefore, conducting HIV drug resistance analysis on AIDS patients can help them develop the best antiviral treatment plan before antiviral treatment, or replace antiviral drugs in a timely manner.
[0003] At present, the methods for HIV drug resistance analysis mainly include phenotypic drug resistance test analysis and genotypic drug resistance detection. However, phenotypic drug resistance test requires in vitro culture of the virus, which takes a long time, is complicated and expensive; while genotypic drug resistance detection is to sequence the gene sequence of the patient's pol region, and then perform drug resistance interpretation analysis. Its rapid and accurate characteristics make it increasingly an important means of guiding clinical drug selection.
[0004] The main HIV genotype resistance interpretation system at present is HIVdb Program (HIV-1 resistance genotype detection data analysis and interpretation system developed by Stanford University in the United States). However, since HIVdb Program is mainly developed based on HIV B subtypes, when applied to non-B subtype data, the accuracy of its results has a certain deviation. The phenotypic resistance data of non-B subtypes is much smaller than that of B subtypes, and due to the small amount of non-B subtype data, it is impossible to train a model for it alone. Therefore, it is urgent to develop a method, system, equipment and medium for predicting HIV genotype resistance, which can be applied to the prediction of resistance of B subtypes and non-B subtypes, and improve the accuracy of application to non-B subtype data. Summary of the invention
[0005] In view of the problem that the drug resistance prediction of non-B subtype genes in existing genotype drug resistance detection is not accurate enough, the present invention provides a method, system, device and medium for predicting HIV genotype drug resistance.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0007] In a first aspect, the present invention provides a method for predicting HIV genotype drug resistance, comprising:
[0008] Obtain a subtype B data set and a non-subtype B data set; both the subtype B data set and the non-subtype B data set include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant;
[0009] One-hot encoding is performed on the amino acid sequences in the B subtype data set and the non-B subtype data set to obtain an m×n 0-1 matrix, and a first basic prediction model is trained based on a first convolutional neural network using the 0-1 matrix corresponding to the B subtype data set, and the first basic prediction model is adjusted using the 0-1 matrix corresponding to the non-B subtype data set, wherein 0 represents non-drug resistance, 1 represents drug resistance, n represents the length of the amino acid sequence, and m represents the type of amino acid;
[0010] According to the comparison reference database, the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set is calculated; the second basic prediction model is trained based on the second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; the second basic prediction model is adjusted using the PSSM matrix corresponding to the non-B subtype data set;
[0011] An HIV genotype drug resistance prediction model is trained, wherein the output result of the HIV genotype drug resistance prediction model is drug resistance or drug inresistance, and the HIV genotype drug resistance prediction model comprises a fusion module, wherein the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
[0012] In a preferred embodiment, the fusion process of the fusion module includes:
[0013] Obtaining intermediate features of the first basic prediction model, and obtaining intermediate features of the second basic prediction model;
[0014] Broadcasting and adding the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model to obtain a calculation result M;
[0015] The calculation result M is sequentially subjected to convolution calculation, RELU function activation, pooling calculation, convolution calculation, RELU function activation and pooling calculation to obtain the calculation result M1; the calculation result M is sequentially subjected to global average pooling calculation and full connection layer calculation to obtain the calculation result M2;
[0016] Perform matrix dot multiplication on the calculation result M1 and the calculation result M2 to obtain the calculation result Z0;
[0017] Use Sigmod function to activate the calculation result Z0 to get the result Z;
[0018] The fusion result S is obtained by fusing the output result X and the output result Y according to S=X×Z+Y×(1-Z).
[0019] In a preferred embodiment, the HIV genotype drug resistance prediction model also includes a fully connected layer and a Sigmod function layer. The fusion result of the fusion module is calculated by the fully connected layer, and the Sigmod function layer is used to activate the output result of the fully connected layer to obtain the output result of the HIV genotype drug resistance prediction model.
[0020] In a preferred embodiment, the intermediate feature of the first basic prediction model is the output result X of the last convolutional layer in the convolutional layer of the first basic prediction model, and the intermediate feature of the second basic prediction model is the output result Y of the last convolutional layer in the convolutional layer of the second basic prediction model.
[0021] In a preferred embodiment, the data used to train the first basic prediction model, the data used to test the trained first basic prediction model, the data used to adjust the first basic prediction model, and the data used to test the adjusted first basic prediction model correspond one-to-one to the data used to train the second basic prediction model, the data used to test the trained second basic prediction model, the data used to adjust the second basic prediction model, and the data used to test the adjusted second basic prediction model, respectively.
[0022] In a preferred embodiment, each drug corresponds to one subtype B data set and one non-subtype B data set, and the specific process of obtaining the subtype B data set and the non-subtype B data set includes:
[0023] Obtaining drug resistance data, wherein the drug resistance data includes drug information, patient gene sequence information, and subtype information corresponding to the patient gene sequence;
[0024] Convert the patient's gene sequence information into an amino acid sequence, and mark whether the amino acid sequence is drug-resistant; divide the basic data set according to the number of drugs; the basic data set includes the amino acid sequence corresponding to the patient's gene sequence, the amino acid sequence ID, information on drug resistance, and subtype information;
[0025] The basic data documents are divided into B subtype data sets and non-B subtype data sets according to the subtype information.
[0026] In a second aspect, the present invention provides a HIV genotype drug resistance prediction system, comprising:
[0027] An acquisition module is used to obtain a subtype B data set and a non-subtype B data set; the subtype B data set and the non-subtype B data set both include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant;
[0028] The encoding module is used to perform one-hot encoding on the amino acid sequences in the B subtype dataset and the non-B subtype dataset to obtain an m×n 0-1 matrix;
[0029] A first training module, using a 0-1 matrix corresponding to a B subtype data set and based on a first convolutional neural network, trains a first basic prediction model, which is used to adjust the first basic prediction model using a 0-1 matrix corresponding to a non-B subtype data set, wherein 0 represents non-drug resistance, 1 represents drug resistance, n represents the length of the amino acid sequence, and m represents the type of amino acid;
[0030] A calculation module, which calculates the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set according to the comparison reference database;
[0031] A second training module is used to train a second basic prediction model based on a second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; and is used to adjust the second basic prediction model using the PSSM matrix corresponding to the non-B subtype data set;
[0032] The third training module is used to train an HIV genotype drug resistance prediction model, the output result of the HIV genotype drug resistance prediction model is drug resistance or drug inresistance, and the HIV genotype drug resistance prediction model includes a fusion module, and the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
[0033] In a third aspect, the present invention provides a storage medium, which carries an HIV genotype drug resistance prediction device, which is obtained by executing the HIV genotype drug resistance prediction method described in the first aspect. When the storage medium is run on a computer to obtain a gene sequence, the computer can output information on whether the gene sequence is drug resistant.
[0034] In a fourth aspect, the present invention provides an electronic device comprising: a memory; one or more processors; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods for predicting HIV genotype drug resistance according to the first aspect.
[0035] In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer executes a method for predicting HIV genotype drug resistance as described in the first aspect.
[0036] The effects of the method, system, device and medium for predicting HIV genotype drug resistance of the present invention are as follows: the present invention uses HIV non-B subtype data, and makes adjustments based on the model corresponding to the B subtype data, thereby improving the accuracy of the model in predicting drug resistance of the non-B subtype data; the present invention not only uses one-hot encoding to obtain an m×n 0-1 matrix, and constructs a first basic prediction model based on the sequence characteristics of the 0-1 matrix, but also uses PSSM matrix characteristics to construct a second basic prediction model, and further, the intermediate characteristics of the first basic prediction model and the intermediate characteristics of the second basic prediction model are fused to train the HIV genotype drug resistance prediction model, so that the HIV genotype drug resistance prediction model has improved accuracy in predicting drug resistance of gene sequences of both B subtype and non-B subtype. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flowchart of a method for predicting HIV genotype drug resistance;
[0039] Figure 2 The format diagram of the document obtained for S2;
[0040] Figure 3 This is the model framework diagram from S3 to S5;
[0041] Figure 4 A framework diagram of a method system for predicting HIV genotype drug resistance;
[0042] Figure 5 The figure is a structural frame diagram of an electronic device. DETAILED DESCRIPTION
[0043] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0045] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0046] The existing HIV genotype drug resistance prediction method is only applicable to HIV B subtype. When applied to non-B subtype data, the accuracy of the results is low. The amount of phenotypic drug resistance data of non-B subtypes is small, and it is not possible to train a model for them alone. For this reason, this application provides a method for predicting HIV genotype drug resistance, see Figure 1 , the method comprising:
[0047] Obtain a subtype B data set and a non-subtype B data set; both the subtype B data set and the non-subtype B data set include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant;
[0048] One-hot encoding is performed on the amino acid sequences in the B subtype data set and the non-B subtype data set to obtain an m×n 0-1 matrix, and a first basic prediction model is trained based on a first convolutional neural network using the 0-1 matrix corresponding to the B subtype data set, and the first basic prediction model is adjusted using the 0-1 matrix corresponding to the non-B subtype data set, wherein 0 represents non-drug resistance, 1 represents drug resistance, n represents the length of the amino acid sequence, and m represents the type of amino acid;
[0049] According to the comparison reference database, the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set is calculated; the second basic prediction model is trained based on the second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; the second basic prediction model is adjusted using the PSSM matrix corresponding to the non-B subtype data set;
[0050] Based on the B subtype data set and the non-B subtype data set, an HIV genotype drug resistance prediction model is trained, and the output result of the HIV genotype drug resistance prediction model is drug resistance or drug non-resistance; the HIV genotype drug resistance prediction model includes a fusion module, and the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
[0051] It should be understood that the order in which the first basic prediction model and the second basic prediction model are obtained in the above method is not limited and may vary according to different execution processes. Therefore, the above method does not represent or imply that all steps must be executed in this order. Ordinary technicians in this field can transform or change the execution order of the above steps based on the present invention. Some embodiments of the above method are illustrated below.
[0052] In this embodiment, the specific process of obtaining the B subtype data set and the non-B subtype data set includes:
[0053] Obtaining drug resistance data, wherein the drug resistance data includes drug information, patient gene sequence information, and subtype information corresponding to the patient gene sequence;
[0054] Convert the patient's gene sequence information into an amino acid sequence, and mark whether the amino acid sequence is drug-resistant; divide the basic data set according to the number of drugs; the basic data set includes the amino acid sequence corresponding to the patient's gene sequence, the amino acid sequence ID, information on drug resistance, and subtype information;
[0055] The basic data documents are divided into B subtype data sets and non-B subtype data sets according to the subtype information.
[0056] The method for predicting HIV genotype drug resistance specifically comprises the following steps:
[0057] S1. Download from HIV drug resistance database to obtain original drug resistance data, including PI (protease inhibitors), NRTI (nucleoside reverse transcriptase inhibitors), NNRTI (non-nucleoside reverse transcriptase inhibitors), INI (integrase inhibitors) drug resistance data, including drug information and corresponding patient gene sequences; and obtain the subtype information corresponding to the patient gene sequence, so as to obtain drug resistance data. The drug information includes drug categories (belonging to PI, NRTI, NNRTI or INI) and drug names (one drug corresponds to one drug name). For example, the drug category is PI, and the drug name is lopinavir. Specifically, each type of drug corresponds to a txt document. In this embodiment, there are 4 txt documents, and each line of the document corresponds to a patient gene sequence.
[0058] S2, respectively parse the above 4 txt documents. For each document, it is: starting from the second line, the document is traversed line by line, and the patient gene sequence of each line is converted into an amino acid sequence according to the comparison with the reference sequence (HIV consB sequence). If there is an amino acid deletion in the amino acid sequence (excluding deletion mutations), the row sequence is not considered, and the patient gene sequence and the corresponding amino acid sequence of the row are deleted; the drug phenotype result column corresponding to each row of amino acid sequence is processed, that is, the amino acid sequence is determined to be drug resistant according to the drug sensitivity MIC value (minimum inhibitory concentration). If the corresponding output is a valid value, it means that the amino acid sequence has a phenotypic test result of the corresponding drug, and if the value is ≥3.5, it is marked as drug resistant (indicated by 1, the amino acid sequence is resistant to the drug), and if the value is less than 3.5, it is marked as non-drug resistant (indicated by 0), and the subtype information corresponding to the amino acid sequence is derived at the same time. For the output that the valid value cannot be obtained / the error value is returned, the patient gene sequence and the corresponding amino acid sequence of the row are deleted. In some embodiments, it can be not deleted, but marked as non-drug resistant. Then, according to the number of drugs in each drug category, that is, the drug name, different basic data files are exported, which are referred to as basic data sets. Each drug in each drug category corresponds to a basic data file. Each basic data file has an amino acid sequence ID (which can be coded digitally), an amino acid sequence, subtype information, and information on whether it is drug-resistant (drug resistance status). Figure 2 The basic data files are then divided into B subtype data sets and non-B subtype data sets according to the subtype information.
[0059] S3. One-hot encoding is performed on the amino acid sequence in the B subtype data set. In this embodiment, m takes the value of 22 or 23: 20 kinds of amino acids, plus the insertion of amino acid sequences and the deletion of amino acid sequences, a total of 22 kinds of amino acids; further, unknown amino acids can be added, a total of 23 kinds of amino acids; in other instances, the 20 different amino acids can also be 21, 22 or 23. The original amino acid sequence of length n is converted into a 23*n 0-1 matrix, n in PI drugs is 99, n in NRTI and NNRTI drugs is 240, and n in INI drugs is 288. That is, the 0 and 1 identifiers of drug resistance information are directly used as labels for each amino acid sequence. 80% of the data are classified as the training set of subtype B, and the rest are used as the test set of subtype B.
[0060] The training set is used as the input of the first convolutional neural network CNN to process the 0-1 matrix. The structure of the first convolutional neural network includes a first convolutional layer, a second convolutional layer, a first fully connected layer and a first Sigmod activation function layer arranged in sequence. Specifically, the first convolutional neural network specifically includes INPUT (first input layer)-CONV1D (first convolutional layer)-POOL (first maximum pooling layer)-CONV1D (second convolutional layer)-RELU (first RELU activation function)-FC (first fully connected layer)-Sigmod (first Sigmod activation function layer) arranged in sequence.
[0061] Use appropriate learning rate, batch size, adam optimizer, cross entropy loss function, and perform 50 cycles of training; save the first basic prediction model mentioned above.
[0062] Based on the first basic prediction model, the non-B subtype data set is used to fine-tune the first basic prediction model. Specifically, the amino acid sequence of the non-B subtype data set is one-hot encoded, and the original amino acid sequence of length n is converted into a 0-1 matrix. Then, the first basic prediction model is fine-tuned based on this. Please refer to Figure 3 The part in box A.
[0063] S4. Calculate the PSSM (position-specific score matrix) matrix of the amino acid sequence, and perform training based on the PSSM score matrix.
[0064] S4.1. Download all the public amino acid sequences of HIV-1 and construct a local BLAST database as a reference database for comparison.
[0065] S4.2. According to the local BLAST database, the PSSM matrix of all amino acid sequences in the basic data set is calculated by comparison, that is, an n*20 matrix is obtained, where n is the length of the amino acid sequence and 20 is the type of amino acids.
[0066] S4.3. According to the division of the test set and the training set in S3, the PSSM matrix of the amino acid sequence of the B subtype data set (and the non-B subtype data set) is divided in the same way, that is, the IDs of the test set and the training data set in S3 and the total number of data are guaranteed to be consistent; that is, it is necessary to meet the following requirements: the data used to train the first basic prediction model, test the first basic prediction model obtained through training, adjust the first basic prediction model, and test the adjusted first basic prediction model correspond to the data used to train the second basic prediction model, test the second basic prediction model obtained through training, adjust the second basic prediction model, and test the adjusted second basic prediction model.
[0067] S4.4, using S4.3 to obtain the result corresponding to the B subtype, using the second convolutional neural network to process the PSSM matrix, and training the second basic prediction model. In this embodiment, the second convolutional neural network can be exactly the same as the first convolutional neural network structure, and the structure of the second convolutional neural network includes the third convolutional layer, the fourth convolutional layer, the second fully connected layer, and the second Sigmod activation function layer arranged in sequence. Specifically, the second convolutional neural network specifically includes INPUT (second input layer)-CONV1D (third convolutional layer)-POOL (second maximum pooling layer)-CONV1D (fourth convolutional layer)-RELU (second RELU activation function layer)-FC (second fully connected layer)-Sigmod (second Sigmod activation function layer) arranged in sequence.
[0068] S4.5. Using the results corresponding to the non-B subtypes obtained in S4.3, adjust the second basic prediction model, which usually includes adjustment training and testing of the adjusted model. Figure 3 Part B of
[0069] As a preferred embodiment, after performing S2 and before performing S3 and S4, the step includes dividing the B subtype data set into a first data set and a second data set. In the process of obtaining the first basic prediction model, the 0-1 matrix based on the first data set is used as a training set, and the 0-1 matrix based on the second data set is used as a test set; in the process of obtaining the second basic prediction model, the PSSM matrix based on the first data set is used as a training set, and the PSSM matrix based on the second data set is used as a test set.
[0070] It can be understood that the adjustment also includes adjusting the model and testing the results of the adjustment, and the non-B subtype data set is divided into a third data set and a fourth data set. As a preferred embodiment, after performing S2 and before performing S3 and S4, a step of dividing the non-B subtype data set into a third data set and a fourth data set is included. In the process of obtaining the first basic prediction model, the 0-1 matrix of the third data set is used to adjust the first basic prediction model, and the 0-1 matrix of the fourth data set is used to test the adjusted first basic prediction model; in the process of obtaining the second basic prediction model, the PSSM matrix of the third data set is used to adjust the second basic prediction model, and the PSSM matrix of the fourth data set is used to test the adjusted first basic prediction model.
[0071] In this embodiment, the output results of the first basic prediction model and the second basic prediction model are drug resistance or drug inresistance.
[0072] S5. The sequence feature vector and the PSSM matrix feature vector are fused to train the HIV genotype drug resistance prediction model.
[0073] As an embodiment but not limitation, the fusion module is specifically used to fuse the output result X and the output result Y based on the attention mechanism to obtain a fusion result S, where the output result X is the output result of the last convolutional layer in the convolutional layer of the first basic prediction model, that is, X is a sequence feature vector, which can be referred to as feature X or vector X, etc. The output result Y is the output result Y of the last convolutional layer in the first basic prediction model, and Y is a PSSM matrix feature vector, which can be referred to as feature Y or vector Y, etc.
[0074] S5.1. First, remove the last Sigmod function activation layer of the first basic prediction model and the second basic prediction model, as well as the fully connected layer before the Sigmod function. At this time, the outputs of both models are a vector, represented as X and Y respectively (see Figure 3 (Part C);
[0075] S5.2. Use the attention mechanism to fuse the sequence features and PSSM matrix features. The specific method is as follows:
[0076] ①First, perform broadcast addition calculation on X and Y to obtain the calculation result M and perform the following ②③ operations respectively;
[0077] ② The calculation result M of step ① is sequentially subjected to convolution calculation of the fifth convolution layer, RELU function activation, pooling calculation, convolution calculation of the sixth convolution layer, RELU function activation, and pooling calculation to obtain the calculation result M1;
[0078] ③ Perform global average pooling calculation on the result M of step ①, and perform full connection layer (FC) calculation on the result to obtain the calculation result M2;
[0079] ④ Perform matrix dot multiplication on the results of steps ② and ③ to obtain the calculation result Z0;
[0080] ⑤ Activate the Sigmod function for the calculation result Z0 of step ④, and record the result as Z;
[0081] ⑥ The final fusion result S of the X and Y features is expressed as follows:
[0082] S=X×Z+Y×(1-Z)
[0083] S5.3, perform the final fully connected layer calculation on the fusion result S after feature fusion, and ensure that the output dimension is 2, and activate it with the Sigmod function layer. And also use the adam optimizer and cross entropy loss function for training. The final output result of the HIV genotype drug resistance prediction model is the classification result, which is drug resistant or not drug resistant.
[0084] It can be understood that when training the HIV genotype drug resistance prediction model, the 0-1 matrix of the first data set and the third data set, and the PSSM matrix of the first data set and the third data set are used as the training set of the HIV genotype drug resistance prediction model; the 0-1 matrix of the second data set and the fourth data set, and the PSSM matrix of the second data set and the fourth data set are used as the test set of the HIV genotype drug resistance prediction model, and the effect of the trained HIV genotype drug resistance prediction model is tested, and the accuracy, precision, F1, recall and other evaluation indicators of the model are output.
[0085] For each basic data set, S3 to S5 are performed respectively. Finally, the HIV genotype resistance prediction models corresponding to all drug varieties are summarized to obtain a model that can predict whether each HIV drug is resistant based on the gene sequence.
[0086] See also Figure 4 The present invention provides an HIV genotype drug resistance prediction system, comprising: an acquisition module, an encoding module, a first training module, a calculation module, a second training module and a third training module.
[0087] An acquisition module is used to obtain a subtype B data set and a non-subtype B data set; the subtype B data set and the non-subtype B data set both include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant;
[0088] The encoding module is used to perform one-hot encoding on the amino acid sequences in the B subtype data set and the non-B subtype data set to obtain an m×n 0-1 matrix, where 0 represents non-resistance, 1 represents resistance, n represents the length of the amino acid sequence, and m represents the type of amino acid;
[0089] A first training module, using a 0-1 matrix corresponding to a B subtype data set and based on a first convolutional neural network, trains a first basic prediction model, and is used to adjust the first basic prediction model using a 0-1 matrix corresponding to a non-B subtype data set;
[0090] A calculation module, which calculates the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set according to the comparison reference database;
[0091] A second training module is used to train a second basic prediction model based on a second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; and is used to adjust the second basic prediction model using the PSSM matrix corresponding to the non-B subtype data set;
[0092] The third training module is used to train an HIV genotype drug resistance prediction model, the output result of the HIV genotype drug resistance prediction model is drug resistance or drug inresistance, and the HIV genotype drug resistance prediction model includes a fusion module, and the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
[0093] The obtaining module includes a first obtaining unit, a first processing unit, and a second processing unit;
[0094] A first obtaining unit is used to obtain drug resistance data, wherein the drug resistance data includes drug information, patient gene sequence information, and subtype information corresponding to the patient gene sequence;
[0095] The first processing unit is used to convert the patient's gene sequence information into an amino acid sequence, and mark whether the amino acid sequence is drug-resistant; divide the basic data set according to the number of drugs; the basic data set includes the amino acid sequence corresponding to the patient's gene sequence, the amino acid sequence ID, whether the drug is resistant, and the subtype information;
[0096] A second processing unit is used to divide the basic data document into a B subtype data set and a non-B subtype data set according to the subtype information;
[0097] Each drug corresponds to one of the B subtype datasets and one of the non-B subtype datasets.
[0098] In this embodiment, the data used to train the first basic prediction model, the data used to test the trained first basic prediction model, the data used to adjust the first basic prediction model, and the data used to test the adjusted first basic prediction model correspond one-to-one to the data used to train the second basic prediction model, the data used to test the trained second basic prediction model, the data used to adjust the second basic prediction model, and the data used to test the adjusted second basic prediction model, respectively.
[0099] In this embodiment, the structure of the first convolutional neural network is the same as the structure of the second convolutional neural network; the first convolutional neural network includes a first convolutional layer, a second convolutional layer, a first fully connected layer and a first Sigmod activation function arranged in sequence.
[0100] The intermediate feature of the first basic prediction model is the output result X of the last convolutional layer in the convolutional layer of the first basic prediction model, and the intermediate feature of the second basic prediction model is the output result Y of the last convolutional layer in the convolutional layer of the second basic prediction model.
[0101] The fusion module includes: a second obtaining unit, a first calculating unit, a second calculating unit, a third calculating unit, a fourth calculating unit, a fifth calculating unit and a fusion unit;
[0102] The second obtaining unit is used to obtain the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model;
[0103] The first calculation unit is used to broadcast and add the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model to obtain a calculation result M;
[0104] The second calculation unit is used to perform convolution calculation, RELU function activation, pooling calculation, convolution calculation, RELU function activation and pooling calculation on the calculation result M in sequence to obtain a calculation result M1;
[0105] The third calculation unit is used to perform global average pooling calculation and full connection layer calculation on the calculation result M in sequence to obtain the calculation result M2;
[0106] The fourth calculation unit is used to perform matrix dot multiplication calculation on the calculation result M1 and the calculation result M2 to obtain the calculation result Z0;
[0107] The fifth calculation unit is used to activate the calculation result Z0 using the Sigmod function to obtain the result Z;
[0108] The first fusion unit is used to fuse the output result X and the output result Y according to S=X×Z+Y×(1-Z) to obtain a fusion result S.
[0109] The HIV genotype drug resistance prediction model also includes a third fully connected layer and a first Sigmod function layer. The fusion result of the fusion module is calculated by the third fully connected layer, and then the output result of the third fully connected layer is activated by the first Sigmod function layer to obtain the output result of the HIV genotype drug resistance prediction model.
[0110] When the system for predicting HIV genotype drug resistance is implemented, HIV genotype drug resistance prediction can be implemented by referring to a method for predicting HIV genotype drug resistance in any of the above embodiments, and the specific implementation steps will not be repeated here.
[0111] The present invention also provides a device for predicting HIV genotype drug resistance, comprising:
[0112] A conversion module, used to convert the obtained gene sequence into an amino acid sequence;
[0113] A 0-1 matrix acquisition module, used to obtain a 0-1 matrix according to an amino acid sequence;
[0114] PSSM matrix acquisition module, used to obtain PSSM matrix for amino acid sequences;
[0115] A first convolution module, used to perform a convolution operation on the 0-1 matrix to obtain feature X; specifically, the first convolution module is a part of the first basic model, including several convolution layers;
[0116] A second convolution module, used for performing a convolution operation on the PSSM matrix to obtain feature Y; specifically, the second convolution module is a part of the second basic model, including a plurality of convolution layers;
[0117] The second fusion module is used to fuse feature X and feature Y to output a fusion result S. Specifically, the second fusion module includes a broadcast addition unit, a global pooling layer, a third fully connected layer, a fifth convolutional layer, a first pooling layer, a sixth convolutional layer, a second pooling layer, a matrix dot product unit, a third Sigmod activation function layer, and a second fusion unit. Specifically, the fifth convolutional layer and the first pooling layer, and the sixth convolutional layer and the second pooling layer are all activated by the RELU function. X is used to broadcast and add X and Y to obtain a calculation result M. The global pooling layer is used to perform global average pooling calculation on the calculation result M in sequence. The third fully connected layer is used to fully connect the output result of the global pooling layer. The calculation result M2 is obtained by continuous calculation; the fifth convolution layer is used to perform convolution calculation on the calculation result M in sequence, the first pooling layer is used to perform pooling calculation on the output result of the fifth convolution layer, the sixth convolution layer is used to perform convolution calculation on the output result of the first pooling layer, and the second pooling layer is used to perform pooling calculation on the data result of the sixth convolution layer to obtain the calculation result M1; the matrix dot multiplication unit is used to perform matrix dot multiplication calculation on the calculation result M1 and the calculation result M2 to obtain the calculation result Z0; the third Sigmod activation function layer is used to activate the calculation result Z0 using the Sigmod function to obtain the result Z; the second fusion unit is used to obtain the fusion result S according to S=X×Z+Y×(1-Z);
[0118] The fourth fully connected layer is used for fully connecting and calculating the fusion result of the second fusion module;
[0119] The second Sigmod function layer is used to activate the output result of the fourth fully connected layer using the Sigmod function.
[0120] The HIV genotype drug resistance prediction device is obtained by executing a method for predicting HIV genotype drug resistance. A gene sequence is input into the HIV genotype drug resistance prediction device, and the HIV genotype drug resistance prediction device outputs information on whether the gene sequence is resistant to one or more drugs.
[0121] According to the above-mentioned HIV genotype drug resistance prediction device, the present invention also provides a storage medium, which carries the above-mentioned HIV genotype drug resistance prediction device. When the storage medium is run on a computer and a gene sequence is obtained, the computer can output information on whether the gene sequence is drug-resistant.
[0122] According to the method of the present invention, an electronic device can be implemented. Figure 5 The electronic device includes: a memory; one or more processors; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a method for predicting HIV genotype drug resistance according to any of the above embodiments.
[0123] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0124] The memory may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. In addition, the memory may include any combination of computer-readable storage media, such as semiconductor memory chips, magnetic disks, and optical disks.
[0125] The memory stores executable codes, and when the executable codes are processed by the processor, the processor can execute part or all of the methods described above.
[0126] The technicians in the field to which the present invention belongs can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0127] The present invention also provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes each step of a method for predicting HIV genotype drug resistance described in any of the above embodiments.
[0128] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0129] The effects of the method, system, device and medium for predicting HIV genotype drug resistance of the present invention are as follows: the present invention uses HIV non-B subtype data, and fine-tunes the model corresponding to the B subtype data to improve the accuracy of the model in predicting drug resistance of non-B subtype data; the present invention not only uses sequence features to construct a first basic prediction model, but also uses PSSM matrix features to construct a second basic prediction model, and the present invention also fuses the intermediate features of the first basic prediction model with the intermediate features of the second basic prediction model to train an HIV genotype drug resistance prediction model, so that the HIV genotype drug resistance prediction model has improved prediction accuracy for whether the gene sequences of B subtype and non-B subtype are resistant to drugs compared with the prior art.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting HIV genotype drug resistance, characterized in that: include: Obtain a subtype B data set and a non-subtype B data set; both the subtype B data set and the non-subtype B data set include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant; One-hot encoding is performed on the amino acid sequences in the B subtype data set and the non-B subtype data set to obtain an m×n 0-1 matrix, and a first basic prediction model is trained based on a first convolutional neural network using the 0-1 matrix corresponding to the B subtype data set, and the first basic prediction model is adjusted using the 0-1 matrix corresponding to the non-B subtype data set, wherein 0 represents non-drug resistance, 1 represents drug resistance, m represents the type of amino acid, and n represents the length of the amino acid sequence; According to the comparison reference database, the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set is calculated; the second basic prediction model is trained based on the second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; the second basic prediction model is adjusted using the PSSM matrix corresponding to the non-B subtype data set; An HIV genotype drug resistance prediction model is trained, wherein the output result of the HIV genotype drug resistance prediction model is drug resistance or drug inresistance, and the HIV genotype drug resistance prediction model comprises a fusion module, wherein the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
2. A method for predicting HIV genotype drug resistance according to claim 1, characterized in that: The fusion process of the fusion module includes: Obtaining intermediate features of the first basic prediction model, and obtaining intermediate features of the second basic prediction model; Broadcasting and adding the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model to obtain a calculation result M; The calculation result M is sequentially subjected to convolution calculation, RELU function activation, pooling calculation, convolution calculation, RELU function activation and pooling calculation to obtain the calculation result M1; the calculation result M is sequentially subjected to global average pooling calculation and full connection layer calculation to obtain the calculation result M2; Perform matrix dot multiplication on the calculation result M1 and the calculation result M2 to obtain the calculation result Z0; Use Sigmod function to activate the calculation result Z0 to get the result Z; The fusion result S is obtained by fusing the output result X and the output result Y according to S=X×Z+Y×(1-Z).
3. A method for predicting HIV genotype drug resistance according to claim 1, characterized in that: The HIV genotype drug resistance prediction model also includes a fully connected layer and a Sigmod function layer. The fusion result of the fusion module is calculated by the fully connected layer, and then the Sigmod function layer is used to activate the output result of the fully connected layer to obtain the output result of the HIV genotype drug resistance prediction model.
4. A method for predicting HIV genotype drug resistance according to claim 1, characterized in that: The intermediate feature of the first basic prediction model is the output result X of the last convolutional layer in the convolutional layer of the first basic prediction model, and the intermediate feature of the second basic prediction model is the output result Y of the last convolutional layer in the convolutional layer of the second basic prediction model.
5. The method for predicting HIV genotype drug resistance according to claim 1, characterized in that: The data used to train the first basic prediction model, the data used to test the trained first basic prediction model, the data used to adjust the first basic prediction model, and the data used to test the adjusted first basic prediction model correspond one-to-one to the data used to train the second basic prediction model, the data used to test the trained second basic prediction model, the data used to adjust the second basic prediction model, and the data used to test the adjusted second basic prediction model, respectively.
6. A method for predicting HIV genotype drug resistance according to claim 1, characterized in that: Each drug corresponds to one of the subtype B data sets and one of the non-subtype B data sets, and the specific process of obtaining the subtype B data set and the non-subtype B data set includes: Obtaining drug resistance data, wherein the drug resistance data includes drug information, patient gene sequence information, and subtype information corresponding to the patient gene sequence; Convert the patient's gene sequence information into an amino acid sequence, and mark whether the amino acid sequence is drug-resistant; divide the basic data set according to the number of drugs; the basic data set includes the amino acid sequence corresponding to the patient's gene sequence, the amino acid sequence ID, information on drug resistance, and subtype information; The basic data documents are divided into B subtype data sets and non-B subtype data sets according to the subtype information.
7. A HIV genotype drug resistance prediction system, characterized in that: include: An acquisition module is used to obtain a subtype B data set and a non-subtype B data set; the subtype B data set and the non-subtype B data set both include an amino acid sequence corresponding to a patient's gene sequence, an amino acid sequence ID, and information on whether the patient is resistant; The encoding module is used to perform one-hot encoding on the amino acid sequences in the B subtype dataset and the non-B subtype dataset to obtain an m×n 0-1 matrix; A first training module, using a 0-1 matrix corresponding to a B subtype data set and based on a first convolutional neural network, trains a first basic prediction model, which is used to adjust the first basic prediction model using a 0-1 matrix corresponding to a non-B subtype data set, wherein 0 represents non-drug resistance, 1 represents drug resistance, n represents the length of the amino acid sequence, and m represents the type of amino acid; A calculation module, which calculates the PSSM matrix of the amino acid sequences in the B subtype data set and the non-B subtype data set according to the comparison reference database; A second training module is used to train a second basic prediction model based on a second convolutional neural network using the PSSM matrix corresponding to the B subtype data set; and is used to adjust the second basic prediction model using the PSSM matrix corresponding to the non-B subtype data set; The third training module is used to train an HIV genotype drug resistance prediction model, the output result of the HIV genotype drug resistance prediction model is drug resistance or drug inresistance, and the HIV genotype drug resistance prediction model includes a fusion module, and the fusion module is used to fuse the intermediate features of the first basic prediction model and the intermediate features of the second basic prediction model.
8. A storage medium, characterized in that: The storage medium carries an HIV genotype drug resistance prediction device, which is obtained by executing an HIV genotype drug resistance prediction method as described in any one of claims 1 to 6. When the storage medium is run on a computer to obtain a gene sequence, the computer can output information on whether the gene sequence is drug resistant.
9. An electronic device, characterized in that: include: Memory; one or more processors; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods for predicting HIV genotype drug resistance according to claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to execute a method for predicting HIV genotype drug resistance according to any one of claims 1 to 6.
Citation Information
Patent Citations
Hybrid prediction method for virulence factor and antibiotic resistance gene
CN115171792A
Model training method, antibacterial peptide prediction method and system
CN117875444A