Virus classification method and device, electronic equipment and computer readable storage medium

This involves methods, devices, electronic equipment, and computer-readable storage media for virus classification, particularly in the field of bioinformatics.

CN116415190BActive Publication Date: 2025-12-23PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111626354.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-12-23
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish and classify eukaryotic and prokaryotic viruses, especially when dealing with short sequences from next-generation sequencing. Traditional methods such as BLAST alignment and HTP tools lack sufficient precision and cannot effectively identify virus types in enteroviromics.

Method used

The method involves extracting triplet nucleotide sets in 3-mer form, statistically calculating distance dependence values ​​using a distance dependence function, constructing a 64*64 distance dependence matrix, and inputting it into a pre-trained virus classification model to predict the probability of eukaryotic and prokaryotic viruses.

Benefits of technology

It enables accurate identification of DNA sequences, and can accurately identify eukaryotic and prokaryotic viruses in both long and short DNA sequences, applicable to virus classification of both long and short sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415190B_ABST
    Figure CN116415190B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a virus classification method, device, electronic equipment and computer readable storage medium, in the embodiment of the present application, triplex nucleotide set is extracted from target DNA sequence in the form of 3-mer according to order, and distance-dependent function is used to determine the distance-dependent matrix corresponding to the triplex nucleotide set.Thus, the distance-dependent matrix is used to represent the target DNA sequence as the input of the virus classification model to predict the category (eukaryotic virus or prokaryotic virus) to which the target DNA sequence belongs.In the embodiment of the present application, the virus classification model has learned the distance-dependent matrix of a plurality of known DNA sequences with labels in advance.Thus, the virus classification model can not only learn the local information of different types of DNA fragments, but also learn the order information and remote information.Thus, the embodiment of the present application can accurately predict the category to which the target DNA sequence belongs by using the distance-dependent matrix corresponding to the target DNA sequence.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of biological information processing, and in particular to a virus classification method and device, an electronic device, and a computer readable storage medium. BACKGROUND

[0002] Viruses or virus-like particles are considered to be the most abundant and diverse biological entities on earth, among which eukaryotic viruses mainly directly affect the human body, and prokaryotic viruses mainly indirectly affect the human health and microbial community structure by infecting and killing bacteria. At present, a large number of viruses have not been identified. Therefore, determining the category to which a virus belongs is a major problem in virology.

[0003] Among them, the high-throughput sequencing technology represented by the second-generation sequencing can be used for large-scale sequencing of DNA, and when it is applied to intestinal microorganisms, a large number of DNA short read fragments from different species of intestinal microbial communities can be obtained, each DNA short read fragment being about tens to hundreds of base pairs (bp) in length. Generally speaking, such DNA short fragments carry too little information to be conducive to subsequent downstream analysis, and therefore need to be spliced into longer contigs by a splicing algorithm, and then compared by using BLAST (Basic Local Alignment Search Tool) to complete the identification of the DNA sequence.

[0004] However, when the microbial members are complex, the splicing effect of the splicing algorithm is often not very ideal. In addition, since prokaryotic viruses and eukaryotic viruses lack the universal and conservative marker genes (16S rRNA) like bacteria, they cannot be classified and identified systematically by using the conservative genes, and at the same time, viruses are a kind of microorganism with very rapid evolution, and the identification method based on BLAST comparison cannot adapt to the rapid evolution of viruses, making it difficult to identify new viruses and pathogens.

[0005] Current research on macro-viruses based on second-generation sequencing, especially on enterovirology, emphasizes the existence of phages, but ignores eukaryotic viruses which also directly affect human health. Therefore, to explore the role of phages or eukaryotic viruses in the human intestinal tract or other microbial community environments, it is necessary to first explore a specific method to distinguish phages and eukaryotic viruses.

[0006] Currently, with the development of neural network models, neural network models are also applied to identify DNA sequences in biological information processing technology. In related technologies, a virus host classification predictor (Host Taxon Predictor, HTP) is proposed to distinguish between prokaryotic viruses and eukaryotic viruses. In the related technologies, the viral nucleotide sequence DNA fragment is represented by simple sequence characteristics (absolute frequency of single and double nucleotides and relative frequency of double and triple nucleotides) and nucleic acid types as model inputs to predict the virus host.

[0007] However, in metagenomic research, the type of nucleotide is unknown, so it is actually difficult to implement the type of nucleotide sequence as an input.

[0008] Meanwhile, HTP has a problem of insufficient accuracy in the face of short sequences of second-generation sequencing. The sequence order of second-generation sequencing is between 100-1000bp, and HTP needs to have better performance at a length of 3Kbp. Therefore, HTP cannot actually implement identification of short sequence DNA fragments.

[0009] Therefore, there is an urgent need for a technical solution that can accurately identify DNA sequences. SUMMARY

[0010] In view of the above problems, the present application provides a virus classification method, device, electronic equipment and computer readable storage medium, which can accurately identify the category to which the DNA sequence belongs.

[0011] The first aspect of the embodiment of the present application provides a virus classification method, the method comprising:

[0012] extracting a set of tri-nucleotide in order from the target DNA sequence in the form of 3-mer;

[0013] using a distance-dependent function in a fixed direction to count the distance-dependent value between each two tri-nucleotide in the set of tri-nucleotide in order;

