Virus gene sequence host prediction method and system

By using the pre-trained BERT model and self-attention mechanism to vectorize and extract features of viral gene sequences, combined with a deep fully connected neural network, the problems of dependence on labeled data and strict format requirements in viral host prediction are solved, and efficient prediction of long and short viral gene sequences is achieved.

CN120708708APending Publication Date: 2025-09-26SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410344773.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing virus host prediction methods rely too much on labeled data and fail to effectively utilize natural language processing models, making it difficult to process data with strict format requirements and unseen data.

Method used

The pre-trained BERT language model is used to vectorize the viral gene sequence, and self-attention mechanism and average pooling are used in combination with a deep fully connected neural network for feature extraction and host prediction.

Benefits of technology

It improves the accuracy of viral gene sequence feature extraction, can process sequences of varying lengths, and significantly enhances the ability to analyze the potential infectiousness of unknown viral gene sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708708A_ABST
    Figure CN120708708A_ABST
Patent Text Reader

Abstract

The invention discloses a virus gene sequence host prediction method and system, and belongs to the technical field of biological information analysis, and the method comprises the steps: dividing a virus gene sequence into ordered k-mer word sequences, and carrying out the vectorization of the k-mer word sequences through a pre-trained BERT language model, and obtaining an embedded vector; mapping the embedded vector of the high-dimensional space into a low-dimensional space with a fixed dimension by adopting an average pooling method, and reducing the embedded dimension to obtain a feature vector representing an original gene sequence; the feature vectors are input into a pre-trained classification network model to predict the likelihood that the sequence is infected with a particular host. According to the method, the complete virus gene sequence is directly used as input, so that information loss possibly caused by dependence on statistical characteristics is avoided, and the accuracy of characteristic extraction is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bioinformatics analysis, and in particular to a method and system for predicting viral gene sequence hosts. Background Art

[0002] With the rapid development of viral gene sequencing technology, research on viruses and other microorganisms no longer relies solely on laboratory culture. With the large-scale establishment of databases of viral gene sequences, protein sequences, and other information, a growing number of bioinformatics methods are being developed that use computer technology to perform biological analysis on viral data. The present invention can directly predict the biological characteristics of viruses through computer analysis, providing new insights into virus analysis and research. However, due to the unstructured nature of viral gene data and the unclear principles of gene expression, traditional computational statistical methods for analyzing viral gene data are often ineffective. However, machine learning methods can be directly driven by data, allowing computer programs to automatically learn the biological laws that the present invention aims to understand from large-scale data.

[0003] With the continuous progress of globalization, viruses have increasingly become the most threatening pathogens to human health. In the early stages of the emergence of new viruses, the analysis and prediction of the potential hosts of the virus is extremely important and has great significance for epidemic prevention and control. The current methods for feature extraction of viral gene sequences and then host prediction are often based on supervised deep learning methods. Prior art 1: (Bartoszewicz, Jakub M. et al. "Interpretable Detection Of Novel Human Viruses From Genome Sequencing Data", NAR genomics and bioinformatics 3.1 (2021): lqab004.) et al. developed a new method based on a deep neural network architecture to predict whether a virus can infect humans from next-generation sequencing data. This method significantly surpasses traditional machine learning and homology algorithms in accuracy, and introduces an easy-to-install software package so that users without deep learning experience can analyze data and provide professional users with the possibility of training and interpreting genomic models. Prior art 2: (Zhang, Zheng et al. "Rapid identification of human-infecting viruses.", Transboundary and Emerging Diseases 66.6 (2019): 2517-2522.) et al. successfully distinguished viruses that infect humans from other viruses by constructing multiple machine learning models based on the k-mer frequency in viral genome sequences, and predicted viruses that infect humans with an accuracy of over 90% through the K-nearest neighbor (KNN) model, demonstrating the conceptuality and versatility of this method in viral metagenomics research for discovering new human-infecting viruses. Prior art three: (Mock, Florian et al. "Vidhop, Viral Host Prediction With Deep Learning", Bioinformatics 37.3(2021): 318-325.) et al. proposed a fast and accurate deep learning method based on viral genome sequences to predict viral hosts. By testing on three different virus species (influenza A virus, rabies virus and rotavirus A), they achieved AUC values ​​of up to 0.93 to 0.98, proving that even with limited sequence data and highly unbalanced data, viral hosts can be predicted highly accurately.

