Method and system for pathogen identification based on high-throughput sequencing data and application of method and system

Through independent feature extraction and deep learning model based on the K-mer frequency matrix, the problems of insufficient virus identification accuracy and high computing resource consumption in the prior art are solved, and fast, efficient identification and accurate prediction of virus samples are achieved.

CN119089189APending Publication Date: 2024-12-06BGI GENOMICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310662745.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing virus identification methods are difficult to keep up with the rapid evolution of viruses, especially the identification accuracy at the subtype and type level is insufficient, and the computing resources are consumed, making it difficult to achieve rapid and efficient pathogen detection.

Method used

Using a method of extracting independent features based on the K-mer frequency matrix, pre-trained models and prediction models are trained through autoencoder and supervised machine learning models to achieve efficient and accurate prediction of species from virus samples.

Benefits of technology

It realizes rapid and efficient identification of viral pathogens, reduces the demand for computing resources, improves identification accuracy, and can accurately distinguish viruses at subtype and type levels, saving storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089189A_ABST
    Figure CN119089189A_ABST
Patent Text Reader

Abstract

The invention discloses a pathogen identification method and system based on high-throughput sequencing data and application of the pathogen identification method and system, and the system comprises a K-mer frequency matrix obtaining module which is used for converting metagenome sequencing data into a K-mer frequency matrix; the independent feature extraction module is used for extracting an independent feature matrix based on the K-mer frequency matrix; the characteristic parameter acquisition module is used for inputting the independent characteristic matrix into a variational auto encoder (Variation Autoencoder) and mapping the independent characteristic matrix into characteristic parameters subjected to dimension reduction; and the identification and recognition module is used for matching the dimensionality-reduced characteristic parameters to the closest virus pathogens and identifying the virus pathogens. The identification method or the identification system has the advantages of short running time, high accuracy and the like, and virus pathogens carried by a patient can be detected by using conventional metagenome high-throughput sequencing (mNGS) data, so that the function of rapidly and efficiently detecting the pathogens is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of bioinformatics, and specifically, to methods and systems for pathogen identification based on high-throughput sequencing data and their applications, and more specifically, to methods for extracting independent features based on a K-mer frequency matrix, methods for predicting sample source species, methods for training a pre-trained model, methods for training a prediction model, an independent feature extraction module based on a K-mer frequency matrix, a system for predicting sample source species, a system for training a pre-trained model, a system for training a prediction model, a computer-readable storage medium, and a computer-readable storage medium. Background Art

[0002] In recent years, metagenomic technology and next-generation sequencing technology have greatly increased the speed of pathogen discovery and identification. Metagenomic high-throughput sequencing (mNGS) technology replaces culture and immunofluorescence methods, providing a new and reliable way to quickly identify unknown viruses. mNGS technology detected the genome of the pathogen SARS-CoV-2 within 2 days. With the unbiased results provided by metagenomic technology, people do not need to spend a lot of time guessing and verifying the culture of pathogens. Technological innovation has also brought new challenges to bioinformatics analysis methods, and pathogen identification methods suitable for large pathogen databases have been born one after another.

[0003] However, compared with bacteria and fungi, viruses have a stronger ability to mutate, and new virus sequences are constantly being generated. Pathogen identification methods based on database comparisons are difficult to keep up with the speed of viral evolution. On the other hand, the existing mainstream comparison algorithms only identify viruses at the species level, making it difficult to accurately identify a wide variety of types and subtypes of viruses. Different types of the same virus often have different pathogenicity, and the corresponding clinical treatment measures are also different. If the type of the virus cannot be accurately distinguished, it will hinder the patient's subsequent treatment and recovery.

[0004] In addition, the general comparison method for identifying pathogens requires a large amount of storage space for storing the comparison database, which has high requirements for computer cluster hardware. Most comparison methods can only achieve species-level accuracy, and there is no comprehensive database for viruses, making it difficult to achieve subtype-level identification of pathogen viruses.

[0005] Based on the above problems, those skilled in the art know that using only known viral sequences to build a library and using the nucleotide sequence information in the sequence for comparison is not enough to meet the identification needs of viral pathogens. Therefore, it is still necessary to establish a deep learning method and use artificial intelligence learning models to provide more flexible models and better prediction capabilities. Summary of the invention

[0006] The present invention aims to solve one of the technical problems existing in the prior art at least to a certain extent.

[0007] To this end, the present invention proposes a method for extracting independent features based on the K-mer frequency matrix. Furthermore, the method for extracting independent features based on the K-mer frequency matrix can be used to predict the source species of the sample, such as viruses. Furthermore, the present invention proposes a system for predicting the source species of the sample. The system has the advantages of short running time and high accuracy. Conventional mNGS sequencing data can be used to predict the types of viral pathogens carried in the sample, thereby realizing the functions of fast and efficient species classification and prediction.

[0008] In a first aspect of the present invention, the present invention proposes a method for extracting independent features based on a K-mer frequency matrix. According to an embodiment of the present invention, the method for extracting independent features comprises:

[0009] Get the K-mer frequency matrix of sequencing results;

[0010] The independent feature matrix is ​​extracted based on the K-mer frequency matrix based on the following formula:

[0011] P=T(RL),

[0012] in,

[0013] T is the K-mer frequency matrix;

[0014] R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer;

[0015] L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions:

[0016] The frequencies of all K-mers were converted to sum to 1;

[0017] The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and