[0014] filling all the distance-dependent values obtained by counting as matrix elements into a 64*64 distance-dependent matrix;

[0015] inputting the distance-dependent matrix into a pre-trained virus classification model to obtain the probability of the target DNA sequence being a eukaryotic virus and the probability of the target DNA sequence being a prokaryotic virus;

[0016] The virus classification model pre-learns a 64*64 distance-dependent matrix of each of a plurality of known DNA sequences with labels, a part of the plurality of known DNA sequences having a eukaryotic virus label, and another part of the plurality of known DNA sequences having a prokaryotic virus label.

[0017] Optionally, the distance-dependent function is:

[0018]

[0019] wherein ψ uv (s) represents a distance-dependent value between two tri-nucleotide u, v;

[0020] Λ uv (s) represents a position set of two tri-nucleotide u, v in the tri-nucleotide set;

[0021] |Λ uv (s) represents a size of a position set of two tri-nucleotide u, v in the tri-nucleotide set;

[0022] m, l represent position serial numbers of two tri-nucleotide u, v in the tri-nucleotide set, respectively;

[0023] |m-l| represents a distance between position serial numbers of two tri-nucleotide u, v in the tri-nucleotide set;

[0024] k represents a distance-dependent hyperparameter.

[0025] Optionally, the method further comprises:

[0026] obtaining a plurality of DNA sequences of viruses with eukaryotic hosts and adding corresponding eukaryotic virus labels, and obtaining a plurality of DNA sequences of viruses with prokaryotic hosts and adding corresponding prokaryotic virus labels;

[0027] adding a part of the DNA sequences of viruses with labels to a test set, and adding the remaining part to a training set;

[0028] converting each DNA sequence with labels in the training set into a corresponding 64*64 distance-dependent matrix;

[0029] inputting the 64*64 distance-dependent matrix and its corresponding label into a pre-set model for training to obtain the virus classification model.

[0030] Optionally, the method further comprises:

[0031] obtaining a plurality of DNA sequences of viruses with a host being a eukaryote and a length within a specified length range, adding a corresponding eukaryotic virus label, and obtaining a plurality of DNA sequences of viruses with a host being a prokaryote and a length within a specified length range, adding a corresponding prokaryotic virus label;

[0032] For each length range: adding a part of the DNA sequences of viruses with labels to a test set, and adding the rest to a training set; converting each DNA sequence with a label in the training set into a corresponding distance-dependent matrix of 64*64;

[0033] inputting the distance-dependent matrix of 64*64 and the corresponding label into a preset model for training, to obtain a virus classification model corresponding to the specified length range;

[0034] inputting the distance-dependent matrix into the pre-trained virus classification model, to obtain a probability of the target DNA sequence being a eukaryotic virus and a probability of the target DNA sequence being a prokaryotic virus, including:

[0035] inputting the distance-dependent matrix into a plurality of virus classification models corresponding to a plurality of specified length ranges respectively, to obtain outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, the outputs including: a probability of the target DNA sequence being a eukaryotic virus and a probability of the target DNA sequence being a prokaryotic virus;

[0036] determining weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to a sequence length of the target DNA sequence;

[0037] performing weighted average on the outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to the weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, to obtain the probability of the target DNA sequence being a eukaryotic virus and the probability of the target DNA sequence being a prokaryotic virus.

[0038] Optionally, the method further includes:

[0039] obtaining a plurality of DNA sequences of viruses with a host being a eukaryote and a length within a specified length range, adding a corresponding eukaryotic virus label, and obtaining a plurality of DNA sequences of viruses with a host being a prokaryote and a length within a specified length range, adding a corresponding prokaryotic virus label;

[0040] For each length range: adding a part of the DNA sequences of viruses with labels to a test set, and adding the rest to a training set; converting each DNA sequence with a label in the training set into a corresponding distance-dependent matrix of 64*64;

[0041] The 64*64 distance-dependent matrix and the corresponding label are input into a preset model for training, to obtain a virus classification model corresponding to the specified length range;

[0042] The distance-dependent matrix is input into the pre-trained virus classification model, to obtain a probability that the target DNA sequence is a eukaryotic virus and a probability that the target DNA sequence is a prokaryotic virus, including:

[0043] From the plurality of specified length ranges, a target specified length range in which the sequence length of the target DNA sequence is located is determined;

[0044] The distance-dependent matrix is input into the virus classification model corresponding to the target specified length range, to obtain a probability that the target DNA sequence is a eukaryotic virus and a probability that the target DNA sequence is a prokaryotic virus.

[0045] In a second aspect, the embodiment of the present application provides a virus classification device, and the device comprises:

[0046] A tri-nucleotide set extraction module is configured to extract tri-nucleotide sets from a target DNA sequence in a 3-mer form in sequence;

[0047] A statistical module is configured to use a distance-dependent function to statistically determine distance-dependent values between each two tri-nucleotide sets in sequence along a fixed direction;

[0048] An input module is configured to fill all the distance-dependent values obtained by the statistical module into a 64*64 distance-dependent matrix as matrix elements;

[0049] A prediction module is configured to input the distance-dependent matrix into a pre-trained virus classification model, to obtain a probability that the target DNA sequence is a eukaryotic virus and a probability that the target DNA sequence is a prokaryotic virus;