[0004] The main problems with existing virus feature extraction and host prediction methods are: 1) They rely too much on labeled virus host data. In reality, labeled virus data is very scarce, and the labels in the database are often not very reliable. This severely limits the practical application of supervised virus host prediction methods. 2) Currently, artificial intelligence models for natural language processing have not been applied to the task of virus host prediction. Past methods have mainly used simple deep learning models such as convolutional neural networks and recurrent neural networks, rather than transformer natural language processing models based on self-attention mechanisms. 3) Current virus host prediction methods often have strict requirements on the format of input data, which cannot be too long or too short. In addition, it is difficult to process data that has not appeared in the model training database. Summary of the Invention

[0005] To overcome the shortcomings of the existing technology, the present invention provides a method and system for predicting the host of a viral gene sequence. The present invention directly uses the complete viral gene sequence as input, avoiding the information loss that may result from relying on statistical features, and significantly improving the accuracy of feature extraction.

[0006] The purpose of the present invention is achieved at least through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for predicting the host of a viral gene sequence, comprising:

[0008] Divide the viral gene sequence into an ordered k-mer word sequence and use the pre-trained BERT language model to vectorize the k-mer word sequence to obtain an embedding vector;

[0009] The average pooling method is used to map the embedding vector of the high-dimensional space to a low-dimensional space of fixed dimension, and the feature vector representing the original gene sequence is obtained after reducing the embedding dimension;

[0010] The feature vectors are input into a pre-trained classification network model to predict the likelihood of a sequence targeting a specific host infection.

[0011] As a further improvement of the present invention, the viral gene sequence is divided into ordered k-mer word sequences, comprising:

[0012] The long viral gene sequence is split into shorter fixed-length segments and the segments are labeled, and the long gene sequence is processed to obtain an ordered k-mer word sequence.

[0013] As a further improvement of the present invention, the k-mer word sequence is vectorized using the pre-trained BERT language model to obtain an embedding vector, including:

[0014] The long sequence is divided into multiple fixed-length but non-overlapping segments, and the vector embeddings of the segments are obtained through the pre-trained BERT model respectively; the embedded vectors are then average-pooled to synthesize a fixed-dimensional feature vector.

[0015] As a further improvement of the present invention, the k-mer word sequence is vectorized using the pre-trained BERT language model, and a tag is introduced into the obtained embedding vector, specifically:

[0016] The [BAR] marker added at the beginning of the sequence is used to indicate the beginning of the same original genome fragment; [PAD] is used for padding; [UNK] indicates unknown words; [SEP] is used as a marker for the end of the sequence; and [MASK] is used for masking operations.

[0017] Through tagging, long sequences are segmented and tokenized into a k-mer sentence sequence, and [BAR] and [SEP] tags are added at the beginning and end of the sequence respectively. In the BERT language model, the embedding representation of each word is composed of a position embedding vector and a field embedding vector, and the vector representation of the word is finally obtained by adding them together.

[0018] As a further improvement of the present invention, the k-mer word sequence is vectorized using the pre-trained BERT language model to obtain an embedding vector, specifically including:

[0019] Sequence the original viral gene into short sequences represented by k-mer;

[0020] Restore the occluded original sequence, calculate the cross entropy loss to optimize the loss function, and correctly predict the occluded gene sequence;

[0021] Skip masking the input data and directly input the embedded sequence into the pre-trained model. Then take the average of the embedding vectors of the [CLS] special characters of each segmented short sequence as the feature vector of the original input viral gene sequence.

[0022] As a further improvement of the present invention, the pre-trained BERT model includes a Transformer network model using a self-attention mechanism.

[0023] As a further improvement of the present invention, the training process of the pre-trained BERT model is as follows:

[0024] By randomly masking some words, the BERT language model is forced to rely on the context to predict the masked words.