[0018] ∑(K-mer) i =∑(K-mer') i

[0019] Where i represents the number of K-mer, (K-mer') i Represents and (K-mer) i There are three consecutive overlapping bases.

[0020] According to some specific embodiments of the present invention, the method of extracting independent features based on the K-mer frequency matrix can effectively project non-independent K-mer features into a low-dimensional orthogonal space so that the remaining features remain independent to obtain target independent features.

[0021] In a second aspect of the present invention, the present invention provides a method for predicting the species of origin of a sample. According to an embodiment of the present invention, the method comprises:

[0022] Sequence the samples and obtain the K-mer frequency matrix based on the sequencing results;

[0023] Based on the K-mer frequency matrix, extract an independent feature matrix according to the method for extracting independent features based on the K-mer frequency matrix described in the first aspect;

[0024] Inputting the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction;

[0025] The reduced feature parameters are input into a trained prediction model to determine the source species of the sample.

[0026] The method according to some specific embodiments of the present invention can effectively predict the source species of the sample efficiently and accurately. For example, it can be used to identify viral pathogens. The method of the present invention has the advantages of short identification time and high accuracy. Conventional sequencing data (such as mNGS sequencing data) can be used to detect viral pathogens carried by patients, realizing the function of rapid and efficient pathogen detection.

[0027] In a third aspect of the present invention, the present invention proposes a method for training a pre-trained model. According to an embodiment of the present invention, the method for training a pre-trained model comprises:

[0028] Based on the sequencing data, an independent feature matrix is ​​obtained according to the method of the first aspect;

[0029] The independent feature matrix is ​​used as a training data set and input into an autoencoder for training, wherein the autoencoder includes two neural networks, Encoder and Decoder, wherein the Encoder compresses the input data to obtain an abstract feature, and the Decoder reconstructs the abstract feature to obtain a reconstructed feature, and the training uses the difference between the reconstructed feature and the input data as a loss function. As mentioned above, the method for training a pre-trained model according to some specific embodiments of the present invention can effectively train the pre-trained model.

[0030] In a fourth aspect of the present invention, the present invention proposes a method for training a prediction model. According to an embodiment of the present invention, the method for training a prediction model comprises:

[0031] Based on the genome sequences of known species, simulate and generate sequencing data;

[0032] Based on the sequencing data, obtaining an independent feature matrix according to the method of the first aspect;

[0033] Using the pre-trained model trained by the method described in the third aspect, pre-training the independent feature matrix to obtain feature parameters after dimension reduction;

[0034] The dimensionally reduced feature parameters are input into a supervised machine learning model, and the machine learning model is trained using known species types as labels to obtain a trained prediction model.

[0035] In a fifth aspect of the present invention, the present invention proposes an independent feature extraction module based on a K-mer frequency matrix. According to an embodiment of the present invention, the independent feature extraction module is used to obtain a K-mer frequency matrix of a sequencing result; and based on the following formula, the independent feature matrix is ​​extracted based on the K-mer frequency matrix:

[0036] P=T(RL),

[0037] in,

[0038] T is the K-mer frequency matrix;

[0039] R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer;

[0040] L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions:

[0041] The frequencies of all K-mers were converted to sum to 1;

[0042] The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and

[0043] Here, i represents the number of K-mer, and (K-mer')i means that there are three consecutive overlapping bases with (K-mer)i.

[0044] In a sixth aspect of the present invention, the present invention provides a system for predicting the species of origin of a sample. According to an embodiment of the present invention, the system for predicting the species of origin of a sample comprises:

[0045] A K-mer frequency matrix acquisition module is used to sequence the sample and obtain a K-mer frequency matrix based on the sequencing results;

[0046] An independent feature extraction module, used to extract an independent feature matrix based on the K-mer frequency matrix according to the method described in the first aspect;

[0047] A feature parameter acquisition module, used for inputting the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction;

[0048] The species prediction module is used to input the dimension-reduced feature parameters into a trained prediction model to determine the source species of the sample.

[0049] In a seventh aspect of the present invention, the present invention proposes a system for training a pre-trained model. According to an embodiment of the present invention, the system for training a pre-trained model comprises:

[0050] An independent feature extraction module, used to obtain an independent feature matrix based on the sequencing data according to the method described in the first aspect;

[0051] The autoencoder module is used to use the independent feature matrix as a training data set and input it into the autoencoder for training, wherein the autoencoder includes two neural networks, Encoder and Decoder, wherein the Encoder compresses the input data to obtain abstract features, and the Decoder reconstructs the abstract features to obtain reconstructed features, and the training uses the difference between the reconstructed features and the input data as a loss function.

[0052] In an eighth aspect of the present invention, the present invention proposes a system for training a prediction model. According to an embodiment of the present invention, the system for training a prediction model comprises:

[0053] A simulated sequencing data generating device, used for simulating and generating sequencing data based on the genome sequence of a known species;

[0054] An independent feature extraction module, used to obtain an independent feature matrix according to the method described in the first aspect;

[0055] A feature parameter acquisition module, used to pre-train the independent feature matrix using the pre-trained model trained by the method described in the third aspect, so as to obtain the feature parameters after dimension reduction;

[0056] The prediction model training module is used to input the dimension-reduced feature parameters into a supervised machine learning model, and use known species types as labels to train the machine learning model to obtain a trained prediction model.

[0057] In a ninth aspect of the present invention, the present invention provides a computer device. According to an embodiment of the present invention, the computer device includes a memory and a processor;

[0058] The memory includes a memory for storing programs;

[0059] The processor includes a device for implementing the method described in the first aspect, the second aspect, the third aspect or the fourth aspect by executing the program stored in the memory.

[0060] The present invention has at least the following beneficial effects:

[0061] (1) The present invention is a system and method for identifying microorganisms, such as viruses, based on high-throughput sequencing data. The present invention has a high degree of automation, reduces computer hardware requirements, and improves the precision and accuracy of pathogen identification.

[0062] (2) Aiming at the need of predicting microorganisms based on metagenomic data, such as viruses, the present invention has developed a deep learning pathogen identification system and method, which saves computer storage resources while having the characteristics of high accuracy and high precision. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0064] Figure 1 is a schematic diagram of an application environment (terminal and gene sequencing equipment) according to Example 1 of the present invention;

[0065] Figure 2 is a schematic diagram of a system and method for identifying viral pathogens based on metagenomic sequencing data according to Example 1 of the present invention;

[0066] Figure 3 is an operation flow chart of converting metagenomic sequencing data into a K-mer frequency matrix by a data processing module according to Example 1 of the present invention;

[0067] Figure 4 is a schematic diagram of a K-mer partitioning operation according to Embodiment 1 of the present invention;

[0068] Figure 5 is a flowchart of the operation of an autoencoder module for mapping metagenomic sequencing data to a low-dimensional space according to Example 1 of the present invention;

[0069] Figure 6 is a schematic diagram of a model of an autoencoder neural network according to Embodiment 1 of the present invention;

[0070] Figure 7 is an operation flow chart of an identification module for assigning read length sequences to the most similar viral pathogens according to Example 1 of the present invention;

[0071] Figure 8This is a result diagram of the evaluation results of the model in Example 2 of the present invention on all 418 viral genomes that can infect humans in the background library, which respectively represents the identification accuracy and Kappa coefficient of the model at the virus type level, species level and genus level from left to right;

[0072] Fig. 9 This is the evaluation result of the model in Example 3 of the present invention on the influenza A virus dataset. The bar graphs from left to right respectively represent the identification accuracy, overall accuracy and overall Kappa coefficient of the model on different influenza A lineages;

[0073] Fig.10 is a structural diagram of a system for predicting sample source species according to an embodiment of the present invention;

[0074] Fig.11 is a structural diagram of a system for training a pre-trained model according to an embodiment of the present invention;

[0075] Fig.12 It is a structural diagram of a system for training a prediction model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0076] 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 intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0077] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0078] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0079] In one aspect of the present invention, the present invention proposes a method for extracting independent features based on a K-mer frequency matrix, the method for extracting independent features comprising:

[0080] Get the K-mer frequency matrix of sequencing results;

[0081] The independent feature matrix is ​​extracted based on the K-mer frequency matrix based on the following formula:

[0082] P=T(RL),

[0083] in,

[0084] T is the K-mer frequency matrix;

[0085] R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer;

[0086] L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions:

[0087] The frequencies of all K-mers were converted to sum to 1;

[0088] The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and

[0089] ∑(K-mer) i =∑(K-mer') i

[0090] Where i represents the number of K-mer, (K-mer') i Represents and (K-mer) i There are three consecutive overlapping bases.

[0091] According to some specific embodiments of the present invention, the method of extracting independent features based on the K-mer frequency matrix can effectively project non-independent K-mer features into a low-dimensional orthogonal space so that the remaining features remain independent to obtain target independent features.

[0092] According to some specific embodiments of the present invention, the above method for extracting independent features based on the K-mer frequency matrix may also include at least one of the following additional technical features:

[0093] According to some specific embodiments of the present invention, the sequencing results include simulated sequencing results or sequencing results generated by a sequencing platform.

[0094] According to some specific embodiments of the present invention, the first kernel matrix R is where K is the length of the K-mer and in each row, only the positions corresponding to the given K-mer and its reverse complementary K-mer are included. ij is the first predetermined constant, and the other positions are all 0. In the present invention, a 4-mer frequency matrix is ​​used as input information, and those skilled in the art can set K to other numerical frequency information inputs, such as 3-mer, 5-mer, etc., according to actual needs.

[0095] According to some specific embodiments of the present invention, the first predetermined constant is 0.5.

[0096] According to some specific embodiments of the present invention, the second kernel matrix L includes the following vectors:

[0097] a first vector, wherein the first vector is

[0098] The second vector is Where n represents the number of K-mers with reverse complementary sequences. In each row, only at the position corresponding to a given K-mer and its reverse complementary K-mer, A ij is the second predetermined constant, and the other positions are all 0;

[0099] A third vector, the third vector is In each row, only the positions of a given K-mer and the next K-mer of the given K-mer are the third predetermined constant, and the remaining positions are all 0.

[0100] According to some specific embodiments of the present invention, for the position of a given K-mer, the second predetermined constant is 1, and for the position of the reverse complementary K-mer, the second predetermined constant is -1. In this way, the given K-mer and the reverse complementary K-mer can be distinguished to avoid the appearance of completely identical vectors in the two matrices.

[0101] According to some specific embodiments of the present invention, for the position of a given K-mer, the third predetermined constant is 1, and for the position of a K-mer' that has three overlapping bases with the given K-mer, the second predetermined constant is -1.

[0102] In another aspect of the present invention, the present invention provides a method for predicting the species of origin of a sample, the method comprising:

[0103] Sequence the samples and obtain the K-mer frequency matrix based on the sequencing results;

[0104] Based on the K-mer frequency matrix, extracting an independent feature matrix according to the above-mentioned method for extracting independent features based on the K-mer frequency matrix;

[0105] Inputting the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction;

[0106] The reduced feature parameters are input into a trained prediction model to determine the source species of the sample.

[0107] The method according to some specific embodiments of the present invention can effectively and accurately predict the source species of the sample. Those skilled in the art can understand that the deep learning framework based on the VAE (variational autoencoder) model can also predict and identify bacteria, fungi and parasites.

[0108] According to some specific embodiments of the present invention, the above method for predicting the source species of a sample may also include at least one of the following additional technical features:

[0109] According to some specific embodiments of the present invention, the pre-trained model is an AutoEncoder, and the abstract features of the AutoEncoder are used as the feature parameters after dimensionality reduction.

[0110] According to some specific embodiments of the present invention, the prediction model is a support vector machine.

[0111] According to some specific embodiments of the present invention, the source species is a microorganism, preferably a virus. The method according to the embodiment of the present invention can be used to identify viral pathogens. The method has the advantages of short identification time and high accuracy. Conventional sequencing data (such as mNGS sequencing data) can be used to detect viral pathogens carried by patients, thereby realizing the function of rapid and efficient pathogen detection.

[0112] In another aspect of the present invention, the present invention proposes a method for training a pre-trained model. According to an embodiment of the present invention, the method for training a pre-trained model comprises:

[0113] Based on the sequencing data, an independent feature matrix is ​​obtained according to the above-mentioned method of extracting independent features based on the K-mer frequency matrix;

[0114] The independent feature matrix is ​​used as a training data set and input into an autoencoder for training, wherein the autoencoder includes two neural networks, Encoder and Decoder, wherein the Encoder compresses the input data to obtain an abstract feature, and the Decoder reconstructs the abstract feature to obtain a reconstructed feature, and the training uses the difference between the reconstructed feature and the input data as a loss function. As mentioned above, the method for training a pre-trained model according to some specific embodiments of the present invention can effectively train the pre-trained model.

[0115] According to some specific embodiments of the present invention, the method for training a pre-trained model may further include at least one of the following additional technical features:

[0116] According to some specific embodiments of the present invention, before the independent feature matrix is ​​input into the autoencoder, the independent feature matrix is ​​standardized so that the data of the feature matrix is ​​distributed between -1 and 1.

[0117] According to some specific embodiments of the present invention, the autoencoder is a variational autoencoder neural network.

[0118] In one aspect of the present invention, the present invention proposes a method for training a prediction model. According to an embodiment of the present invention, the method for training a prediction model comprises:

[0119] Based on the genome sequences of known species, simulate and generate sequencing data;

[0120] Based on the sequencing data, an independent feature matrix is ​​obtained according to the above-mentioned method for extracting independent features based on the K-mer frequency matrix;

[0121] Using the pre-trained model trained by the method for training the pre-trained model described above, pre-training the independent feature matrix to obtain feature parameters after dimension reduction;

[0122] The dimensionally reduced feature parameters are input into a supervised machine learning model, and the machine learning model is trained using known species types as labels to obtain a trained prediction model.

[0123] According to some specific embodiments of the present invention, the above method for training a prediction model may further include at least one of the following additional technical features:

[0124] According to some specific embodiments of the present invention, the supervised machine learning model is a support vector machine.

[0125] According to some specific embodiments of the present invention, the known species is a microorganism.

[0126] According to some specific embodiments of the present invention, the known species is a virus.

[0127] In one aspect of the present invention, the present invention proposes an independent feature extraction module based on a K-mer frequency matrix, wherein the independent feature extraction module is used to obtain a K-mer frequency matrix of a sequencing result; and based on the following formula, the independent feature matrix is ​​extracted based on the K-mer frequency matrix:

[0128] P=T(RL),

[0129] in,

[0130] T is the K-mer frequency matrix;

[0131] R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer;

[0132] L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions:

[0133] The frequencies of all K-mers were converted to sum to 1;

[0134] The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and

[0135] Here, i represents the number of K-mer, and (K-mer')i means that there are three consecutive overlapping bases with (K-mer)i.

[0136] According to some specific embodiments of the present invention, the independent feature extraction module based on the K-mer frequency matrix may further include at least one of the following additional technical features:

[0137] According to some specific embodiments of the present invention, the sequencing results include simulated sequencing results or sequencing results generated by a sequencing platform.

[0138] According to some specific embodiments of the present invention, the first kernel matrix R is where K is the length of the K-mer and in each row, only the positions corresponding to the given K-mer and its reverse complementary K-mer are included. ij is the first predetermined constant, and the other positions are all 0.

[0139] According to some specific embodiments of the present invention, the first predetermined constant is 0.5.

[0140] According to some specific embodiments of the present invention, the second kernel matrix L includes the following vectors:

[0141] a first vector, wherein the first vector is

[0142] The second vector is Where n represents the number of K-mers with reverse complementary sequences. In each row, only at the position corresponding to a given K-mer and its reverse complementary K-mer, A ij is the second predetermined constant, and the other positions are all 0;

[0143] A third vector, the third vector is In each row, only the positions of a given K-mer and the next K-mer of the given K-mer are the third predetermined constant, and the remaining positions are all 0.

[0144] According to some specific embodiments of the present invention, for the position of a given K-mer, the second predetermined constant is 1, and for the position of the reverse complementary K-mer, the second predetermined constant is -1.

[0145] According to some specific embodiments of the present invention, for the position of a given K-mer, the third predetermined constant is 1, and for the position of a K-mer' that has three overlapping bases with the given K-mer, the second predetermined constant is -1.

[0146] In another aspect of the present invention, the present invention provides a system for predicting the species of origin of a sample, such as Fig.10 As shown, the system 100 for predicting the species of origin of a sample includes:

[0147] A K-mer frequency matrix obtaining module 101 is used to sequence the sample and obtain a K-mer frequency matrix based on the sequencing result;

[0148] An independent feature extraction module 102 is used to extract an independent feature matrix based on the K-mer frequency matrix according to the above-mentioned method for extracting independent features based on the K-mer frequency matrix;

[0149] A feature parameter acquisition module 103 is used to input the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction;

[0150] The species prediction module 104 is used to input the dimension-reduced feature parameters into a trained prediction model to determine the source species of the sample.

[0151] According to some specific embodiments of the present invention, the system for predicting the species of origin of a sample may further include at least one of the following additional technical features:

[0152] According to some specific embodiments of the present invention, the pre-trained model is an AutoEncoder, and the abstract features of the AutoEncoder are used as the feature parameters after dimensionality reduction.

[0153] According to some specific embodiments of the present invention, the prediction model is a support vector machine.

[0154] According to some specific embodiments of the present invention, the source species is a microorganism, preferably a virus. The system according to the embodiment of the present invention can be used to identify viral pathogens. The system has the advantages of short running time and high accuracy, and can use conventional sequencing data (such as mNGS sequencing data) to detect viral pathogens carried by patients, thereby realizing the function of rapid and efficient pathogen detection.

[0155] In another aspect of the present invention, the present invention provides a system for training a pre-trained model, such as Fig.11 As shown, the system 200 for training the pre-trained model includes:

[0156] An independent feature extraction module 201 is used to obtain an independent feature matrix based on sequencing data according to the above-mentioned method of extracting independent features based on the K-mer frequency matrix;

[0157] The autoencoder module 202 is used to use the independent feature matrix as a training data set and input it into the autoencoder for training, wherein the autoencoder includes two neural networks, Encoder and Decoder, wherein the Encoder compresses the input data to obtain abstract features, and the Decoder reconstructs the abstract features to obtain reconstructed features, and the training uses the difference between the reconstructed features and the input data as a loss function.

[0158] According to some specific embodiments of the present invention, the system for training the pre-trained model may further include at least one of the following additional technical features:

[0159] According to some specific embodiments of the present invention, the system further includes a standardization processing module, which standardizes the independent feature matrix before inputting it into the autoencoder so that the data of the feature matrix is ​​distributed between -1 and 1.

[0160] According to some specific embodiments of the present invention, the autoencoder is a variational autoencoder neural network.

[0161] In another aspect of the present invention, the present invention provides a system for training a prediction model, such as Fig.12 As shown, the system 300 for training the prediction model includes:

[0162] The simulated sequencing data generating device 301 is used to simulate and generate sequencing data based on the genome sequence of a known species;

[0163] An independent feature extraction module 302 is used to obtain an independent feature matrix according to the above-mentioned method of extracting independent features based on the K-mer frequency matrix;

[0164] A feature parameter acquisition module 303 is used to pre-train the independent feature matrix using the pre-trained model trained by the method for training the pre-trained model described above, so as to obtain the feature parameters after dimension reduction;

[0165] The prediction model training module 304 is used to input the dimension-reduced feature parameters into a supervised machine learning model, and use known species types as labels to train the machine learning model to obtain a trained prediction model.

[0166] According to some specific embodiments of the present invention, the system for training the pre-trained model may further include at least one of the following additional technical features:

[0167] According to some specific embodiments of the present invention, the supervised machine learning model is a support vector machine.

[0168] According to some specific embodiments of the present invention, the known species is a microorganism.

[0169] According to some specific embodiments of the present invention, the known species is a virus.

[0170] In another aspect of the present invention, the present invention provides a computer device, the computer device comprising a memory and a processor;

[0171] The memory includes a memory for storing programs;

[0172] The processor includes a device for implementing the method described in the first aspect, the second aspect, the third aspect or the fourth aspect by executing the program stored in the memory.

[0173] In the last aspect of the present invention, the present invention proposes a computer-readable storage medium, wherein the storage medium stores a program, and the program can be executed by a processor to implement the method described in the first aspect, the second aspect, the third aspect or the fourth aspect.

[0174] The scheme of the present invention will be explained below in conjunction with the embodiments. It will be appreciated by those skilled in the art that the following embodiments are only used to illustrate the present invention and should not be considered as limiting the scope of the present invention. Where specific techniques or conditions are not indicated in the embodiments, the techniques or conditions described in the literature in this area or the product specifications are used. The reagents or instruments used are not indicated by the manufacturer and are all conventional products that can be obtained commercially.

[0175] Example 1

[0176] The model system for viral pathogen identification needs to be trained, and the specific steps are as follows:

[0177] This method is used in Figure 1In the terminal 101 shown, the terminal may be a large computing cluster, a personal computer, a laptop computer, etc. The terminal 101 is communicatively connected with a gene sequencing device 102, and the gene sequencing device 102 may be a gene sequencer, etc.

[0178] The terminal 101 and the gene sequencing device can transmit data through a mobile storage device such as a USB flash drive or a mobile hard disk, or can be connected to a local area network or the Internet for data interaction. The terminal 101 controls the working mode of the gene sequencing device 102 by adjusting the program script instructions. In addition, the sample data after sequencing can also be sent from the gene sequencing device 102 to the terminal 101 through instructions.

[0179] It is necessary to select viruses whose hosts are humans to build a database.

[0180] The present invention collects and summarizes 315 virus species with human hosts from three authoritative virus databases (NCBI, ICTV and ViralZone), and downloads 418 genomes from NCBI Refseq. All genomes are marked with Arabic numerals from 0 to 417. In addition, the present invention assigns a species ID (from 0 to 314) and a genus ID (from 0 to 93) to each genome to realize the predictive ability of the model at other classification levels.

[0181] Mason2 was used to simulate metagenomic read sequences for model training and testing.

[0182] Since viral genomes are usually very small (ranging from 1.7k to 235.6k bp in the dataset of the present invention), the present invention uses Mason2 to simulate one thousand data for each genome, thereby achieving comprehensive and in-depth coverage of the viral genome, and the simulated dataset is used as a training set.

[0183] In the model testing phase, the present invention uses a random seed different from the training data set and runs Mason2 to simulate 100 read length data for each genome. Unlike other deep learning methods that require a large amount of data input, the training scale is sufficient for the system of the present invention to achieve high accuracy.

[0184] In one embodiment, Figure 2 As shown, a system and method for identifying viral pathogens based on metagenomic sequencing data are provided. The system is mainly composed of a data processing module, a variational autoencoder module, and a pathogen identification module.

[0185] 1.1 Data processing module for converting metagenomic sequencing data into K-mer frequency matrix.

[0186] In one embodiment, Figure 3As shown, the data processing module mainly reads, filters, calculates K-mer frequencies, and calculates independent features of the metagenomic sample data output by the gene sequencing equipment, and finally outputs the K-mer frequency matrix of all sample sequences (Python's NumpyArray format).

[0187] Step P301, obtain the sequencing sample data completed from the gene sequencing device. The sequencing data is generally multiple sequences, and the data format is usually FASTQ. FASTQ is a text-based standard format for storing biological sequences (usually nucleic acid sequences) and their sequencing quality information. The file format applicable to the model in the present invention is FASTA. FASTA is a text-based format for representing nucleotide sequences or amino acid sequences. In this format, base pairs or amino acids are encoded with a single letter, and sequence names and comments are allowed to be added before the sequence. The present invention converts the FASTQ file into the FASTA file format through the disclosed seqtk software;

[0188] After obtaining the sequencing sample data, iterate each sequence in the sequencing data to obtain multiple K-mers. Count the number of occurrences of each sequence and divide it by the sum of all K-mer numbers to obtain the K-mer frequency vector of a single sequence. After all sequences are iterated, this step outputs the K-mer frequency matrix for all input sequences.

[0189] like Figure 4 As shown in the figure, K-mer refers to dividing a sequence into strings containing k bases. For example, 10-mer represents a polynucleotide copolymer fragment of 10 bases. Generally, reads of length m can be divided into m-k+1 K-mers. The main operation is to start from the first base and use the form of a sliding window (step size of 1) to extract Kbp sequences in sequence. K-mer counting is the basis of many alignment tools, genome assembly programs, and various genome analysis tools (such as genotyping, metagenomics analysis, etc.), and is the most important type of algorithm in bioinformatics.

[0190] Step P302, quality control is performed on the sequence information after the K-mer conversion, and the sequences whose statistics are all 0 in all K-mers are filtered out.

[0191] Step P303, calculating the independent features of the K-mer frequency matrix;

[0192] Specifically, since the K-mer features are not independent, this step performs a Markov chain Monte Carlo kernel operation on the K-mer frequency matrix, projects all K-mer vectors into a low-dimensional orthogonal space, and makes the remaining features independent. For a single input sequence, the kernel calculation is mainly based on the following principles: 1) The sum of the K-mer frequencies must be equal to 1; 2) Since the sequencing process is arbitrary, it is impossible to distinguish between a K-mer and its reverse complementary sequence, so the frequency of each K-mer is the same as its reverse complementary sequence. For example, the frequency of AGAT needs to be counted as half of the sum of the frequencies of AGAT and ATCT. 3) Each time a K-mer sequence is counted, the next K-mer sequence must have three overlapping nucleotides. Specifically, taking 4-mer as an example, sum(xABC)=sum(ABCx) is satisfied. Specifically, taking 4-mer sequence as an example, sum(xABC)=sum(ABCx) is satisfied, where xABC and ABCx represent the frequencies of adjacent 4-mer sequences respectively.

[0193] The present invention generates a unique kernel matrix L for use in the original frequency matrix T to perform operations: P=TL, so as to satisfy the above three constraint principles.

[0194] In order to make constraint principle 2) valid, the inventors made the statistical frequencies of each K-mer and its reverse complementary K-mer equal. This problem can be solved by introducing a reverse complementary sequence matrix R. The final formula is:

[0195] P=(TR)L=T(RL)=TK

[0196] Therefore, K=RL is set as the kernel matrix used to calculate independent features in the present invention.

[0197] The L matrix consists of three vector sets, which are used to make the calculated features satisfy the above three principles:

[0198] (1) The first vector set contains only one vector, which has a dimension of 4 k , where k is the length of the K-mer and all elements are labeled Ensure that the sum of the K-mer frequencies after the operation is equal to 1.

[0199] (2) The second vector set consists of n vectors, where n is the number of K-mers with reverse complementary sequences. The positions of the K-mer and its reverse complementary sequence are marked with weights of 1 and -1, respectively, and the weights of other positions are marked with weights of 0, so that the frequencies of the K-mer and its reverse complementary K-mer remain equal after the operation.

[0200] (3) The third vector set consists of 4 k-1vectors. Taking the 4-mer sequence as an example, for each overlapping sequence ABC, the frequency of xABC and the frequency of ABCx are marked with weights of 1 and -1 respectively, so that sum(xABC)=sum(ABCx) is satisfied.

[0201] In addition, the R matrix is ​​a 4-dimensional k ×4 k The reverse complementary sequence matrix is ​​composed of 0.5 and 0, which ensures that the statistical frequency of complementary K-mers will not overflow in subsequent calculations.