[0050] The virus classification model has previously learned 64*64 distance-dependent matrices of a plurality of known DNA sequences with labels, and a part of the plurality of known DNA sequences have eukaryotic virus labels, and another part of the plurality of known DNA sequences have prokaryotic virus labels.

[0051] Optionally, the distance-dependent function is:

[0052]

[0053] wherein ψ uv (s) represents a distance-dependent value between two tri-nucleotide sets u and v;

[0054] Λ uv (s) represents a position set of two tri-nucleotide sets u and v in the tri-nucleotide set.

[0055] |Λ uv (s)| represents the size of the position set of two triplet nucleotides u, v in the triplet nucleotide set;

[0056] m, l represent the position sequence numbers of two triplet nucleotides u, v in the triplet nucleotide set, respectively;

[0057] |m-l| represents the distance between the position sequence numbers of two triplet nucleotides u, v in the triplet nucleotide set;

[0058] k represents a distance-dependent hyperparameter.

[0059] Optionally, the apparatus further comprises:

[0060] a first sample collection module configured to obtain a plurality of DNA sequences of viruses with eukaryotic hosts and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with prokaryotic hosts and add corresponding prokaryotic virus labels;

[0061] a first sample classification module configured to add part of the DNA sequences of the viruses with labels to a test set and add the remaining part to a training set;

[0062] a first training set distance-dependent matrix determination module configured to convert each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix;

[0063] a first training module configured to input the 64*64 distance-dependent matrix and its corresponding label into a preset model for training to obtain the virus classification model.

[0064] Optionally, the apparatus further comprises:

[0065] a second sample collection module configured to obtain a plurality of DNA sequences of viruses with eukaryotic hosts and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with prokaryotic hosts and add corresponding prokaryotic virus labels, wherein the sequence length of each DNA sequence is within a specified length range;

[0066] a second training module configured to, for each length range: add part of the DNA sequences of the viruses with labels to a test set and add the remaining part to a training set; convert each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix; and input the 64*64 distance-dependent matrix and its corresponding label into a preset model for training to obtain a virus classification model corresponding to the specified length range;

[0067] the probability determination module comprises:

[0068] a first probability determination submodule, configured to input the distance-dependent matrix into a plurality of virus classification models corresponding to a plurality of specified length ranges respectively, to obtain outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, wherein the outputs include probabilities that the target DNA sequence is eukaryotic virus and probabilities that the target DNA sequence is prokaryotic virus;

[0069] a weight determination submodule, configured to determine weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to a sequence length of the target DNA sequence;

[0070] a weighted average submodule, configured to perform weighted average on the outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to the weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, to obtain the probabilities that the target DNA sequence is eukaryotic virus and the probabilities that the target DNA sequence is prokaryotic virus.

[0071] Optionally, the apparatus further includes:

[0072] a third sample collection module, configured to obtain a plurality of DNA sequences of viruses with a host being eukaryotic organism and a sequence length being a specified length range, and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with a host being prokaryotic organism and a sequence length being the specified length range, and add corresponding prokaryotic virus labels;

[0073] a third training module, configured to, for each length range: add part of the DNA sequences of viruses with labels to a test set, and add the rest to a training set; convert each DNA sequence with a label in the training set into a corresponding distance-dependent matrix of 64*64; input the distance-dependent matrix of 64*64 and the corresponding label into a preset model to perform training, to obtain a virus classification model corresponding to the specified length range;

[0074] the probability determination module includes:

[0075] a target specified length range determination submodule, configured to determine, from the plurality of specified length ranges, a target specified length range in which a sequence length of the target DNA sequence is located;

[0076] a second probability determination submodule, configured to input the distance-dependent matrix into a virus classification model corresponding to the target specified length range, to obtain the probabilities that the target DNA sequence is eukaryotic virus and the probabilities that the target DNA sequence is prokaryotic virus.

[0077] In a third aspect, an electronic device is provided, including:

[0078] The memory, the processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor is configured to perform any of the virus classification methods according to the first aspect.

[0079] In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which causes a processor to perform any of the virus classification methods according to the first aspect.

[0080] In the embodiments of the present application, a set of triplex nucleotides is extracted from the target DNA sequence in the form of 3-mer in sequence, and a distance-dependent matrix corresponding to the set of triplex nucleotides is determined. Thus, the target DNA sequence is represented by the distance-dependent matrix as an input of the virus classification model, so as to predict the category (eukaryotic virus or prokaryotic virus) to which the target DNA sequence belongs.

[0081] In the embodiments of the present application, the target DNA sequence is represented by the distance-dependent matrix, which can not only capture the local information of the DNA sequence but also capture the sequence information and long-range information. In actual application, the distance-dependent matrix corresponding to the DNA sequence can be obtained without analyzing the nucleic acid type of the DNA sequence. In addition, even for short DNA sequences, the distance-dependent matrix corresponding to the DNA sequence can be obtained and prediction can be performed. It can be seen that the prediction method provided in the embodiments of the present application can be applied to both long DNA sequences and short DNA sequences.

[0082] In the embodiments of the present application, the virus classification model has learned the distance-dependent matrices of a plurality of known DNA sequences with labels in advance. Thus, the virus classification model can not only learn the local information of the DNA fragments of different types of viruses, but also learn the sequence information and long-range information. Thus, the category to which the target DNA sequence belongs can be accurately predicted by using the distance-dependent matrix corresponding to the target DNA sequence. BRIEF DESCRIPTION OF DRAWINGS