[0025] Continuously mask a k-mer of variable length, where the length follows a normal distribution with mean k and variance k-3;

[0026] The masked k-mers initially account for a certain proportion p of the total number of input k-mers; as training progresses, the masked proportion will gradually increase according to the percentage;

[0027] During the pre-training phase, the cross-entropy loss function was used for optimization. Pre-training on unlabeled data used the cumulative gradient method to calculate and update the network parameters after a certain number of pre-training steps, and then cleared the gradient to enter the next cycle. The Adam optimizer was used to dynamically adjust the learning rate according to the changes in the trapezoidal cycle. An early stopping strategy was adopted, and the same parameter settings were used during pre-training, and single-precision floating-point numbers were used for model training. In pre-training on a large-scale unlabeled corpus, the embedding vectors from the same viral gene sequence but different subsequences were merged through the average pooling strategy to obtain a vector representing the viral gene sequence.

[0028] As a further improvement of the present invention, the pre-trained classification network model is based on a deep fully connected neural network, which is a neural network with a depth of 4 layers, each layer including a fully connected layer, a ReLU activation function layer and a dropout layer.

[0029] In a second aspect, the present invention provides a viral gene sequence host prediction device, comprising:

[0030] The tokenization and embedding module is used to divide the viral gene sequence into an ordered k-mer word sequence and vectorize the k-mer word sequence using the pre-trained BERT language model to obtain an embedding vector;

[0031] The dimensionality reduction module is used to map the embedding vector in the high-dimensional space to a low-dimensional space of fixed dimension using the average pooling method. After reducing the embedding dimension, the feature vector representing the original gene sequence is obtained.

[0032] The classification prediction module is used to input the feature vector into the pre-trained classification network model to predict the possibility of the sequence infecting a specific host.

[0033] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the viral gene sequence host prediction method when executing the computer program.

[0034] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the viral gene sequence host prediction method is implemented.

[0035] In a fourth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions instruct a computer to execute the viral gene sequence host prediction method.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] This invention introduces an attention-based language model into the field of gene sequence representation learning. Through self-supervised learning, it obtains a deep feature representation of the DNA sequence, thereby capturing the deep semantic information of the gene encoding. Secondly, by reducing the dimensionality of the gene sequence representation vector, the model is made applicable to both short and long sequence application scenarios. Finally, the attention-based language model is applied to the task of predicting the host of viral gene sequences, which can effectively analyze the potential infectiousness of unknown viral gene sequences to humans. The method proposed in this embodiment has demonstrated superior performance to existing tools in both the human infectivity prediction task of viral gene sequences and the phage host prediction task, confirming its wide applicability and significant effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.

[0039] Figure 1 This is a flow chart of a method for predicting hosts of viral gene sequences according to the present invention;

[0040] Figure 2 This is a diagram of the overall workflow of an embodiment of the present invention;

[0041] Figure 3 Flowchart for embedding, pre-training and feature extraction;

[0042] Figure 4 A viral gene sequence host prediction device provided by the present invention;

[0043] Figure 5 This is a schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0044] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided for ease of explanation only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0045] Glossary

[0046] K-mer (short sequence of length k): A K-mer is a DNA fragment of length k, obtained by shearing a portion of a sequencing read. k is an odd number, and the number of k equals the number of K-mers.

[0047] BERT language model: BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained deep bidirectional language model. The core of the BERT model is the bidirectional Transformer encoder, which can simultaneously utilize left-to-right and right-to-left information in a sentence. This enables BERT to perform well in natural language processing tasks such as question answering, named entity recognition, natural language inference, and text classification.

[0048] like Figure 1 As shown, the first object of the present invention is to provide a method for predicting the host of a viral gene sequence, comprising:

[0049] S100 divides the viral gene sequence into ordered k-mer word sequences and uses the pre-trained BERT language model to vectorize the k-mer word sequences to obtain embedding vectors;

[0050] S200 uses the average pooling method to map the embedding vector of the high-dimensional space to a low-dimensional space of fixed dimension, reducing the embedding dimension to obtain the feature vector representing the original gene sequence;

[0051] S300, the feature vector is input into a pre-trained classification network model to predict the possibility of the sequence targeting a specific host infection.