[0202] The independent dimensions after kernel operation are shown in Table 1.

[0203] Table 1:

[0204] K Overall Dimensions Independent Dimension 1 4 1 2 16 7 3 64 25 4 256 103 5 1024 391 1-3 84 33 1-4 340 136 1-5 1364 527

[0205] As shown in the table above, the K column represents the optional K-mer length, which can be a positive integer or a combination of multiple K-mers. The value of K can be flexible, but in actual situations it should not be too small or too large. When the value of K is too small, the K-mer sequence is too short, resulting in fewer K-mer combinations listed, and less effective information; when the value of K is too large, the K-mer sequence is too long, and the K-mer combinations listed grow exponentially (K-mer combinations are expressed as 4 to the power of k), resulting in the K-mer frequency matrix being too sparse, and the efficiency of subsequent analysis is low.

[0206] According to the accuracy test, the inventors took 4 bp as the length of K-mer. Using K-mer of this length can further improve the accuracy of subsequent analysis.

[0207] 1.2 Autoencoder module for mapping metagenomic sequencing data to low-dimensional space;

[0208] In one embodiment, according to the K-mer frequency matrix output in step P303, a neural network model based on VAE (variational autoencoder) is trained. The module is divided into three steps: Figure 5 shown.

[0209] Step P501, the information input of the variational autoencoder module is the independent characteristic frequencies of all the sequences to be tested on K-mer, and the Z-score is normalized by the following formula. The processed data conforms to the standard normal distribution, so that the data is distributed in the range of -1 to 1:

[0210]

[0211] Where x represents the characteristic value of a K-mer sequence on the target read; μ represents the overall average value of a K-mer on all reads; σ represents the overall standard deviation of a K-mer on all reads. The standardized variable value z fluctuates around 0. If it is greater than 0, it means it is higher than the average level, and if it is less than 0, it means it is lower than the average level.

[0212] Step P502, construct a variational autoencoder network. The variational autoencoder network can be regarded as an information capturer, which represents the input information as a low-dimensional information synthesis vector. Figure 6 As shown in Figure 1, the variational autoencoder network mainly consists of the following three parts:

[0213] The encoder layer q consists of two fully connected layers θ (z|x). The encoder layer maps the original high-dimensional data to a low-dimensional feature space. The neuron sizes of the two fully connected layers constituting the encoder layer in the present invention are 256 and 64, respectively.

[0214] The hidden layer consists of a mean μ layer and a standard deviation σ layer. The feature dimension of the hidden layer is generally smaller than the original data dimension, which serves the purpose of compression or dimensionality reduction. The variational autoencoder generates l different Gaussian distributions (l i ~G(μ i ,σ i )), l is the number of hidden layers.

[0215] The decoder layer p consists of two fully connected layers φ (x′|z). The fully connected layers that make up the decoder layer have the same parameters as the fully connected layers in the encoder layer, but in the opposite order. The decoder layer maps the low-dimensional latent variables back to the high-dimensional input.

[0216] In terms of activation functions, the μ layer and σ layer use linear activation functions and Softplus activation functions, and other layers use ReLu activation functions. For the output of the decoder layer, a linear activation function is used for connection. After training the model, the value of the μ layer is extracted as the latent space value instead of sampling a new value from the Gaussian distribution. This ensures the repeatability of the model.

[0217] Step P403, minimizing the loss function. The loss function is used to evaluate the degree of difference between the predicted value and the true value of the model. The better the loss function, the better the performance of the model. Different models generally use different loss functions.

[0218] Specifically, ideally, the information input to the variational autoencoder layer can be encoded into a low-dimensional potential representation and then decoded back to its original dimension. The inventor minimizes the error between the input x of the encoder layer and the output x' of the decoder layer, and the error function is defined as the following formula:

[0219] E io =∑(xx′) 2

[0220] Where x is the model input, x′ is the reconstructed output, and E io represents the error between x and x′.

[0221] In order to regularize the model and approximate the true posterior probability, so that the estimated posterior distribution is as close as possible to the true posterior distribution, the Kullback-Leibler (KL) divergence is used to evaluate the difference between the two distributions, which is defined as the following formula:

[0222]

[0223] where q θ (z|x) is the posterior distribution of variational inference, p θ (z|x) is the true posterior distribution, μ and σ are the mean and standard deviation of the Gaussian distribution, respectively.

[0224] The total loss is:

[0225] L=w io E io +w KL D KL

[0226] Among them, the weights of the final LOSS function are defined as w io =α / 136,w KL =(lβ) -1 In the present invention, the default values ​​of parameters α and β are set to 0.15 and 200 respectively.

[0227] In addition, different hidden layer dimensions (8, 16, 32 and 64) were tested, and the inventors found that the prediction accuracy was best when 64-dimensional hidden layers were selected.

[0228] 1.3 Identification module for assigning read sequences to the most similar viral pathogens.

[0229] Based on the reduced-dimensional 4-mer frequency matrix information output by the variational autoencoder module, the SVM (support vector machine) machine learning model is used to predict the viral pathogen that is most similar to the input read.

[0230] In one embodiment, Figure 7As shown, the recognition method of the read length sequence identification module is:

[0231] Step P701, module data input, the input data of the read length sequence identification module is the vector after the variational autoencoder dimension reduction, and the dimension is 1 × 64. Because the data has been reduced to the same interval by the encoder layer, no additional standardization or normalization operation is required.

[0232] Step P702, construct a machine learning model, input the data vector after dimension reduction by the variational autoencoder and its corresponding virus type number information into the SVM machine learning model, use the multi-classification SVM module in scikit-learn, and use the RBF radial basis kernel function kernel for hyperplane learning training.