[0083] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0084] Figure 1 is a step flow chart of a virus classification method in the embodiments of the present application;

[0085] Figure 2 is a step flow chart of a training method of a virus classification model in the embodiments of the present application;

[0086] Figure 3 is another step flow chart of a training method of a virus classification model in an embodiment of the present application;

[0087] Figure 4 is a schematic diagram of a virus classification device in an embodiment of the present application. DETAILED DESCRIPTION

[0088] In order to make the above-mentioned objectives, characteristics and advantages of the present application more apparent, comprehensible and easily understood, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0089] The present inventors have found that the classification method for viruses in the related art has the problems of insufficient accuracy and insufficient practicability. Therefore, the present embodiment proposes a new virus classification method. A distance-dependent matrix corresponding to a DNA sequence carrying a label is used as a training sample of a preset model to train a virus classification model. In application, a target DNA sequence is converted into a corresponding distance-dependent matrix as an input of the virus classification model, so as to obtain a prediction result of the virus type corresponding to the DNA sequence. Thus, the present embodiment can accurately predict the category to which the DNA sequence belongs.

[0090] Hereinafter, a virus classification method in an embodiment of the present application will be specifically introduced. As shown in the following Figure 1 The virus classification method can specifically include the following steps:

[0091] Step S101, a set of tri-nucleotide is extracted from a target DNA sequence in the form of 3-mer in sequence.

[0092] In the present embodiment, a plurality of tri-nucleotides can be extracted from the target DNA sequence in the form of 3-mer, and the plurality of tri-nucleotides can be arranged in sequence according to the order of each tri-nucleotide on the DNA sequence to obtain a set of tri-nucleotides in sequence.

[0093] For example, for a DNA sequence: 5'-ATTCATGTGA-3', an ordered tri-nucleotide set of "ATT, TTC, TCA, CAT, ATG, TGT, GTG, TGA" can be extracted.

[0094] In the present embodiment, each tri-nucleotide in the set of tri-nucleotides can also be numbered in sequence.

[0095] Step S102, using a distance-dependent function along a fixed direction in sequence, the distance-dependent value between each two tri-nucleotides in the set of tri-nucleotides is counted.

[0096] In the embodiment of the present application, the distance-dependent function is used to represent the distance relationship between each two kinds of tri-nucleotide. In the implementation, any linear function or non-linear function can be set to represent the distance relationship between each two kinds of tri-nucleotide.

[0097] In the embodiment of the present application, when the distance-dependent value between each two kinds of tri-nucleotide is counted, the counting needs to be performed according to a fixed direction (for example, 5'→3'), so that the order information and the long-range information of the DNA sequence can be accurately extracted.

[0098] In a feasible implementation of the embodiment of the present application, the distance-dependent function can be:

[0099]

[0100] wherein ψ uv (s) represents the distance-dependent value between two kinds of tri-nucleotide u and v;

[0101] Λ uv (s) represents the position set of two kinds of tri-nucleotide u and v in the tri-nucleotide set;

[0102] wherein when the position set is determined, the order of the tri-nucleotide needs to be considered, and only the position relationship between the front tri-nucleotide and the rear tri-nucleotide along the fixed direction is counted.

[0103] |Λ uv (s) represents the size of the position set of two kinds of tri-nucleotide u and v in the tri-nucleotide set;

[0104] wherein the size of the position set specifically represents the number of elements in the position set.

[0105] m and l represent the position serial numbers of two kinds of tri-nucleotide u and v in the tri-nucleotide set respectively;

[0106] |m-l| represents the distance between the position serial numbers of two kinds of tri-nucleotide u and v in the tri-nucleotide set;

[0107] k represents the distance-dependent hyper-parameter, which can be set by the technician according to the actual situation in the actual application.

[0108] In order to facilitate understanding, the following example is explained:

[0109] Suppose that the distance-dependent value between "TTC" and "TAA" in the target DNA sequence needs to be determined, wherein "TTC" appears three times in the triplet nucleotide set corresponding to the target DNA sequence, and the sequence numbers of the three times of appearance are 2, 3, 6 in the direction of 5'→3', and "TAA" appears twice in the triplet nucleotide set corresponding to the target DNA sequence, and the sequence numbers of the two times of appearance are 5, 8 in the direction of 5'→3'. Then the position set can be obtained as follows:

[0110] Λ uv ={(2, 5); (3, 5); (2, 8); (3, 8); (6, 8)}

[0111] Suppose that the distance-dependent constant k = 1, then the distance-dependent value can be determined as follows:

[0112]

[0113] In step S103, all the distance-dependent values obtained by the statistics are filled into a 64*64 distance-dependent matrix as matrix elements.

[0114] In the embodiment of the present application, the 64*64 distance-dependent matrix is composed of 64 kinds of triplet nucleotides, and is used to record the distance-dependent value between each two kinds of triplet nucleotides.

[0115] In the embodiment of the present application, when facing a shorter DNA sequence, it may occur that a certain kind of triplet nucleotide does not appear in the DNA sequence. At this time, the element in the distance-dependent matrix related to the kind of triplet nucleotide is represented by zero.