[0052] This paper provides a system and framework for automatically extracting viral gene sequence features and predicting host hosts. This framework uses deep learning methods for sequence analysis. Compared with traditional methods, this system directly uses the complete viral gene sequence as input, avoiding the information loss that may result from relying on statistical features, and significantly improving the accuracy of feature extraction.

[0053] The viral gene sequence host prediction of the present invention is mainly based on the fact that after model pre-training, the model can extract features from highly diverse and unstructured viral gene sequence data to obtain complex features in the diverse viral gene sequences. These features show excellent separability in the feature space and can be used for subsequent biological tasks; secondly, based on the viral gene sequence feature extraction model implemented by the present invention, a viral host prediction tool is developed and implemented, which achieves good prediction results on known data sets and can predict the infectivity of new virus species that do not exist in the training database to humans.

[0054] By employing an attention mechanism based on the BERT pre-trained model, viral gene sequences are effectively encoded into numerical vectors, providing a foundation for a variety of subsequent tasks (including classification, clustering, and interpretable analysis). Furthermore, this work designed a classification system based on a deep, fully connected network. By clearly separating the pre-training and fine-tuning phases, the model can be easily transferred to other gene sequence datasets. This system can also handle gene sequences of varying lengths, ranging from 250 base pairs to tens of thousands of base pairs, significantly enhancing its applicability and flexibility.

[0055] The complete technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments:

[0056] The workflow of the present invention is broken down into three key phases, as described below and in Figure 2 A visual display is given in:

[0057] (i) Sequence Tokenization and Embedding: First, to convert the original virus sequence into a form that can be effectively processed by machine learning methods, the present invention divides the viral gene sequence into ordered k-mer word sequences and uses the BERT language model to vectorize these k-mer word sequences and learn their embedded representations.

[0058] (ii) Dimensionality reduction: Since the BERT model embeds each sequence into a high-dimensional space, and the inconsistency in the length of viral gene sequences leads to dimensional differences in the embedding vectors, the present invention uses average pooling technology to map these high-dimensional embedding vectors into a low-dimensional space of fixed dimension to achieve a unified representation of viral gene sequences.

[0059] (iii) Classification network training: After dimensionality reduction, the present invention inputs the obtained representation vector of the viral gene sequence into a deep fully connected neural network to predict the possibility of the sequence infecting a specific host.

[0060] Figure 2Description: Overview of the method process framework: (A) Embedding gene sequences and pre-training BERT model: The long gene sequence is processed by splitting the long viral gene sequence into shorter fixed-length segments and marking the same origin of the segments. Then, the BERT model is pre-trained using the embedded k-mers sequence. (B) Dimensionality reduction: The feature vectors belonging to an original sequence obtained after BERT model pre-training are average pooled to reduce the dimension of the embedding and obtain a feature vector representing the original gene sequence. (C) Training classification network: The feature vectors obtained in the above steps are classified and trained on a fully connected network, and finally a classification network is obtained to determine the infectivity prediction of the viral gene sequence for a specific host.

[0061] The technical details of preprocessing and pre-training viral gene sequence data and using the model for feature extraction are as follows:

[0062] This paper uses the BERT model, which incorporates a Transformer network with a self-attention mechanism. This model has proven effective in capturing sparse dependencies in long sequences, particularly for learning accurate embedding representations for sequential data such as text and video. Recent research has also attempted to apply BERT to DNA sequence encoding (e.g., DNABERT), primarily for classification problems, which typically require truncation of long sequences to accommodate BERT's processing capabilities.

[0063] In order to overcome the challenges of long sequence processing in virus host prediction, the present invention adopts an average pooling strategy. Specifically, the present invention divides the long sequence into multiple fixed-length but non-overlapping segments, and obtains the vector embeddings of these segments through the BERT model respectively. These embedding vectors are then processed by average pooling to synthesize a feature vector of fixed dimension. In specific operations, the present invention divides the sequence into segments of a fixed length of 500nt, and these segments are further converted into (500-k+1) overlapping k-mer words, where k is 6. These k-mer word sequences are used to train the BERT embedding model, and each k-mer is processed as a separate vocabulary in the sentence. In order to filter out the noise in the sequencing process, k-mers with extremely low frequency of occurrence in the entire corpus (less than 100 times) are considered to be erroneous insertions and are removed from the sequence.