[0233] Step P703, parameter tuning, the SVM machine learning model using radial basis function needs to perform two core parameter tunings, namely C and gamma, which correspond to the width of the decision surface boundary and the complexity of the model respectively. Models with narrow decision boundaries and high complexity may accurately distinguish different categories on the training set, but there is a high risk of causing the model to overfit, have weak generalization ability, and be unsuitable for other training sets. It is necessary to test different C and gamma values ​​to obtain the optimal decision method and improve the universality of the model.

[0234] After testing, the optimal parameters for the present invention are C=10, gamma=2 -6 .

[0235] Step P704, virus type prediction, passes the input features through a supervised machine learning multi-classification model, and outputs the final predicted virus prediction result, with the highest accuracy reaching the subtype. According to the output subtype, it can be further matched to the type, species and genus information of the virus, which is convenient for users to search.

[0236] Step P705, model evaluation, input the training set data into the model for training, output the optimal model, and then use the test set for testing, calculate the accuracy of the model prediction at all read sequence subtype levels, species levels, and genus levels, and each read sequence is considered correct if it is predicted to the correct category, otherwise it is considered wrong. At the same time, the kappa coefficient is calculated based on the confusion matrix to compare the consistency between the multi-classification model prediction and the actual. The formula for calculating the kappa coefficient is as follows:

[0237]

[0238] Among them, p0 represents the sum of the number of correctly classified samples in each category divided by the total number of samples, that is, the accuracy rate. e The calculation formula is as follows:

[0239]

[0240] Among them, t i represents the number of real samples of virus type i, p i Represents the number of predicted samples of virus type i, with a total of n virus types.

[0241] The inventors used viral genome sequences downloaded from an authoritative platform to simulate viral sequencing data, and evaluated and compared the above two parameters at three classification levels.

[0242] Step P706, report output, based on the prediction results output by the read sequence identification module, the present invention can output reports in two modes. One is the prediction results of the type of virus corresponding to each read sequence according to the order of the input read sequence. The other is the summary statistics of the output results, including the predicted virus type and the corresponding number of sequences.

[0243] Example 2

[0244] In order to evaluate the analytical performance of the present invention, the inventors downloaded a total of 418 representative genomes of all viruses that can infect humans from the NCBI platform, and used Mason2 to simulate 100 sequencing data of 150 bases in length for each genome. The accuracy and kappa coefficient were evaluated and compared at the three classification levels of type, species, and genus. In the calculation of accuracy, each read sequence is considered correct if it predicts the correct category, otherwise it is considered wrong. The formula for calculating the kappa coefficient is as follows:

[0245]

[0246] Among them, p0 represents the sum of the number of correctly classified samples in each category divided by the total number of samples, that is, the accuracy rate. e The calculation formula is as follows:

[0247]

[0248] Among them, t i represents the number of real samples of virus type i, p i Represents the number of predicted samples of virus type i, with a total of n virus types.

[0249] The evaluation results of this experiment are shown in Table 2 and Figure 8 As shown:

[0250] Table 2:

[0251]

[0252] Example 3

[0253] To further evaluate the analytical performance of the present invention at the virus type level, the inventors used 6 different lineages of influenza A virus reference genomes for sequence data simulation, and their genome assembly numbers and lineage information at NCBI are shown in Table 3. The sequence fasta data was input into the system and the pathogen identification results were obtained.

[0254] Table 3:

[0255]

[0256] As shown in Table 3 and Fig. 9 As shown, the average accuracy and Kappa coefficient of the present invention are 0.982 and 0.978 respectively, and the accuracy of all influenza A lineages reaches 97% and above, among which the accuracy of H1N1 and H9N2 lineages reaches 99%.

[0257] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0258] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for extracting independent features based on K-mer frequency matrix, characterized in that: include: Get the K-mer frequency matrix of sequencing results; The independent feature matrix is ​​extracted based on the K-mer frequency matrix based on the following formula: P=T(RL), in, T is the K-mer frequency matrix; R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer; L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions: The frequencies of all K-mers were converted to sum to 1; The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and ∑(K-mer) i =∑(K-mer') i Where i represents the number of K-mer, (K-mer') i Represents and (K-mer) i There are three consecutive overlapping bases.

2. The method according to claim 1, characterized in that The sequencing results include simulated sequencing results or sequencing results generated by a sequencing platform.

3. The method according to claim 1, characterized in that: The first kernel matrix R is where K is the length of the K-mer and in each row, only the positions corresponding to the given K-mer and its reverse complementary K-mer are included. ij is the first predetermined constant, and the other positions are all 0.

4. The method according to claim 3, characterized in that The first predetermined constant is 0.

5.

5. The method according to claim 1, characterized in that The second kernel matrix L includes the following vectors: a first vector, wherein the first vector is The second vector is Where n represents the number of K-mers with reverse complementary sequences. In each row, only at the position corresponding to a given K-mer and its reverse complementary K-mer, A ij is the second predetermined constant, and the other positions are all 0; A third vector, the third vector is In each row, only the positions of a given K-mer and the next K-mer of the given K-mer are the third predetermined constant, and the remaining positions are all 0.

6. The method according to claim 5, characterized in that For the position of a given K-mer, the second predetermined constant is 1, and for the position of the reverse complementary K-mer, the second predetermined constant is -1.

7. The method according to claim 5, characterized in that For the position of a given K-mer, the third predetermined constant is 1, and for the position of a K-mer' that has three overlapping bases with the given K-mer, the second predetermined constant is -1.

8. A method for predicting the species of a sample, characterized in that: include: Sequence the samples and obtain the K-mer frequency matrix based on the sequencing results; Based on the K-mer frequency matrix, extracting an independent feature matrix according to the method described in any one of claims 1 to 7; Inputting the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction; The reduced feature parameters are input into a trained prediction model to determine the source species of the sample.

9. The method according to claim 8, characterized in that The pre-trained model is an autoencoder (AutoEncoder), and the abstract features of the AutoEncoder are used as the feature parameters after dimension reduction.

10. The method according to claim 8, characterized in that The prediction model is a support vector machine (Support Vector Machines); optionally, the source species is a microorganism, preferably a virus.