[0116] In the embodiment of the present application, after the distance-dependent values between all the triplet nucleotides on the target DNA are obtained by the statistics, the distance-dependent values are filled into a 64*64 matrix, and thus the distance-dependent matrix corresponding to the target DNA sequence can be obtained.

[0117] In the embodiment of the present application, the target DNA sequence is converted into the corresponding distance-dependent matrix, not only the triplet nucleotide information of the target DNA sequence is extracted, but also the order information and distance information between various triplet nucleotides on the target DNA sequence are learned, so that the distance-dependent matrix can not only grasp the local information of the DNA sequence, but also capture the order information and long-range information of the sequence.

[0118] In step S104, the distance-dependent matrix is input into a pre-trained virus classification model to obtain the probability that the target DNA sequence is a eukaryotic virus and the probability that the target DNA sequence is a prokaryotic virus.

[0119] In the embodiment of the present application, the eukaryotic virus refers to a virus with a eukaryotic host, and the prokaryotic virus refers to a virus with a prokaryotic host.

[0120] In the embodiment of the present application, the virus classification model takes the distance-dependent matrix corresponding to the DNA sequence as input to predict the probability that the DNA sequence belongs to eukaryotic viruses and prokaryotic viruses, thereby completing the classification of the virus corresponding to the DNA sequence.

[0121] In the embodiment of the present application, the virus classification model has learned the 64*64 distance-dependent matrix of each of a plurality of known DNA sequences with labels in advance, and a part of the plurality of known DNA sequences has eukaryotic virus labels, and another part of the plurality of known DNA sequences has prokaryotic virus labels.

[0122] In the embodiment of the present application, the 64*64 distance-dependent matrix of each of a plurality of known DNA sequences with labels can be used to train a preset model to obtain a virus classification model. Thus, the virus classification model can not only learn the local information of the DNA fragments of viruses of different types, but also learn the sequential information and long-range information.

[0123] The embodiment of the present application proposes a training method of a virus classification model, as shown in Figure 2 The method can specifically include the following steps:

[0124] In step S201, a plurality of DNA sequences of viruses with eukaryotic hosts are obtained and corresponding eukaryotic virus labels are added, and a plurality of DNA sequences of viruses with prokaryotic hosts are obtained and corresponding prokaryotic virus labels are added.

[0125] In the embodiment of the present application, 11022 DNA sequences of viruses with eukaryotic hosts and 5051 DNA sequences of viruses with bacterial and archaeal hosts are collected from the genome data (https: / / www.ncbi.nlm.nih.gov / genome / ) of NCBI (National Center for Biotechnology Information) and the genome database (https: / / www.genome.jp / virushostdb / ) of Virus-Host DB.

[0126] In step S202, a part of the DNA sequences of viruses with labels is added to the test set, and the remaining part is added to the training set.

[0127] In the embodiment of the present application, the above-mentioned 10000 eukaryotic viruses and 4000 prokaryotic viruses collected in the DNA sequences of known species are used to form the training set and the validation set of 5-fold cross-validation. In addition, 1022 eukaryotic viruses and 1051 prokaryotic viruses are used to form the test set.

[0128] Step S203, each DNA sequence with a label in the training set is converted into a corresponding 64*64 distance-dependent matrix.

[0129] Step S204, the 64*64 distance-dependent matrix and its corresponding label are input into the preset model for training to obtain the virus classification model.

[0130] In the embodiment of the application, all DNA sequences with labels are converted into corresponding 64*64 distance-dependent matrices, which are then used for training of the preset model. The model can learn the respective 64*64 distance-dependent matrices of a plurality of known DNA sequences with labels, and further learn the local information, sequential information and remote information of the corresponding DNA sequences.

[0131] In the embodiment of the application, the preset model can be any neural network model, for example, a convolutional neural network.

[0132] In the embodiment of the application, in order to enhance the accuracy of the algorithm in predicting the type of short read sequences, another training method of the virus classification model is also provided, as shown in Figure 3 The method can specifically include the following steps:

[0133] Step S301, a plurality of DNA sequences of viruses with eukaryotic hosts and a corresponding eukaryotic virus label are obtained, and a plurality of DNA sequences of viruses with prokaryotic hosts and a corresponding prokaryotic virus label are obtained.

[0134] The specified length range includes four length ranges: 100-400bp, 400-800bp, 800-1200bp, and 1200-1800bp.

[0135] In the embodiment of the application, after a large number of DNA sequences are obtained from a known database, meta-sim is used to simulate macro-genome contigs or short read fragments. Four groups of sample DNA sequences with different length intervals are simulated for training of the preset model.

[0136] In the embodiment of the application, for each length range of DNA sequences, the following steps can be performed:

[0137] Step S302, a part of the DNA sequences of viruses with labels is added to the test set, and the remaining part is added to the training set; each DNA sequence with a label in the training set is converted into a corresponding 64*64 distance-dependent matrix; the 64*64 distance-dependent matrix and its corresponding label are input into the preset model for training to obtain the virus classification model corresponding to the specified length range.

[0138] In the embodiment of the present application, for each length range of sample DNA sequence, the sample can be divided into a training set and a validation set for 5-fold cross-validation and a test set for testing according to a method similar to step S202.

[0139] In the embodiment of the present application, the preset model can be trained by using sample DNA sequences of different length ranges respectively, to obtain a virus classification model for DNA sequences of different length ranges.