[0064] In addition, the present invention also introduces five special markers, namely: [BAR] marker added at the beginning of the sequence to indicate the beginning of the same original genome fragment; [PAD] is used for padding; [UNK] indicates unknown words; [SEP] is used as a marker for the end of the sequence; and [MASK] is used for masking operations. Figure 3As shown in Figure A, in this way, the present invention segments and tokenizes the long sequence into a k-mer sentence sequence, and adds [BAR] (as a barcode mark for the entire sequence) and [SEP] (indicating the end of the sequence) marks at the beginning and end of the sequence respectively. In the model of the present invention, the embedding representation of each word is composed of a position embedding vector and a field embedding vector, and finally the vector representation of the word is obtained by adding them together, as shown in Figure 1. Figure 3 A presented.

[0065] The data preprocessing method used in this method is to split a long continuous sequence into a number of short sequence segments of fixed length. Next, these segments are converted into a sequence consisting of k-mers, and the [BAR] identifier is introduced at the beginning of the sequence (as a unique identifier of the entire sequence), and the [SEP] identifier is added at the end of the sequence (marking the end of the sequence). In the proposed model, the embedding layer of each word is composed of a position embedding vector and a segment embedding vector. The sum of these two vectors constitutes the numerical representation of the relevant paragraph, as shown in Figure 3 As shown in A.

[0066] Figure 3 Explanation: (A) Embedding: The original viral gene sequence is converted into short sequences represented by k-mers, such as 6-mers. (B) Pre-training: The original sequence that was obscured is restored, and the cross-entropy loss is calculated to optimize the loss function to accurately predict the obscured gene sequence. (C) Feature extraction after pre-training: Skipping the masking step of the input data, the embedded sequence is directly input into the pre-trained model. The average of the embedding vectors of the [CLS] special character in each segmented short sequence is then taken as the feature vector of the original input viral gene sequence.

[0067] Among them, the pre-training process of the model is:

[0068] This embodiment, based on the principles of BERT, employs a BERT-like architecture for pre-training. The present invention improves upon the BERT prototype to enhance its processing capabilities for DNA sequence data. Specifically, the present invention randomly masks a portion of vocabulary, forcing the model to rely on context to predict these masked words. This means that masked k-mers can be more easily inferred by analyzing surrounding k-mers. The pre-training method of this embodiment differs from BERT in two key aspects: (I) A continuous masking strategy is implemented, which continuously masks a segment of k-mers of variable length, where this segment follows a normal distribution with a mean of k and a variance of k-3. (II) A dynamic k-mer masking method is employed. Initially, masked k-mers account for a certain proportion p (default 10%) of the total number of input k-mers. As training progresses, the masked proportion gradually increases by a certain percentage. Specifically, starting from the second training cycle, the masked proportion increases by a fixed percentage q. That is, in the i-th training cycle, the masked k-mer proportion is (p + q(i-1)). These two strategies aim to increase the difficulty of training so that the BERT model can learn more information.

[0069] In the pre-training stage, the present invention uses the cross entropy loss function for optimization:

[0070]

[0071] where y′ i represents the true probability, y i Represents the probability of each category predicted by the model.

[0072] In addition, the present invention performed pre-training on a large amount of unlabeled data for approximately 100k steps, for a total of 5 training cycles, with adaptive batch size adjustment (initial batch size was set to 64). To conserve GPU memory, the present invention adopted a cumulative gradient method, that is, after a certain number of pre-training steps, the network parameters were calculated and updated, and then the gradients were cleared before entering the next cycle (the initial cumulative gradient step was set to 48). The Adam optimizer was used, and the learning rate was dynamically adjusted according to the trapezoidal cycle changes (the initial learning rate was set to 5e-4).