11. A method for training a pre-trained model, characterized in that: include: Based on the sequencing data, obtaining an independent feature matrix according to the method of any one of claims 1 to 7; The independent feature matrix is ​​used as a training data set and input into an autoencoder for training, wherein the autoencoder includes two neural networks, an encoder and a decoder, wherein the encoder compresses the input data to obtain abstract features, and the decoder reconstructs the abstract features to obtain reconstructed features, and the training uses the difference between the reconstructed features and the input data as a loss function.

12. The method according to claim 11, characterized in that Before the independent feature matrix is ​​input into the autoencoder, the independent feature matrix is ​​standardized so that the data of the feature matrix is ​​distributed between -1 and 1.

13. The method according to claim 11, characterized in that The autoencoder is a variational autoencoder neural network (Variational AutoEncoder).

14. A method for training a prediction model, characterized in that: include: Based on the genome sequences of known species, simulate and generate sequencing data; Based on the sequencing data, obtaining an independent feature matrix according to the method of any one of claims 1 to 7; Pre-training the independent feature matrix using a pre-trained model trained by the method described in any one of claims 11 to 13 to obtain feature parameters after dimension reduction; The dimensionally reduced feature parameters are input into a supervised machine learning model, and the machine learning model is trained using known species types as labels to obtain a trained prediction model.

15. The method according to claim 14, characterized in that The supervised machine learning model is Support Vector Machines (SVM).

16. The method according to claim 14, characterized in that The known species is a microorganism, preferably a virus.

17. An independent feature extraction module based on K-mer frequency matrix, characterized in that: A K-mer frequency matrix for obtaining sequencing results; and extracting the independent feature matrix based on the K-mer frequency matrix based on the following formula: P=T(RL), in, T is the K-mer frequency matrix; R is a first kernel matrix, used to convert the frequency of each given K-mer into the mean of the frequency of the given K-mer and the frequency of its reverse complementary K-mer; L is a second kernel matrix, which is used to make the converted K-mer matrix satisfy at least one of the following conditions: The frequencies of all K-mers were converted to sum to 1; The frequency of each given K-mer is the same as the frequency of the reverse complementary K-mer of the given K-mer; and Here, i represents the number of K-mer, and (K-mer')i means that there are three consecutive overlapping bases with (K-mer)i.

18. The independent feature extraction module according to claim 17, characterized in that: The sequencing results include simulated sequencing results or sequencing results generated by a sequencing platform.

19. The independent feature extraction module according to claim 17, characterized in that: The first kernel matrix R is where K is the length of the K-mer and in each row, only the positions corresponding to the given K-mer and its reverse complementary K-mer are included. ij is the first predetermined constant, and the other positions are all 0.

20. The independent feature extraction module according to claim 19, characterized in that: The first predetermined constant is 0.

5.

21. The independent feature extraction module according to claim 17, characterized in that: The second kernel matrix L includes the following vectors: a first vector, wherein the first vector is The second vector is Where n represents the number of K-mers with reverse complementary sequences. In each row, only at the position corresponding to a given K-mer and its reverse complementary K-mer, A ij is the second predetermined constant, and the other positions are all 0; A third vector, the third vector is In each row, only the positions of a given K-mer and the next K-mer of the given K-mer are the third predetermined constant, and the remaining positions are all 0.

22. The independent feature extraction module according to claim 21, characterized in that: For the position of a given K-mer, the second predetermined constant is 1, and for the position of the reverse complementary K-mer, the second predetermined constant is -1.

23. The independent feature extraction module according to claim 21, characterized in that: For the position of a given K-mer, the third predetermined constant is 1, and for the position of a K-mer' that has three overlapping bases with the given K-mer, the second predetermined constant is -1.

24. A system for predicting the species of origin of a sample, characterized in that: include: A K-mer frequency matrix acquisition module is used to sequence the sample and obtain a K-mer frequency matrix based on the sequencing results; An independent feature extraction module, used for extracting an independent feature matrix based on the K-mer frequency matrix according to the method described in any one of claims 1 to 7; A feature parameter acquisition module, used for inputting the independent feature matrix into a trained pre-trained model to obtain feature parameters after dimension reduction; The species prediction module is used to input the dimension-reduced feature parameters into a trained prediction model to determine the source species of the sample.

25. The system according to claim 24, characterized in that The pre-trained model is an autoencoder (AutoEncoder), and the abstract features of the AutoEncoder are used as the feature parameters after dimension reduction.

26. The system according to claim 24, characterized in that The prediction model is support vector machine (Support Vector Machines); Optionally, the source species is a microorganism, preferably a virus.

27. A system for training a pre-trained model, characterized in that: include: An independent feature extraction module, used to obtain an independent feature matrix based on sequencing data according to the method described in any one of claims 1 to 7; The autoencoder module is used to use the independent feature matrix as a training data set and input it into the autoencoder for training, wherein the autoencoder includes two neural networks, Encoder and Decoder, wherein the Encoder compresses the input data to obtain abstract features, and the Decoder reconstructs the abstract features to obtain reconstructed features, and the training uses the difference between the reconstructed features and the input data as a loss function.

28. The system for training a pre-trained model according to claim 27, characterized in that: The system further includes a standardization processing module, which performs standardization processing on the independent feature matrix before inputting the independent feature matrix into the autoencoder so that the data of the feature matrix is ​​distributed between -1 and 1.

29. The system for training a pre-trained model according to claim 27, characterized in that: The autoencoder is a variational autoencoder neural network (Variational AutoEncoder).

30. A system for training a prediction model, characterized in that: include: A simulated sequencing data generating device, used for simulating and generating sequencing data based on the genome sequence of a known species; An independent feature extraction module, used for obtaining an independent feature matrix according to the method described in any one of claims 1 to 7; A feature parameter acquisition module, used to pre-train the independent feature matrix using a pre-trained model trained by the method described in any one of claims 11 to 13, so as to obtain feature parameters after dimension reduction; The prediction model training module is used to input the dimension-reduced feature parameters into a supervised machine learning model, and use known species types as labels to train the machine learning model to obtain a trained prediction model.

31. The system for training a prediction model according to claim 30, characterized in that: The supervised machine learning model is Support Vector Machines (SVM).

32. The system for training a prediction model according to claim 30, characterized in that: The known species is a microorganism, preferably a virus.

33. A computer device, characterized in that: including memory and processor; The memory includes a memory for storing programs; The processor includes a device for implementing the method of any one of claims 1 to 7, claims 8 to 10, claims 11 to 13, or claims 14 to 16 by executing the program stored in the memory.

34. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program can be executed by a processor to implement the method described in any one of claims 1 to 7, claims 8 to 10, claims 11 to 13, or claims 14 to 16.