[0140] Therefore, the virus classification model for short sequence DNA sequences obtained by the embodiment of the present application can more accurately predict the virus type corresponding to the short sequence DNA sequence.

[0141] In the embodiment of the present application, in the case of training a plurality of virus classification models, the plurality of virus classification models can be used to predict the target DNA sequence respectively, and the prediction results are weighted and averaged to obtain the final prediction result.

[0142] Specifically, the above step S104 can include the following sub-steps:

[0143] S1041A, inputting the distance-dependent matrix into a plurality of virus classification models corresponding to a plurality of specified length ranges respectively, to obtain outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, the outputs including probabilities of the target DNA sequence being eukaryotic viruses and probabilities of the target DNA sequence being prokaryotic viruses.

[0144] S1042A, determining weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to the sequence length of the target DNA sequence.

[0145] Specifically, the weight of the virus classification model corresponding to the length range to which the sequence length of the target DNA sequence belongs can be set to be the highest, and the weights of other virus classification models can decrease according to the difference in length range.

[0146] For example, assuming that four virus classification models a, b, c and d are trained, and the respective specified length ranges are: 100-400bp, 400-800bp, 800-1200bp and 1200-1800bp. The length range to which the target DNA sequence belongs is: 400-800bp. Then the weight of the virus classification model b can be determined as 1.5, the weights of the virus classification model a and the virus classification model c are 0.8, and the weight of the virus classification model d is 0.5.

[0147] S1043A, according to the respective weights of the virus classification models corresponding to the plurality of specified length ranges, weighting average the respective outputs of the virus classification models corresponding to the plurality of specified length ranges, to obtain the probability that the target DNA sequence is a eukaryotic virus and the probability that the target DNA sequence is a prokaryotic virus.

[0148] In the embodiments of the present application, when predicting the type to which the target DNA sequence belongs, the outputs of the virus classification models corresponding to different specified length ranges are considered, and accordingly, the prediction result obtained considers more comprehensive information, and a more accurate prediction result can be obtained.

[0149] In the embodiments of the present application, in the case of obtaining a plurality of virus classification models through training, the length range to which the sequence length of the target DNA belongs can be determined first, and then the virus classification model corresponding to the length range is selected for prediction to obtain a prediction result.

[0150] Specifically, the above step S104 can include the following sub-steps:

[0151] S1041B, determining a target specified length range to which the sequence length of the target DNA sequence belongs from the plurality of specified length ranges.

[0152] In the embodiments of the present application, in actual application, a plurality of target specified length ranges to which a plurality of target DNA sequences belong can be divided according to a plurality of specified length ranges.

[0153] S1042B, inputting the distance-dependent matrix into the virus classification model corresponding to the target specified length range to obtain the probability that the target DNA sequence is a eukaryotic virus and the probability that the target DNA sequence is a prokaryotic virus.

[0154] In the embodiments of the present application, for each target DNA sequence, only one model prediction calculation is required, and a prediction result can be quickly obtained, and the selection of the virus classification model corresponding to the specified length range of the sequence length of the target DNA can also accurately realize the prediction of the virus type of the target DNA sequence.

[0155] Reference Figure 4 , shows a virus classification device, the device comprises:

[0156] The tri-nucleotide set extraction module 401 is configured to extract tri-nucleotide sets from the target DNA sequence in the form of 3-mer in sequence;

[0157] The statistical module 402 is configured to use a distance-dependent function to statistically calculate the distance-dependent values between each two tri-nucleotide sets in the tri-nucleotide set in sequence along a fixed direction;

[0158] The input module 403 is configured to fill all the obtained distance-dependent values as matrix elements into a 64*64 distance-dependent matrix.

[0159] The prediction module 404 is configured to input the distance-dependent matrix into a pre-trained virus classification model to obtain a probability that the target DNA sequence is a eukaryotic virus and a probability that the target DNA sequence is a prokaryotic virus.

[0160] The virus classification model has learned, in advance, 64*64 distance-dependent matrices of a plurality of known DNA sequences with labels, and a part of the plurality of known DNA sequences have eukaryotic virus labels, and another part of the plurality of known DNA sequences have prokaryotic virus labels.

[0161] Optionally, the distance-dependent function is as follows:

[0162]

[0163] wherein ψ uv (s) represents a distance-dependent value between two tri-nucleotide u and v;

[0164] Λ uv (s) represents a position set of two tri-nucleotide u and v in the tri-nucleotide set;

[0165] |Λ uv (s)| represents a size of the position set of two tri-nucleotide u and v in the tri-nucleotide set;

[0166] m and l represent position serial numbers of two tri-nucleotide u and v in the tri-nucleotide set, respectively;

[0167] |m-l| represents a distance between the position serial numbers of two tri-nucleotide u and v in the tri-nucleotide set;

[0168] k represents a distance-dependent hyperparameter.

[0169] Optionally, the apparatus further comprises:

[0170] The first sample collection module is configured to obtain a plurality of DNA sequences of viruses with eukaryotic hosts and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with prokaryotic hosts and add corresponding prokaryotic virus labels;

[0171] The first sample classification module is configured to add a part of the DNA sequences of viruses with labels to a test set, and add the remaining part to a training set;

[0172] The first training set distance-dependent matrix determination module is configured to convert each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix.

[0173] The first training module is configured to input the 64*64 distance-dependent matrix and the corresponding label into a preset model for training to obtain the virus classification model.