[0073] At the same time, in order to prevent overfitting and save computing resources, the present invention adopts an early stopping strategy. The model architecture is similar to BERTbase, consisting of 12 Transformer layers, each with 512 hidden units and 8 attention heads. All models use the same parameter settings during pre-training. The present invention trained the model using single-precision floating-point numbers on a system equipped with 4 NVIDIA TITAN Xp GPUs. Through pre-training on a large-scale unlabeled corpus, the present invention can merge the embedding vectors from the same viral gene sequence but different subsequences through an average pooling strategy to obtain a vector representing the viral gene sequence, which can then be used for subsequent tasks.

[0074] Build a classification network for predicting infectivity:

[0075] In the pre-training stage of the model, the present invention trains all available data. When entering the fine-tuning stage, when training the two-category network of whether it can infect humans, taking into account the problem of data imbalance, the present invention adopts data balancing processing measures, and randomly selects a part of the data that cannot infect humans as negative samples in the training process. In the fine-tuning training stage, the present invention keeps the previously trained BERT model parameters unchanged and only trains the parameters of the classification network. The classification network used is a neural network with a depth of 4 layers, each layer including a fully connected layer, a ReLU activation function layer and a dropout layer (the dropout rate is set to 0.5). Then, the present invention divides the data into a training set and a test set, and performs 10 training cycles to complete the training of the classification network model.

