Transcriptome sequence classification method, device, electronic device and readable storage medium
The transcriptome sequence classification and prediction model, which combines sequence alignment with deep learning, solves the problem that existing technologies cannot accurately classify metatranscriptome sequencing data, and enables accurate identification of microbial transcriptome sequences carried by insect vectors and discovery of unknown RNA viruses.
Patent Information
- Application Number
- CN202210074550.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-01-21
AI Technical Summary
Existing sequence classification methods are mainly based on metagenomic sequencing data and cannot be effectively applied to metagenomic transcriptome sequencing data, resulting in the inability to accurately classify microbial transcriptome sequences carried by insect vectors.
By combining sequence alignment with deep learning, a transcriptome sequence classification prediction model is used to compare and predict the base, codon, and amino acid sequences of known microbial transcriptome sequences to determine the microbial category of the transcriptome sequence to be classified.
It enables accurate classification of transcriptome sequences in insect-borne metatranscriptomes, allowing for the discovery of more unknown RNA viruses and supporting disease detection and prevention research.
Smart Images

Figure CN114496070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biological information processing technology, and in particular to a transcriptome sequence classification method, device, electronic device and computer-readable storage medium. Background Art
[0002] Insect vectors refer to insects that can transmit pathogens (including bacteria, viruses and other pathogenic microorganisms) between different hosts, such as mosquitoes and ticks. Insect vectors are an important route of transmission of human infectious diseases. They carry a large number of human pathogens, especially viruses. When these pathogens come into contact with humans, they can cause disease or the occurrence of large-scale epidemics, posing a huge threat to human health. For example, when mosquitoes, ticks, sand flies, lice and other insects bite humans, they may transmit the pathogens they carry to humans and cause diseases, including malaria, dengue fever, yellow fever, plague, etc. Research on the microorganisms carried by these insect vectors is of great significance for disease detection, prevention and control, and the discovery of new viruses or other pathogens.
[0003] Currently, the metatranscriptome sequencing method is a conventional method for detecting microorganisms carried by insect vectors. Metatranscriptome sequencing refers to a research technology that extracts all RNA in a specific sample and performs high-throughput sequencing. The extracted RNA contains the transcription products of cells and all microorganisms, as well as the genome sequence of RNA viruses, so that all types of microorganisms including RNA viruses can be detected.
[0004] In studies related to human disease prevention and control, researchers often crush vectors and then use macrotranscriptomics to detect and study viruses that may infect humans. This type of research usually uses total RNA-seq to remove ribosomal RNA (rRNA). That is, after extracting all the RNA substances in the sample, a large amount of rRNA from the environmental host in the sample must first be removed, and the RNA must be further purified before library construction and sequencing. In this way, the measured sequence contains the host's RNA sequence, viruses, bacteria, archaea, fungi and other different microorganisms' RNA sequences. If you want to identify the microbial category to which the RNA sequence belongs, you need to use an algorithm to achieve this.
[0005] However, almost all current sequence classification methods are designed based on metagenomic sequencing, and there is no method specifically for sequence classification of metatranscriptome sequencing data. It can be understood that metagenomic sequencing technology is to extract and sequence all double-stranded DNA materials in the sample, has no preference for the coding and non-coding regions of the genome, and does not contain the genome of RNA viruses in the sample; while metatranscriptome is to enrich and sequence RNA, and the sequences are mainly derived from the transcriptomes of various microorganisms and the genomes of RNA viruses, so there is more enrichment in the coding region sequences. Therefore, there are great differences in sequence composition between metatranscriptome sequencing samples and metagenome sequencing samples. Therefore, the sequence classification method based on metagenomic sequencing data cannot be applied to metatranscriptome sequencing data.
[0006] It can be seen that there is an urgent need for a technical solution that can accurately classify transcriptome sequences. Summary of the invention
[0007] In view of the above problems, an embodiment of the present invention provides a transcriptome sequence classification method, device, electronic device and computer-readable storage medium, which can accurately identify the category to which the transcriptome sequence in the insect vector macrotranscriptome belongs.
[0008] A first aspect of an embodiment of the present invention provides a transcriptome sequence classification method, the method comprising:
[0009] Obtaining transcriptome sequences to be classified in the macrotranscriptome;
[0010] Comparing the transcriptome sequence to be classified with each known sequence in a known database respectively;
[0011] When the alignment is successful, determining the category to which the transcriptome sequence to be classified belongs through a known database;
[0012] In the case of alignment failure, using a transcriptome sequence classification prediction model to predict the category to which the transcriptome sequence to be classified belongs;
[0013] The transcriptome sequence classification prediction model has pre-learned the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms.
[0014] Optionally, before predicting the species classification to which the transcriptome sequence to be classified belongs using the transcriptome sequence classification prediction model, the method further comprises:
[0015] Extracting phase sequences of six possible reading frames of the transcriptome sequence to be classified;
[0016] Analyze the six phase sequences respectively to obtain six-concatenated sequence strings corresponding to the six phase sequences;
[0017] Determine the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-linked sequence string corresponding to each phase sequence;
[0018] The continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold is used as the coding sequence of the transcriptome sequence to be classified;
[0019] According to the coding sequence, the codon sequence and amino acid sequence of the transcriptome sequence to be classified are determined.
[0020] Optionally, the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score are determined by using the six-linked sequence string corresponding to each phase sequence, including:
[0021] Determining a coding likelihood score of a single hexamethylenete sequence in a single microorganism category according to a ratio of the frequency of occurrence of a single hexamethylenete sequence in known coding sequences in a single microorganism category to the frequency of occurrence of the single hexamethylenete sequence in known non-coding sequences in a single microorganism category;
[0022] The maximum substring sum calculation is performed on the coding possibility scores of all single six-merged sequences included in the six-merged sequence string corresponding to a phase sequence in a single microorganism category to determine the maximum coding possibility score of the phase sequence in the corresponding microorganism category and the continuous subsequence corresponding to the maximum coding possibility score.
[0023] Optionally, the method further comprises:
[0024] Obtain multiple transcriptome sequences of microorganisms of known categories, and add corresponding category labels to each transcriptome sequence;
[0025] A portion of the labeled transcriptome sequences is added to the validation set, and the remaining portion is added to the training set;
[0026] Extracting the base sequence, codon sequence and amino acid sequence of each labeled transcriptome sequence in the training set;
[0027] The base sequence, codon sequence and amino acid sequence of the transcriptome sequence with labels in the training set are input into a preset model for training to obtain the transcriptome sequence classification prediction model.
[0028] Optionally, the method further comprises:
[0029] Obtain multiple transcriptome sequences of microorganisms of known categories with sequence lengths within a specified length range, and add corresponding category labels to each transcriptome sequence;
[0030] For each length range: a portion of the labeled transcriptome sequences is added to the validation set, and the remaining portion is added to the training set; the base sequence, codon sequence, and amino acid sequence of each labeled transcriptome sequence in the training set are extracted; the base sequence, codon sequence, and amino acid sequence of the labeled transcriptome sequence in the training set are input into the preset model for training to obtain a transcriptome sequence classification prediction model corresponding to the length range;
[0031] The classification prediction model of the transcriptome sequence is used to predict the category to which the transcriptome sequence to be classified belongs, including:
[0032] Determine a corresponding target transcriptome sequence classification prediction model according to the length range of the transcriptome sequence to be classified;
[0033] The target transcriptome sequence classification prediction model is used to predict the category to which the transcriptome sequence to be classified belongs.
[0034] A second aspect of an embodiment of the present invention provides a transcriptome sequence classification device, the device comprising:
[0035] An acquisition module, used for acquiring transcriptome sequences to be classified in the macrotranscriptome;
[0036] A comparison module, used to compare the transcriptome sequence to be classified with each known sequence in a known database;
[0037] A first determination module is used to determine the category to which the transcriptome sequence to be classified belongs by using an LCA algorithm when the alignment is successful;
[0038] A prediction module, used for predicting the category to which the transcriptome sequence to be classified belongs by using a transcriptome sequence classification prediction model when the alignment fails;
[0039] The transcriptome sequence classification prediction model has pre-learned the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms.
[0040] Optionally, the device comprises:
[0041] An extraction module, used to extract phase sequences of six possible reading frames of the transcriptome sequence to be classified;
[0042] An analysis module, used for analyzing the six phase sequences respectively to obtain six-concatenated sequence strings corresponding to the six phase sequences respectively;
[0043] A calculation module, used for determining the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-joint sequence string corresponding to each phase sequence;
[0044] A second determination module is used to use the continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold as the coding sequence of the transcriptome sequence to be classified;
[0045] The third determination module is used to determine the codon sequence and amino acid sequence of the transcriptome sequence to be classified according to the coding sequence.
[0046] Optionally, the calculation module includes:
[0047] A first coding likelihood score determination submodule, for determining a coding likelihood score of a single hexamethylenete sequence in a single microorganism category based on a ratio of a frequency of occurrence of the single hexamethylenete sequence in known coding sequences in a single microorganism category to a frequency of occurrence of the single hexamethylenete sequence in known non-coding sequences in a single microorganism category;
[0048] The second coding possibility score determination submodule performs maximum substring sum calculation on the coding possibility scores of all single six-mer sequences included in the six-mer sequence string corresponding to a phase sequence in a single microorganism category, determines the maximum coding possibility score of the phase sequence in the corresponding microorganism category, and the continuous subsequence corresponding to the maximum coding possibility score.
[0049] Optionally, the device further comprises:
[0050] The first sample acquisition module is used to obtain multiple transcriptome sequences of microorganisms of known categories and add corresponding category labels to each transcriptome sequence;
[0051] A sample partitioning module is used to add a portion of the labeled transcriptome sequences to the validation set and the remaining portion to the training set;
[0052] A feature extraction module is used to extract the base sequence, codon sequence and amino acid sequence of each labeled transcriptome sequence in the training set;
[0053] The first training module is used to input the base sequence, codon sequence and amino acid sequence of the transcriptome sequence with labels in the training set into a preset model for training to obtain the transcriptome sequence classification prediction model.
[0054] Optionally, the device further comprises:
[0055] The second sample acquisition module is used to obtain multiple transcriptome sequences of microorganisms of known categories with sequence lengths within a specified length range, and add a corresponding category label to each transcriptome sequence;
[0056] The second training module is used for: for each length range, adding a part of the transcriptome sequences with labels to the validation set, and adding the remaining part to the training set; extracting the base sequence, codon sequence and amino acid sequence of each transcriptome sequence with labels in the training set; inputting the base sequence, codon sequence and amino acid sequence of the transcriptome sequences with labels in the training set into a preset model for training, and obtaining a transcriptome sequence classification prediction model corresponding to the length range;
[0057] The prediction module is specifically used for:
[0058] According to the length range of the transcriptome sequence to be classified, a corresponding target transcriptome sequence classification prediction model is determined; and the category to which the transcriptome sequence to be classified belongs is predicted using the target transcriptome sequence classification prediction model.
[0059] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0060] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to: execute any one of the transcriptome sequence classification methods described in the first aspect above.
[0061] According to a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein a computer program stored in the medium enables a processor to execute any one of the transcriptome sequence classification methods described in the first aspect above.
[0062] In an embodiment of the present invention, the transcriptome sequence classification prediction model has pre-learned the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms. Therefore, the transcriptome sequence classification prediction model used in an embodiment of the present invention can combine the base sequence, codon sequence and amino acid sequence of the transcriptome sequence to be classified to accurately predict the microbial category to which the transcriptome sequence to be classified belongs.
[0063] In the embodiments of the present invention, the microbial category to which the transcriptome sequence belongs can be determined by comparing and predicting the transcriptome sequence, so that more unknown RNA viruses (mainly human viruses) can be discovered from the insect-borne macrotranscriptome, which can serve as a basis for disease detection, prevention and control, and research on new viruses or other pathogens. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0065] Figure 1 is a flowchart of the steps of a transcriptome sequence classification method in an embodiment of the present invention;
[0066] Figure 2 is a flowchart of the steps of a method for determining a codon sequence and an amino acid sequence of a transcriptome sequence to be classified in an embodiment of the present invention;
[0067] Figure 3 is a flowchart of the steps of a method for training a transcriptome sequence classification model in an embodiment of the present invention;
[0068] Figure 4 is a flowchart of the steps of another method for training a transcriptome sequence classification model in an embodiment of the present invention;
[0069] Figure 5 is a schematic diagram of a transcriptome sequence classification device in an embodiment of the present invention;
[0070] Figure 6 This is an example diagram of a coding possibility score calculation process of a phase sequence in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0072] Insect vectors usually carry four types of microorganisms: bacteria, archaea, fungi, and viruses. Therefore, the embodiment of the present invention proposes to use a method combining sequence alignment and deep learning to identify the microbial category to which the transcriptome sequence to be classified in the insect vector macrotranscriptome belongs. Among them, the microbial categories include: bacteria, archaea, fungi, and viruses.
[0073] The following is a detailed introduction to a transcriptome sequence classification method in an embodiment of the present invention. Figure 1 A flow chart of the steps of a transcriptome sequence classification method in an embodiment of the present invention is shown. Figure 1 As shown, the transcriptome sequence classification method may specifically include the following steps:
[0074] Step S101, obtaining transcriptome sequences to be classified in the macrotranscriptome.
[0075] In an embodiment of the present invention, vector organisms such as Culex mosquitoes and ticks can be crushed, and the macrotranscriptome of the corresponding organism can be obtained through steps such as RNA extraction, library construction, and sequencing, and then microorganisms such as viruses in the macrotranscriptome can be detected.
[0076] In the embodiment of the present invention, before detecting the transcriptome sequence in the macrotranscriptome, a large amount of rRNA from the environmental host in the sample can be removed, and the transcriptome sequence group can be further purified before library construction and sequencing. In this way, the transcriptome sequences contained in the measured sequence include: transcriptome sequences of the host, transcriptome sequences of different microorganisms such as viruses, bacteria, archaea, fungi, etc. Then, the embodiment of the present invention can classify and identify these transcriptome sequences.
[0077] Step S102, comparing the transcriptome sequence to be classified with each known sequence in a known database.
[0078] In the embodiment of the present invention, the transcriptome sequence to be classified is first identified by sequence comparison. Specifically, the transcriptome sequence to be classified is first compared with the non-redundant protein library (nr library) of NCBI by DIAMOND (v2.0.9.147) to annotate the known sequences in the database.
[0079] In the embodiment of the present invention, DIAMOND can also find the species classification to which the sequence belongs through the LCA (Least Common Ancestors) algorithm, thereby determining the category to which the transcriptome sequence to be classified belongs (any one of bacteria, archaea, fungi, and viruses).
[0080] Step S103: when the alignment is successful, the category to which the transcriptome sequence to be classified belongs is determined through a known database.
[0081] In the embodiment of the present invention, a relatively strict threshold value can be set for the comparison result, for example, 90% similarity and e-value less than 0.00001, to ensure the reliability of the result obtained in the comparison process. Thus, when the similarity is greater than 90% and the e-value is less than 0.00001, it indicates that the comparison is successful, and the category to which the known sequence in the known database to which the comparison belongs is used as the category to which the transcriptome sequence to be classified belongs.
[0082] Step S104: when the alignment fails, the transcriptome sequence classification prediction model is used to predict the category to which the transcriptome sequence to be classified belongs.
[0083] In the embodiment of the present invention, for sequences that cannot be matched to the database and cannot be classified into specific species through LCA, the transcriptome sequence classification prediction model can be used to perform identification at the four microbial levels to perform preliminary classification of the transcriptome sequence to be classified, and new possible viral sequences can also be identified. Thus, the identified new possible viral sequences can be subsequently analyzed and studied.
[0084] In the embodiment of the present invention, the transcriptome sequence classification prediction model pre-learns the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms.
[0085] In the embodiment of the present invention, the preset model used is a three-channel convolutional neural network, and each channel inputs three dimensions of information of the sequence, wherein the first channel is the base sequence, the second channel is the codon sequence, and the third channel is the codon sequence. Therefore, in the embodiment of the present invention, the preset model can be trained by the base sequence, codon sequence, and amino acid sequence of the transcriptome sequences of multiple known categories of microorganisms to obtain a transcriptome sequence classification prediction model. The transcriptome sequence classification prediction model can predict the microorganism category described in the transcriptome sequence based on the base sequence features, codon sequence features, and amino acid sequence features of the input transcriptome sequence.
[0086] The method for extracting the base sequence features, codon sequence features and amino acid sequence features of the transcriptome sequence can adopt any feasible method in the relevant technology, and the present invention does not impose any specific limitation on this.
[0087] In the embodiments of the present invention, the microbial category to which the transcriptome sequence belongs can be determined by comparing and predicting the transcriptome sequence, so that more unknown RNA viruses (mainly human viruses) can be discovered from the insect-borne macrotranscriptome, which can serve as a basis for disease detection, prevention and control, and research on new viruses or other pathogens.
[0088] In an embodiment of the present invention, the transcriptome sequence classification prediction model has pre-learned the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms. Therefore, the transcriptome sequence classification prediction model used in an embodiment of the present invention can combine the base sequence, codon sequence and amino acid sequence of the transcriptome sequence to be classified to accurately predict the microbial category to which the transcriptome sequence to be classified belongs.
[0089] In an optional embodiment of the present invention, a method for determining the codon sequence and amino acid sequence of a transcriptome sequence to be classified is provided, such as Figure 2 As shown, the method includes:
[0090] Step S201, extracting the phase sequences of six possible reading frames of the transcriptome sequence to be classified.
[0091] In transcriptome data, sequences of non-coding regions and incomplete transcript sequences are usually mixed. Therefore, in the embodiment of the present invention, it is first necessary to extract the coding information of the transcriptome sequence to be classified to determine its codon sequence and amino acid sequence.
[0092] In the embodiment of the present invention, for each transcriptome sequence to be classified, the sequences of the phases of the six possible reading frames are first extracted, that is, the sequences starting from the 1st, 2nd and 3rd bases of the original sequence and the sequences starting from the 1st, 2nd and 3rd bases of the reverse complementary sequence.
[0093] After obtaining the six phase sequences of the transcriptome sequence to be classified, the next step is to analyze the encoding information of each phase sequence.
[0094] Step S202: Analyze the six phase sequences respectively to obtain six-connected sequence strings corresponding to the six phase sequences.
[0095] In the embodiment of the present invention, each phase sequence can be analyzed to obtain a corresponding six-mer sequence string, thereby determining the possibility of encoding a protein based on the encoding possibility score of each six-mer.
[0096] In the embodiment of the present invention, for each phase sequence, it can be truncated from the start codon to the stop codon, and then a six-merge can be truncated every three bases, so as to convert the phase sequence into a corresponding six-mer sequence string.
[0097] Step S203, determining the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-linked sequence string corresponding to each phase sequence.
[0098] In the embodiment of the present invention, the frequencies of all six-joints in the coding sequences of four types of microorganisms, namely, viruses, bacteria, archaea and fungi, as well as all six-joint frequencies in the non-coding sequences, are calculated in advance, so that the six-joint coding frequency distribution with these four types of microorganisms as the background can be used to determine the six-joint sequence substring that maximizes the coding possibility score of the phase sequence by using the "Maximum Subarray Sum" (MSS) dynamic programming method, and the coding possibility scores of all single six-joints in the six-joint sequence substring in a single microorganism category are summed to obtain the coding possibility score of the phase. At the same time, the continuous subsequence corresponding to the maximum coding possibility score is also determined.
[0099] Specifically, step S203 includes:
[0100] Step S2031, determining the coding possibility score of the single six-mer sequence in a single microbial category based on the ratio of the frequency of occurrence of the single six-mer sequence in known coding sequences in a single microbial category to the frequency of occurrence of the single six-mer sequence in known non-coding sequences in a single microbial category.
[0101] In the embodiment of the present invention, the encoding possibility score of a single six-mer sequence in a single microorganism category can be calculated using the following formula 1:
[0102]
[0103] Among them, H represents a six-linked sequence, F c (H) and F nc (H) represents the frequency of the hexamethylenete sequence H in the coding sequence and non-coding sequence of a known type of microorganism, respectively, and λ(H) represents the coding possibility score of the hexamethylenete sequence H in the type of microorganism.
[0104] Step S2032, performing maximum substring sum calculation on the coding possibility scores of all single six-joined sequences included in the six-joined sequence string corresponding to a phase sequence in a single microorganism category, determining the maximum coding possibility score of the phase sequence in the corresponding microorganism category, and the continuous subsequence corresponding to the maximum coding possibility score.
[0105] In the embodiment of the present invention, the encoding possibility score of each six-mer sequence string in the corresponding microorganism category can be calculated using the following formula 2:
[0106]
[0107] Among them, S represents a six-linked sequence string, H i Represents the six-joint sequence constituting the six-joint sequence string S.
[0108] Figure 6 FIG. 1 is an example diagram of a coding possibility score calculation process of a phase sequence provided in an embodiment of the present invention. Figure 6 As shown, after converting the sequence into a six-linked sequence string, the embodiment of the present invention uses the "maximum substring sum" algorithm to calculate the sequence corresponding to the value with the largest coding possibility score in each sequence. The algorithm uses dynamic programming to find a continuous subsequence that maximizes the coding possibility score value of the phase sequence (such as Figure 6 H3-H10 in ), thereby obtaining the coding possibility score of each phase sequence.
[0109] Step S204: taking the continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold as the coding sequence of the transcriptome sequence to be classified.
[0110] In the embodiment of the present invention, after determining the coding possibility scores corresponding to each phase sequence respectively for the four types of microorganisms, the maximum value of the four values can be taken as the final coding possibility score value.
[0111] Then, the phase sequence with the largest coding possibility score among the six phase sequences is taken as the sequence that may encode the protein, and if the largest coding possibility score is greater than a given threshold, the sequence that may encode the protein can be replaced by the continuous subsequence with the largest coding possibility score determined in step S203 (such as Figure 6 H3-H10) in the transcriptome is regarded as the coding sequence of the transcriptome sequence to be classified, otherwise, the sequence is identified as a non-coding sequence.
[0112] Step S205, determining the codon sequence and amino acid sequence of the transcriptome sequence to be classified according to the coding sequence.
[0113] In the embodiment of the present invention, after the coding sequence is determined, the codon sequence and amino acid sequence of the transcriptome sequence to be classified can be determined based on the coding sequence.
[0114] Specifically, the coding sequence is translated into codons to obtain the codon sequence of the transcriptome sequence to be classified. The coding sequence is translated into amino acids to obtain the amino acid sequence of the transcriptome sequence to be classified.
[0115] The present invention proposes a method for training a transcriptome sequence classification model. Figure 3 As shown, the following steps may be specifically included:
[0116] Step S301, obtaining multiple transcriptome sequences of microorganisms of known categories, and adding corresponding category labels to each transcriptome sequence.
[0117] In the embodiment of the present invention, the transcriptome sequences with added category labels are used as sample sets for model training.
[0118] Step S302: adding a portion of the transcriptome sequences with labels to a validation set, and adding the remaining portion to a training set.
[0119] The training set is used to train the preset model, and the validation set is used to adjust the model parameters during the training process so that the model can achieve the best performance on the validation set.
[0120] In the embodiment of the present invention, a test set may also be included to evaluate the performance of the trained transcriptome sequence classification prediction model.
[0121] In this embodiment of the present invention, in order to train a prediction model that can predict viral sequences and three other types of microbial sequences, a macrotranscriptome training set, a validation set, and a test set containing four types of microorganisms, including bacteria, viruses, archaea, and fungi, were constructed. The data source was the whole genome and coding region (CDS) sequences of the RefSeq database of NCBI.
[0122] Specifically, for viral sequences, as of February 2021, there were a total of 10,450 full genome sequences of viruses on RefSeq. This embodiment of the present invention takes 2019 as the time node, and uses 8,126 viral species with genomes published before 2019 as the training set. Among the 2,322 viral species with genomes published in 2019 and later, half are randomly selected as the validation set and the other half as the test set.
[0123] For bacteria, archaea and fungi, since the genomes of these three types of microorganisms are larger than viral genomes, using all of them for training will cause data imbalance. Therefore, in the embodiment of the present invention, only the genomes of representative species are selected for model training and evaluation.
[0124] Among them, for bacteria, the embodiment of the present invention screened 2772 bacterial species with full genomes, and then selected phyla with more than 20 genomes, including 1217 Proteobacteria, 492 Firmicutes, 472 Actinobacteria, 218 Bacteroidetes, and 258 species from other 6 phyla. Among these phylum-level bacteria, the embodiment of the present invention further selected one at each genus level as a representative genome, and finally obtained 308 species as training set species, 99 species as validation set species, and 99 genomes as test set species.
[0125] For archaeal sequences, among the 421 representative species of archaea, the embodiment of the present invention randomly selected 280 species of Euryarchaeota, 45 species of Crenarchaeota and 8 species from the remaining other phyla as the training set. After removing the species in the training set, 6 species of Euryarchaeota, 1 species of Crenarchaeota and 1 species from other archaea were selected to form a validation set, and 8 species were selected as a test set in the same way as the validation set (the species in the training set, validation set and test set do not overlap).
[0126] For fungal sequences, the embodiment of the present invention randomly selected 80 species from the Ascomycota, 14 species from the Basidiomycota, and 2 species from species of other fungal phyla to form a training set, and then randomly selected 14 species from the Ascomycota, 3 species from the Basidiomycota, and 1 species from other fungal phyla as a validation set, and selected 18 species as a test set in the same way as the validation set (the species of the training set, validation set, and test set do not overlap).
[0127] In an optional embodiment of the present invention, taking into account the possible DNA sequence contamination in the sample to be tested, some sequences from the whole genome are also added to the sample set, specifically including: in three species libraries of three microorganisms, namely bacteria, archaea and fungi, sequence fragments are randomly extracted from coding sequences and whole genome sequences at a ratio of 4:1 and added to the sample set.
[0128] For virus sequences, in addition to the reverse transcription products of some RNA viruses, their genome sequences can also be detected in large quantities. Therefore, in the embodiments of the present invention, the proportion of RNA virus genome sequences can also be increased.
[0129] In addition, in order to improve the detection efficiency of human viruses, the embodiments of the present invention can also improve the coverage of human viruses in the sample set.
[0130] When simulating each type of sequence, in an embodiment of the present invention, a specific number of sequences and sequence length can be specified through the Grinder software.
[0131] Step S303: extracting the base sequence, codon sequence and amino acid sequence of each labeled transcriptome sequence in the training set.
[0132] In the embodiment of the present invention, the above method for determining the codon sequence and amino acid sequence of the transcriptome sequence to be classified can be referred to to extract the base sequence, codon sequence and amino acid sequence of each transcriptome sequence with a label in the training set.
[0133] Step S304, inputting the base sequence, codon sequence and amino acid sequence of the transcriptome sequence with labels in the training set into a preset model for training to obtain the transcriptome sequence classification prediction model.
[0134] In the embodiment of the present invention, the preset model is a three-channel convolutional neural network. For a given base sequence, the preset model performs one-hot encoding on the information of the three dimensions, namely the base sequence, the codon sequence and the amino acid sequence, and inputs them into three parallel and consistent channels respectively. The specific settings of each layer of the preset model are as follows:
[0135] The first layer is a one-dimensional convolutional layer. The number of convolution kernels (filters) is 64, the length of each convolution kernel is 3, and the activation function is ReLU.
[0136] Second layer: One-dimensional max pooling layer. The pooling size is set to 3.
[0137] The third layer: batch normalization layer. Due to the influence of the randomness of parameter initialization and the randomness of input data during training, this layer centers and standardizes each dimension of the input data. Each layer of input of the neural network has a corresponding distribution. During the training process of the network, as the parameters of the previous layer change, the input distribution of the current layer also changes, so that the current layer needs to be constantly readjusted to the new distribution. This problem is particularly serious for deep networks, because small changes in shallow hidden layers will be amplified as they propagate in the network, resulting in significant changes in deeper hidden layers. Therefore, batch normalization is used to reduce these unnecessary changes to speed up training and generate more reliable models. This layer is followed by a dropout operation, that is, randomly deleting some units to prevent overfitting. In an embodiment of the present invention, the ratio of dropout units is 0.25.
[0138] The fourth to sixth layers are consistent with the structures of the first to third layers, except that in the fourth convolution layer, the number of convolution kernels is 128.
[0139] The seventh layer is a one-dimensional convolution layer with 256 convolution kernels for each of the three channels, a convolution kernel length of 3, and ReLU as the activation function.
[0140] The eighth layer: One-dimensional global average pooling layer. This layer takes the global average value of the values in the feature map output above.
[0141] The ninth layer: batch normalization layer. The information of the three channels is combined and input into the batch normalization layer, followed by a dropout operation with a ratio of 0.25.
[0142] The tenth to thirteenth layers are two fully connected layers, connected by a batch normalization layer and a ReLU activation function. The activation function of the final fully connected layer uses softmax to output the scores of the four types of microorganisms.
[0143] In the embodiment of the present invention, the sequence is encoded using a "one-hot" method. "One-hot" is a "0", "1" encoding method to convert the sequence into a form that can be input into a deep learning model.
[0144] Specifically, the present invention performs three forms of encoding on a transcriptome sequence: (1) For the transcriptome sequence itself, each base is represented by a vector. (2) After the coding sequence is determined from the transcriptome sequence, the coding sequence is translated into 64 codons, each codon corresponds to a vector. (3) After the coding sequence is determined from the transcriptome sequence, the coding sequence is translated into 21 amino acids, each amino acid corresponds to a vector.
[0145] In the embodiment of the present invention, after training a preset model using a plurality of transcriptome sequences of microorganisms of known categories, a transcriptome sequence classification prediction model can be obtained.
[0146] In order to make the model applicable to transcriptome sequences of different lengths, the present invention also proposes another method for training a transcriptome sequence classification model, such as Figure 4 As shown, the following steps may be specifically included:
[0147] Step S401, obtaining a plurality of transcriptome sequences of microorganisms of known categories with sequence lengths within a specified length range, and adding a corresponding category label to each transcriptome sequence.
[0148] The specified length range includes three length ranges: 0-400bp, 400-1000bp, and 1000-2000bp.
[0149] In an embodiment of the present invention, for each length range, the Grinder software can be used to simulate the same number of virus, bacteria, archaea and fungi sequences, 500,000 each as a training set, 50,000 each as a validation set, and 50,000 each as a test set.
[0150] Step S402, for each length range: adding a portion of the labeled transcriptome sequences to the test set, and the remaining portion to the training set; extracting the base sequence, codon sequence, and amino acid sequence of each labeled transcriptome sequence in the training set; inputting the base sequence, codon sequence, and amino acid sequence of the labeled transcriptome sequences in the training set into a preset model for training, and obtaining a transcriptome sequence classification prediction model corresponding to the length range.
[0151] In the embodiment of the present invention, the specific model training method can refer to the above steps S03-S304.
[0152] In the embodiment of the present invention, the above step S104 may include sub-steps:
[0153] S1041, determining a corresponding target transcriptome sequence classification prediction model according to the length range to which the transcriptome sequence to be classified belongs.
[0154] S1042: using the target transcriptome sequence classification prediction model to predict the category to which the transcriptome sequence to be classified belongs.
[0155] In the embodiment of the present invention, after determining the transcriptome sequence to be classified, the target transcriptome sequence classification prediction model corresponding to the sequence length can be used to perform category prediction. If the length of the transcriptome sequence to be classified is more than 2000bp, it is cut into fragments of 2000bp in length, and for each fragment obtained by segmentation, a transcriptome sequence classification prediction model with a length range of 1000-2000bp is used to predict, and the remaining fragments less than 2000bp in length are predicted according to the transcriptome sequence classification prediction model of the corresponding length range. Finally, the length of the fragment is used as a weight, and the score of the entire sequence is obtained after weighted average of the scores of each fragment, thereby determining the microbial category to which the transcriptome sequence to be classified belongs.
[0156] refer to Figure 5 , showing a transcriptome sequence classification device, the device comprising:
[0157] An acquisition module 501 is used to acquire a transcriptome sequence to be classified in a macrotranscriptome;
[0158] A comparison module 502 is used to compare the transcriptome sequence to be classified with each known sequence in a known database;
[0159] The first determination module 503 is used to determine the category to which the transcriptome sequence to be classified belongs by using the LCA algorithm when the alignment is successful;
[0160] A prediction module 504 is used to predict the category to which the transcriptome sequence to be classified belongs by using a transcriptome sequence classification prediction model when the alignment fails;
[0161] The transcriptome sequence classification prediction model has pre-learned the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms.
[0162] Optionally, the device comprises:
[0163] An extraction module, used to extract phase sequences of six possible coding frames of the transcriptome sequence to be classified;
[0164] An analysis module, used to analyze the six phase sequences respectively to obtain six-concatenated sequence strings corresponding to the six phase sequences respectively;
[0165] A calculation module, used for determining the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-joint sequence string corresponding to each phase sequence;
[0166] A second determination module is used to use the continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold as the coding sequence of the transcriptome sequence to be classified;
[0167] The third determination module is used to determine the codon sequence and amino acid sequence of the transcriptome sequence to be classified according to the coding sequence.
[0168] Optionally, the calculation module includes:
[0169] A first coding likelihood score determination submodule, for determining a coding likelihood score of a single hexamethylenete sequence in a single microorganism category based on a ratio of a frequency of occurrence of the single hexamethylenete sequence in known coding sequences in a single microorganism category to a frequency of occurrence of the single hexamethylenete sequence in known non-coding sequences in a single microorganism category;
[0170] The second coding possibility score determination submodule performs maximum substring sum calculation on the coding possibility scores of all single six-mer sequences included in the six-mer sequence string corresponding to a phase sequence in a single microorganism category, determines the maximum coding possibility score of the phase sequence in the corresponding microorganism category, and the continuous subsequence corresponding to the maximum coding possibility score.
[0171] Optionally, the device further comprises:
[0172] The first sample acquisition module is used to obtain multiple transcriptome sequences of microorganisms of known categories and add corresponding category labels to each transcriptome sequence;
[0173] A sample partitioning module is used to add a portion of the labeled transcriptome sequences to the validation set and the remaining portion to the training set;
[0174] A feature extraction module is used to extract the base sequence, codon sequence and amino acid sequence of each labeled transcriptome sequence in the training set;
[0175] The first training module is used to input the base sequence, codon sequence and amino acid sequence of the transcriptome sequence with labels in the training set into a preset model for training to obtain the transcriptome sequence classification prediction model.
[0176] Optionally, the device further comprises:
[0177] The second sample acquisition module is used to obtain multiple transcriptome sequences of microorganisms of known categories with sequence lengths within a specified length range, and add a corresponding category label to each transcriptome sequence;
[0178] The second training module is used for: for each length range, adding a part of the transcriptome sequences with labels to the validation set, and adding the remaining part to the training set; extracting the base sequence, codon sequence and amino acid sequence of each transcriptome sequence with labels in the training set; inputting the base sequence, codon sequence and amino acid sequence of the transcriptome sequences with labels in the training set into a preset model for training, and obtaining a transcriptome sequence classification prediction model corresponding to the length range;
[0179] The prediction module 503 is specifically used for:
[0180] According to the length range of the transcriptome sequence to be classified, a corresponding target transcriptome sequence classification prediction model is determined; and the category to which the transcriptome sequence to be classified belongs is predicted using the target transcriptome sequence classification prediction model.
[0181] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0182] An embodiment of the present invention further provides an electronic device, including:
[0183] 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 transcriptome sequence classification method as described in any one of the above embodiments.
[0184] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the transcriptome sequence classification method described in any of the above embodiments.
[0185] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0186] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0187] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.
[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0190] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0191] Finally, it should be noted that, in this article, relational terms such as first and second, etc. 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 these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0192] The above is a detailed introduction to a transcriptome sequence classification method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A transcriptome sequence classification method, characterized in that: The method comprises: Obtaining transcriptome sequences to be classified in the macrotranscriptome; Comparing the transcriptome sequence to be classified with each known sequence in a known database respectively; When the alignment is successful, determining the category to which the transcriptome sequence to be classified belongs through a known database; In the case of alignment failure, using a transcriptome sequence classification prediction model to predict the category to which the transcriptome sequence to be classified belongs; Wherein, the transcriptome sequence classification prediction model pre-learns the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms; Before predicting the species classification to which the transcriptome sequence to be classified belongs using the transcriptome sequence classification prediction model, the method further comprises: Extracting phase sequences of six possible reading frames of the transcriptome sequence to be classified; Analyze the six phase sequences respectively to obtain six-concatenated sequence strings corresponding to the six phase sequences; Determine the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-linked sequence string corresponding to each phase sequence; The continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold is used as the coding sequence of the transcriptome sequence to be classified; Determining the codon sequence and amino acid sequence of the transcriptome sequence to be classified according to the coding sequence; The maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score are determined by the six-linked sequence string corresponding to each phase sequence, including: Determining a coding likelihood score of a single hexamethylenete sequence in a single microorganism category according to a ratio of the frequency of occurrence of a single hexamethylenete sequence in known coding sequences in a single microorganism category to the frequency of occurrence of the single hexamethylenete sequence in known non-coding sequences in a single microorganism category; The maximum substring sum calculation is performed on the coding possibility scores of all single six-merged sequences included in the six-merged sequence string corresponding to a phase sequence in a single microorganism category to determine the maximum coding possibility score of the phase sequence in the corresponding microorganism category and the continuous subsequence corresponding to the maximum coding possibility score.
2. The method according to claim 1, characterized in that The method further comprises: Obtain multiple transcriptome sequences of microorganisms of known categories, and add corresponding category labels to each transcriptome sequence; A portion of the labeled transcriptome sequences is added to the validation set, and the remaining portion is added to the training set; Extracting the base sequence, codon sequence and amino acid sequence of each labeled transcriptome sequence in the training set; The base sequence, codon sequence and amino acid sequence of the transcriptome sequence with labels in the training set are input into a preset model for training to obtain the transcriptome sequence classification prediction model.
3. The method according to claim 1, characterized in that The method further comprises: Obtain multiple transcriptome sequences of microorganisms of known categories with sequence lengths within a specified length range, and add corresponding category labels to each transcriptome sequence; For each length range: a portion of the labeled transcriptome sequences is added to the validation set, and the remaining portion is added to the training set; the base sequence, codon sequence, and amino acid sequence of each labeled transcriptome sequence in the training set are extracted; the base sequence, codon sequence, and amino acid sequence of the labeled transcriptome sequence in the training set are input into the preset model for training to obtain a transcriptome sequence classification prediction model corresponding to the length range; The classification prediction model of the transcriptome sequence is used to predict the category to which the transcriptome sequence to be classified belongs, including: Determine a corresponding target transcriptome sequence classification prediction model according to the length range of the transcriptome sequence to be classified; The target transcriptome sequence classification prediction model is used to predict the category to which the transcriptome sequence to be classified belongs.
4. A transcriptome sequence classification device, characterized in that: The device comprises: An acquisition module, used for acquiring transcriptome sequences to be classified in the macrotranscriptome; A comparison module, used to compare the transcriptome sequence to be classified with each known sequence in a known database; A first determination module is used to determine the category to which the transcriptome sequence to be classified belongs by using an LCA algorithm when the alignment is successful; A prediction module, used for predicting the category to which the transcriptome sequence to be classified belongs by using a transcriptome sequence classification prediction model when the alignment fails; Wherein, the transcriptome sequence classification prediction model pre-learns the base sequences, codon sequences and amino acid sequences of transcriptome sequences of multiple known categories of microorganisms; The device comprises: An extraction module, used to extract phase sequences of six possible reading frames of the transcriptome sequence to be classified; An analysis module, used to analyze the six phase sequences respectively to obtain six-concatenated sequence strings corresponding to the six phase sequences respectively; A calculation module, used for determining the maximum coding possibility score of each phase sequence and the continuous subsequence corresponding to the maximum coding possibility score through the six-joint sequence string corresponding to each phase sequence; A second determination module is used to use the continuous subsequence corresponding to the phase sequence with the highest maximum coding possibility score and higher than a preset threshold as the coding sequence of the transcriptome sequence to be classified; A third determination module is used to determine the codon sequence and amino acid sequence of the transcriptome sequence to be classified according to the coding sequence; The calculation module comprises: A first coding likelihood score determination submodule, for determining a coding likelihood score of a single hexamethylenete sequence in a single microorganism category based on a ratio of a frequency of occurrence of the single hexamethylenete sequence in known coding sequences in a single microorganism category to a frequency of occurrence of the single hexamethylenete sequence in known non-coding sequences in a single microorganism category; The second coding possibility score determination submodule performs maximum substring sum calculation on the coding possibility scores of all single six-mer sequences included in the six-mer sequence string corresponding to a phase sequence in a single microorganism category, determines the maximum coding possibility score of the phase sequence in the corresponding microorganism category, and the continuous subsequence corresponding to the maximum coding possibility score.
5. An electronic device, characterized in that: include: 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 transcriptome sequence classification method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the transcriptome sequence classification method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Biological classification method and system for species based on triple neural network
CN111564179A
Automatic analysis method and system for virus sequencing sequence
CN112863599A
Phage host prediction method, apparatus and device, and storage medium
CN113658633A
Phage classification method, device and equipment and storage medium
CN113658641A
Method and device for detecting pathogenic microorganisms based on metagenomics
CN113744807A