[0174] Optionally, the apparatus further comprises:

[0175] The second sample collection module is configured to obtain a plurality of DNA sequences of viruses with eukaryotic hosts and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with prokaryotic hosts and add corresponding prokaryotic virus labels, wherein the sequence length of each DNA sequence is within a specified length range.

[0176] The second training module is configured to, for each length range: add a part of the DNA sequences of viruses with labels to a test set, and add the remaining part to a training set; convert each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix; and input the 64*64 distance-dependent matrix and the corresponding label into a preset model for training to obtain a virus classification model corresponding to the specified length range.

[0177] The prediction module 404 comprises:

[0178] The first probability determination submodule is configured to input the distance-dependent matrix into a plurality of virus classification models corresponding to a plurality of specified length ranges respectively to obtain outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, wherein the outputs comprise probabilities that the target DNA sequence is a eukaryotic virus and probabilities that the target DNA sequence is a prokaryotic virus.

[0179] The weight determination submodule is configured to determine weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to the sequence length of the target DNA sequence.

[0180] The weighted average submodule is configured to perform weighted averaging on the outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to the weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively to obtain the probabilities that the target DNA sequence is a eukaryotic virus and the probabilities that the target DNA sequence is a prokaryotic virus.

[0181] Optionally, the apparatus further comprises:

[0182] The third sample collection module is configured to obtain a plurality of DNA sequences of viruses with eukaryotic hosts and add corresponding eukaryotic virus labels, and obtain a plurality of DNA sequences of viruses with prokaryotic hosts and add corresponding prokaryotic virus labels, wherein the lengths of the DNA sequences are in a specified length range;

[0183] The third training module is configured to, for each length range: add part of the DNA sequences of viruses with labels to a test set, and add the rest to a training set; convert each DNA sequence with a label in the training set into a corresponding distance-dependent matrix of 64*64; input the distance-dependent matrix of 64*64 and the corresponding label into a preset model for training, to obtain a virus classification model corresponding to the specified length range;

[0184] The prediction module 404 comprises:

[0185] The target specified length range determination sub-module is configured to determine a target specified length range in which the sequence length of the target DNA sequence is located from the plurality of specified length ranges.

[0186] The second probability determination sub-module is configured to input the distance-dependent matrix into the virus classification model corresponding to the target specified length range, to obtain a probability that the target DNA sequence is a eukaryotic virus and a probability that the target DNA sequence is a prokaryotic virus.

[0187] It should be noted that the device embodiment is similar to the method embodiment, and therefore the description is relatively simple, and reference can be made to the method embodiment.

[0188] The embodiment of the present application further provides an electronic device, comprising:

[0189] A memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the virus classification method according to any one of the above embodiments.

[0190] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program for enabling a processor to execute the virus classification method according to any one of the above embodiments.

[0191] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to.

[0192] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, apparatus, or computer program product. Accordingly, embodiments of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer program instructions.

[0193] Embodiments of the present application are described herein with reference to the Figure 1 one or more processes and / or functions specified in flowchart block / flowchart blocks. Figure 1 means for performing the function specified by the flowchart block / flowchart blocks.

[0194] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 one or more processes and / or functions specified in flowchart block / flowchart blocks. Figure 1 means for performing the function specified by the flowchart block / flowchart blocks.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 one or more processes and / or functions specified in flowchart block / flowchart blocks. Figure 1 means for performing the function specified by the flowchart block / flowchart blocks.

[0196] While preferred embodiments of the present application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to cover all such modifications and variations as fall within the scope of the present application.

[0197] Finally, it needs to be pointed out that in this article, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or terminal device. Without more limitation, the element defined by the statement "includes a" does not exclude the presence of other identical elements in the process, method, article or terminal device including the element.

[0198] The above describes in detail the virus classification method, device, equipment and storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples in this article. The above example description is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed; in view of the above, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method of classifying a virus, characterized by, The method comprises: extracting a set of triplex nucleotides from a target DNA sequence in the form of 3-mer in sequence; statistically obtaining distance-dependent values between each two triplex nucleotides in the set of triplex nucleotides along a fixed direction using a distance-dependent function in sequence; filling all the distance-dependent values obtained by statistics as matrix elements into a 64*64 distance-dependent matrix; inputting the distance-dependent matrix into a pre-trained virus classification model to obtain a probability of the target DNA sequence being a eukaryotic virus and a probability of the target DNA sequence being a prokaryotic virus; wherein the virus classification model has previously learned 64*64 distance-dependent matrices of a plurality of known DNA sequences each, and a part of the plurality of known DNA sequences have a eukaryotic virus label, and another part of the plurality of known DNA sequences have a prokaryotic virus label; the distance-dependent function is: ; wherein, represents the distance-dependent value between the two triplex nucleotides u, v ​ represents two triplex nucleotides u, v a set of positions in the set of triplex nucleotides; represents two triplex nucleotides u, v a size of the set of positions in the set of triplex nucleotides; m、l represents two triplet nucleotides u, v the position number in the respective set of triplet nucleotides; represents two triplet nucleotides u, v distance between position numbers in the set of triplet nucleotides; k denotes a distance-dependent hyperparameter.