[0076] In this example, the present invention proposes host prediction for viral gene sequences and experiments were conducted on benchmark datasets. To verify the effectiveness of the virus host prediction method of the present invention, the present invention used five standard datasets for experiments. These datasets are mainly based on the VirusHostDB website (https: / / www.genome.jp / virushostdb / ), which collects and provides complete viral genomes containing host infection information from the NCBI database (URL: https: / / www.ncbi.nlm.nih.gov / labs / virus / vssi / # / ). Considering that viruses may be infective to multiple hosts, the focus of this invention is on infectivity to humans.

[0077] The first three data sets designed by the present invention all follow an open access policy, that is, there is no restriction on the taxonomic category of viral gene sequences, so that the model can process various types of viral gene sequences collected in the environment. The first data set contains 9,428 viral gene sequences longer than 1k bp, of which 1,236 have the ability to infect humans, and the remaining 8,192 do not. The number of species in these two types of samples has not been counted in detail. The second data set covers 9,496 viral gene sequences from 7,503 species, of which 1,309 sequences are from 393 species that can infect humans. This data set focuses on analyzing short sequences, breaking down longer sequences into small fragments of 250bp for study.

[0078] In order to evaluate the model's ability to handle unknown species, the present invention constructed a third benchmark data set, randomly selecting 18,654 sequences from the VirusHostDB database, including 10,911 positive samples and 7,743 negative samples, which came from 975 unique species in 139,792 sequences. Different strains of the same species are considered to be different species if they have different infectivity to human hosts. In this setting, 233 species (3,791 sequences) are used for training and 742 species (14,863 sequences) are used for testing, ensuring that the sequences in the test set have no corresponding sequences with similar labels in the training set. In addition, the fourth data set aims to evaluate the model's ability to identify the infectivity of different viruses in the same genus to the host, and specifically studies the three viral genera of rotavirus A, influenza A, and rabieslyssavirus.

[0079] This benchmark dataset was originally used for multi-host prediction, but the specific data has not yet been made public. The present invention replicated this research process, downloaded 15,658 viral gene sequences of these three genera from the NCBI database. These sequences contain complete host information and simplified them into a human / non-human binary classification task. In addition, in order to expand the scope of application of the model, the present invention also collected all viral genome data marked with host information from the NCBI database, and classified phages that infect the same bacterial family through manual screening, thereby constructing a fifth dataset containing host tag information for 66 phage viruses, totaling 6,841 sequence data.

[0080] The present invention's experiments used a host signature generated for each viral gene sequence sample using the VHDB database for benchmarking, treating long and short sequences consistently. The present invention defined true positive (TP), true negative (TN), false positive (FP), and false negative (FN) metrics, and based on these metrics, calculated model performance metrics such as accuracy, precision, recall, and specificity. In the process of phage host prediction, the present invention used prediction accuracy as a metric to evaluate the present model.

[0081] Table I Experimental dataset details

[0082]

[0083] First, the present invention compares the method of the present invention with the latest viral DNA sequence pathogenicity classification tool (prior art one). In the experiment, the present invention followed the above experimental ideas and pre-trained the model using the benchmark data set of the present invention. After obtaining the pre-trained model, the present invention performed feature extraction on the VHDB-250 data set and vectorized the viral gene sequence data. Then, on the same classification network, the present invention performed pathogenicity classification training on DNA fragments. Finally, the present invention demonstrated the comparison of the method of the present invention with the method mentioned in (prior art one) on the VHDB-250 data set, and the results are shown in Table II. In addition, the present invention obtained a classification network in a similar manner, which has a high prediction accuracy on the VHDB1K data set, exceeding the classification accuracy given by (prior art two). The comparison of the method of the present invention with the method mentioned in (prior art two) on the VHDB-1K data set is shown in Table III.

[0084] Table II Comparison of the method of the present invention and other methods on the VHDB-250 dataset

[0085]

[0086] Table III Comparison of the method of the present invention and other methods on the VHDB-1K dataset

[0087]

[0088] We compared multi-host prediction using the model proposed in VIDHOP (prior art three) and our own model. We observed improved accuracy on the rotavirus A and rabies virus datasets, while maintaining the same accuracy on the influenza A dataset. Table IV shows a comparison of our method with the method in the referenced paper on the VIDHOP dataset.

[0089] Table IV Comparison of the method of the present invention and other methods on the VIDHOP dataset

[0090]

[0091] Furthermore, the present invention also tested the VHDB-ISOLATE dataset using the method in (Prior Art 1) and the method of the present invention for comparison. The prediction accuracy of the method of the present invention was 99.78%. The classification performance on the VHDB-ISOLATE dataset is shown in Table V. Finally, the present invention also applied the method of the present invention to a bacteriophage host prediction dataset, achieving a maximum host prediction accuracy of 85%. These experiments validated the feasibility of the method of the present invention.

[0092] Table V Comparison of the method of the present invention and other methods on the VHDB-ISOLATE dataset.

[0093]

[0094] Therefore, the present invention can pre-train on large-scale, unlabeled viral gene sequence data to obtain a feature extraction model for viral gene sequences. This significantly reduces the method's reliance on labeled viral and gene data. This significantly improves the prediction performance of the viral host prediction method compared to existing methods. The BERT model has been applied to phage host prediction tasks, achieving excellent results.

[0095] like Figure 4 As shown, the second object of the present invention is to provide a viral gene sequence host prediction system, comprising:

[0096] The tokenization and embedding module is used to divide the viral gene sequence into an ordered k-mer word sequence and vectorize the k-mer word sequence using the pre-trained BERT language model to obtain an embedding vector;

[0097] The dimensionality reduction module is used to map the embedding vector in the high-dimensional space to a low-dimensional space of fixed dimension using the average pooling method. After reducing the embedding dimension, the feature vector representing the original gene sequence is obtained.

[0098] The classification prediction module is used to input the feature vector into the pre-trained classification network model to predict the possibility of the sequence infecting a specific host.

[0099] like Figure 5 As shown, the third object of an embodiment of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the viral gene sequence host prediction method when executing the computer program.

[0100] A fourth object of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the viral gene sequence host prediction method is implemented.

[0101] A fifth object of an embodiment of the present invention is to provide a computer program product, which includes computer instructions, characterized in that the computer instructions instruct a computer to execute the viral gene sequence host prediction method.

[0102] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0104] The present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied in one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0105] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0106] Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A method for predicting the host of a viral gene sequence, characterized in that: include: Divide the viral gene sequence into an ordered k-mer word sequence and use the pre-trained BERT language model to vectorize the k-mer word sequence to obtain an embedding vector; The average pooling method is used to map the embedding vector of the high-dimensional space to a low-dimensional space of fixed dimension, and the feature vector representing the original gene sequence is obtained after reducing the embedding dimension; The feature vectors are input into a pre-trained classification network model to predict the likelihood of a sequence targeting a specific host infection.

2. The method for predicting viral gene sequences according to claim 1, wherein: The viral gene sequence is divided into ordered k-mer word sequences, including: The long viral gene sequence is split into shorter fixed-length segments and the segments are labeled, and the long gene sequence is processed to obtain an ordered k-mer word sequence.

3. The method for predicting the host of a viral gene sequence according to claim 1, wherein: The pre-trained BERT language model is used to vectorize the k-mer word sequence to obtain the embedded vector, including: The long sequence is divided into multiple fixed-length but non-overlapping segments, and the vector embeddings of the segments are obtained through the pre-trained BERT model respectively; the embedded vectors are then average-pooled to synthesize a fixed-dimensional feature vector.

4. The method for predicting the host of a viral gene sequence according to claim 3, wherein: The pre-trained BERT language model is used to vectorize the k-mer word sequence, and the resulting embedding vector also introduces tags, specifically: The [BAR] marker added at the beginning of the sequence is used to indicate the beginning of the same original genome fragment; [PAD] is used for padding; [UNK] indicates unknown words; [SEP] is used as a marker for the end of the sequence; and [MASK] is used for masking operations. Through tagging, long sequences are segmented and tokenized into a k-mer sentence sequence, and [BAR] and [SEP] tags are added at the beginning and end of the sequence respectively. In the BERT language model, the embedding representation of each word is composed of a position embedding vector and a field embedding vector, and the vector representation of the word is finally obtained by adding them together.

5. The method for predicting the host of a viral gene sequence according to claim 3, wherein: The method uses the pre-trained BERT language model to vectorize the k-mer word sequence to obtain the embedded vector, specifically including: Sequence the original viral gene into short sequences represented by k-mer; Restore the occluded original sequence, calculate the cross entropy loss to optimize the loss function, and correctly predict the occluded gene sequence; Skip masking the input data and directly input the embedded sequence into the pre-trained model. Then take the average of the embedding vectors of the [CLS] special characters of each segmented short sequence as the feature vector of the original input viral gene sequence.

6. The method for predicting viral gene sequences according to claim 1, wherein: The pre-trained BERT model includes a Transformer network model using a self-attention mechanism; The training process of the pre-trained BERT model is as follows: By randomly masking some words, the BERT language model is forced to rely on the context to predict the masked words. Continuously mask a k-mer of variable length, where the length follows a normal distribution with mean k and variance k-3; The masked k-mers initially account for a certain proportion p of the total number of input k-mers; as training progresses, the masked proportion will gradually increase according to the percentage; During the pre-training phase, the cross-entropy loss function was used for optimization. Pre-training on unlabeled data used the cumulative gradient method to calculate and update the network parameters after a certain number of pre-training steps, and then cleared the gradient to enter the next cycle. The Adam optimizer was used to dynamically adjust the learning rate according to the changes in the trapezoidal cycle. An early stopping strategy was adopted, and the same parameter settings were used during pre-training, and single-precision floating-point numbers were used for model training. In pre-training on a large-scale unlabeled corpus, the embedding vectors from the same viral gene sequence but different subsequences were merged through the average pooling strategy to obtain a vector representing the viral gene sequence.

7. The method for predicting viral gene sequence hosts according to claim 1, characterized in that: The pre-trained classification network model is based on a deep fully connected neural network, which is a neural network with a depth of 4 layers, each layer including a fully connected layer, a ReLU activation function layer and a dropout layer.

8. A viral gene sequence host prediction device, characterized in that: include: The tokenization and embedding module is used to divide the viral gene sequence into an ordered k-mer word sequence and vectorize the k-mer word sequence using the pre-trained BERT language model to obtain an embedding vector; The dimensionality reduction module is used to map the embedding vector in the high-dimensional space to a low-dimensional space of fixed dimension using the average pooling method. After reducing the embedding dimension, the feature vector representing the original gene sequence is obtained. The classification prediction module is used to input the feature vector into the pre-trained classification network model to predict the possibility of the sequence infecting a specific host.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for predicting a host of a viral gene sequence according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the viral gene sequence host prediction method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Method for identifying and analyzing unknown pathogenic microorganisms

    CN121096438A