2. The method of claim 1, wherein, The method further comprises: obtaining a plurality of DNA sequences of viruses with eukaryotic hosts and adding corresponding eukaryotic virus labels, and obtaining a plurality of DNA sequences of viruses with prokaryotic hosts and adding corresponding prokaryotic virus labels; adding a part of the DNA sequences of viruses with labels to a test set, and adding the remaining part to a training set; converting each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix; inputting the 64*64 distance-dependent matrix and its corresponding label into a preset model for training to obtain the virus classification model.

3. The method of claim 1, wherein, The method further comprises: obtaining a plurality of DNA sequences of viruses with eukaryotic hosts and adding corresponding eukaryotic virus labels, and obtaining a plurality of DNA sequences of viruses with prokaryotic hosts and adding corresponding prokaryotic virus labels; for each length range: adding a part of the DNA sequences of viruses with labels to a test set, and adding the remaining part to a training set; converting each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix; inputting the 64*64 distance-dependent matrix and its corresponding label into a preset model for training to obtain a virus classification model corresponding to the specified length range; inputting the distance-dependent matrix into a pre-trained virus classification model to obtain a probability of the target DNA sequence being a eukaryotic virus and a probability of the target DNA sequence being a prokaryotic virus, comprising: inputting the distance-dependent matrix into a plurality of virus classification models corresponding to a plurality of specified length ranges respectively to obtain outputs of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively, the outputs comprising: a probability of the target DNA sequence being a eukaryotic virus and a probability of the target DNA sequence being a prokaryotic virus; determining weights of the plurality of virus classification models corresponding to the plurality of specified length ranges respectively according to a sequence length of the target DNA sequence; and According to weights of the virus classification models corresponding to the multiple specified length ranges, the outputs of the virus classification models corresponding to the multiple specified length ranges are weighted and averaged to obtain probabilities that the target DNA sequence is a eukaryotic virus and a prokaryotic virus.

4. The method of claim 3, wherein, The method further comprises: obtaining a plurality of DNA sequences of viruses with a host being a eukaryote and a sequence length in a specified length range and adding a corresponding eukaryotic virus label, and obtaining a plurality of DNA sequences of viruses with a host being a prokaryote and a sequence length in the specified length range and adding a corresponding prokaryotic virus label; For each length range: adding a part of the DNA sequences of viruses with a label to a test set and adding the remaining part to a training set; converting each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix; inputting the 64*64 distance-dependent matrix and the corresponding label into a preset model for training to obtain a virus classification model corresponding to the specified length range; inputting the distance-dependent matrix into the pre-trained virus classification model to obtain probabilities that the target DNA sequence is a eukaryotic virus and a prokaryotic virus, comprising: determining a target specified length range in which the sequence length of the target DNA sequence is located from the multiple specified length ranges; inputting the distance-dependent matrix into the virus classification model corresponding to the target specified length range to obtain probabilities that the target DNA sequence is a eukaryotic virus and a prokaryotic virus.

5. A virus classification apparatus characterized by comprising: The device comprises: a tri-nucleotide set extraction module configured to extract tri-nucleotide sets from a target DNA sequence in a 3-mer form in sequence; a statistical module configured to use a distance-dependent function to statistically determine distance-dependent values between each two tri-nucleotide sets in the tri-nucleotide sets in sequence along a fixed direction; an input module configured to fill all the distance-dependent values obtained by the statistical module as matrix elements into a 64*64 distance-dependent matrix; a prediction module configured to input the distance-dependent matrix into a pre-trained virus classification model to obtain probabilities that the target DNA sequence is a eukaryotic virus and a prokaryotic virus; wherein the virus classification model has learned 64*64 distance-dependent matrices of a plurality of known DNA sequences with labels in advance, a part of the plurality of known DNA sequences has a eukaryotic virus label, and another part of the plurality of known DNA sequences has a prokaryotic virus label; the distance-dependent function is: ; wherein, represents the distance-dependent value between the two triplex nucleotides u, v ​ represents two triplex nucleotides u, v a set of positions in the set of triplex nucleotides; represents two triplex nucleotides u, v a size of the set of positions in the set of triplex nucleotides; m、l represents two triplet nucleotides u, v the position number in the respective set of triplet nucleotides; represents two triplet nucleotides u, v distance between position numbers in the set of triplet nucleotides; k denotes a distance-dependent hyperparameter.

6. The apparatus of claim 5, wherein, The device further comprises: a first sample collection module configured to obtain a plurality of DNA sequences of viruses with a host being a eukaryote and add a corresponding eukaryotic virus label, and obtain a plurality of DNA sequences of viruses with a host being a prokaryote and add a corresponding prokaryotic virus label; a first sample classification module configured to add a part of the DNA sequences of viruses with a label to a test set and add the remaining part to a training set; The first training set distance-dependent matrix determination module is configured to convert each DNA sequence with a label in the training set into a corresponding 64*64 distance-dependent matrix. The first training module is configured to input the 64*64 distance-dependent matrix and the corresponding label into a preset model for training to obtain the virus classification model.

7. An electronic device, comprising: The computer program stored in the memory and executable on the processor comprises the following steps: The processor is configured to execute the virus classification method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer program stored in the memory and executable on the processor comprises the following steps:

Citation Information

Patent Citations

  • Data multi-label classification method for predicting protein functions

    CN112365931A

  • Method for a Pattern Discovery and Recognition

    US20120023047A1