A metagenomic binning method and system combining reference library prior knowledge
By combining prior knowledge from the reference library with a binning method that integrates the reference library and feature-independent binning, the problem of insufficient binning accuracy for unknown species sequences is solved, and higher precision binning results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XINYUAN FRUIT IND (SHANDONG) GRP CO LTD
- Filing Date
- 2022-03-31
- Publication Date
- 2026-06-02
Smart Images

Figure CN114664383B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of metagenomics and data science, and in particular to metagenomic binning methods and systems that incorporate prior knowledge of a reference library. Background Technology
[0002] The statements in this section merely refer to the background art relevant to this application and do not necessarily constitute prior art.
[0003] Metagenomics studies the genetic material of microorganisms directly from natural environmental samples, providing an effective method for studying the real microbial world and avoiding the biases introduced by laboratory cultures. Metagenomic binning classifies gene sequences to distinguish different microbial species or subspecies, and the binning results directly affect the accuracy of metagenomic research; therefore, metagenomic binning has become a key issue in metagenomic research.
[0004] Currently, metagenomics binning studies are mainly divided into two categories: contig binning and long read binning. Contigs are long gene fragments formed by connecting short reads together through overlapping terminal sequences; while long reads are long gene sequences generated by third-generation sequencing (TGS) technology. Both types are more suitable for binning than short reads due to their longer sequences and the inclusion of more genetic features.
[0005] Regarding binning methods, existing metagenomics binning methods can be broadly categorized into two types: reference-based binning and reference-free binning. Reference-based binning classifies the target sequence dataset by comparing it to a reference database of known species. This method achieves high binning accuracy for gene sequences of known species but cannot handle unknown species. Reference-free binning, on the other hand, does not rely on a reference database but instead uses discriminative features of gene sequences, employing feature engineering and clustering methods to achieve binning. This type of binning can classify unknown species, but its binning accuracy is typically lower, especially when the differences in discriminative features are small or the number of species is large.
[0006] In recent years, with the continuous discovery and registration of new species, reference libraries have been greatly supplemented and improved, providing convenient assessment of species information in target sequence datasets. Although this assessment is not yet accurate enough, it is valuable prior knowledge, and fully utilizing this prior information can greatly improve binning accuracy. Currently, some researchers have combined two binning methods to achieve metagenomic binning. The binning process is divided into two relatively independent stages: first, a feature library-independent binning method is used for initial binning; then, sequences with insufficient binning quality are re-binded using a feature library-based method. Essentially, this method uses feature library-based binning as a supplementary strategy to feature library-independent binning, without truly integrating the two methods. When the distinguishing feature differences are small or the number of species is large, the binning effect of this method will depend on the reference library-based re-binning, thus affecting the identification of unknown species sequences. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this application provides a metagenomic binning method and system that integrates prior knowledge from a reference library. This method fully utilizes the prior knowledge provided by existing reference libraries, incorporating this prior knowledge into feature-independent metagenomic binning. Compared to existing technologies, this method essentially integrates these two types of binning methods, solving the problems of existing metagenomic binning methods' inability to handle unknown species sequences or insufficient binning accuracy. It can binnify gene sequences of unknown species and also exhibits superior binning performance compared to reference library-independent binning methods.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0009] A metagenomic binning method incorporating prior knowledge from a reference library storing standard gene sequences of known species includes the following steps:
[0010] Obtain the target sequence dataset, extract features from each sequence sample to obtain its initial discriminative feature vector, and after feature transformation, obtain the binning feature vector of the sequence.
[0011] The target sequence dataset is compared with a reference database to obtain an estimated number of species in the target sequence dataset and a confidence level that each sequence sample belongs to a different species. Based on the estimated number of species, a feasible interval for the number of bins is generated, within which the number of each feasible bin is greater than or equal to the estimated number of species. Based on the confidence level that each sequence sample belongs to a different species, a priori cluster center set is obtained, and the feasible interval for the number of bins and the priori cluster center set are used as prior knowledge.
[0012] For each number of bins within the feasible range of bin numbers, a corresponding cluster center set is determined. The cluster center set includes a prior cluster center set and an amplified cluster center set. For each feasible number of bins, cluster analysis is performed on the bin feature vector set based on the corresponding cluster center set. The optimal clustering result is selected, and the sequence sample set corresponding to each cluster in the optimal clustering result is obtained, which is the binning result.
[0013] Furthermore, the feature transformation is used to obtain a low-dimensional representation of the initial distinguishing feature vector, i.e., the binning feature vector.
[0014] Furthermore, the feature transformation employs any of the following methods:
[0015] (1) Deep learning model VAE; (2) Dimensionality reduction model UMAP; (3) First, use deep learning model VAE, and then use dimensionality reduction model UMAP on the obtained latent vectors.
[0016] Furthermore, based on the confidence level that each sequence sample belongs to a different species, the prior cluster center set is obtained, including:
[0017] For each species, based on the confidence that each sequence sample belongs to that species, multiple benchmark sequence samples of that species are selected, and the binning feature vectors of these benchmark samples are obtained based on the binning feature vector set. The center of these binning feature vectors is the prior cluster center of that species.
[0018] Furthermore, the amplified cluster centers are selected randomly from the binning feature vector set, and the distance between any two amplified cluster centers and between each amplified cluster center and each prior cluster center is not less than a set threshold.
[0019] Furthermore, based on the silhouette coefficient or CH index, the clustering results corresponding to all feasible bin numbers are compared, and the optimal clustering result is selected.
[0020] Further, obtaining the sequence sample set corresponding to each cluster in the optimal clustering result includes:
[0021] Suppose X is a target sequence dataset. For any sequence sample x∈X, let Let x be the binning feature vector. If the optimal clustering result is... Then calculate B j ={x|x∈X and j = 1, 2, ..., K * This yields the sequence sample set corresponding to each cluster. This is the result of binning.
[0022] One or more embodiments provide a metagenomic binning system that incorporates prior knowledge from a reference library, the reference library storing standard gene sequences of known species, including:
[0023] The feature extraction module is used to acquire the target sequence dataset, extract features from each sequence sample to obtain its initial distinguishing feature vector, and after feature transformation, obtain the binning feature vector of the sequence.
[0024] The prior knowledge acquisition module is used to compare the target sequence dataset with a reference library to obtain an estimated number of species in the target sequence dataset and a confidence level that each sequence sample belongs to a different species; it generates a feasible interval for the number of bins based on the estimated number of species, within which the number of each feasible bin is greater than or equal to the estimated number of species; and it obtains a prior cluster center set based on the confidence level that each sequence sample belongs to a different species, using the feasible interval for the number of bins and the prior cluster center set as prior knowledge.
[0025] The binning module is used to determine the corresponding cluster center set for each feasible number of bins within the feasible range of bin numbers. The cluster center set includes a prior cluster center set and an amplified cluster center set. For each feasible number of bins, cluster analysis is performed on the bin feature vector set based on the corresponding cluster center set. The optimal clustering result is selected, and the sequence sample set corresponding to each cluster in the optimal clustering result is obtained, which is the binning result.
[0026] One or more embodiments provide an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the metagenomic binning method incorporating prior knowledge of a reference library.
[0027] One or more embodiments provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the metagenomic binning method incorporating prior knowledge of a reference library.
[0028] The above one or more technical solutions have the following beneficial effects:
[0029] This application first estimates the number of species based on a reference library and selects confidence sequence samples of these species. The centers of the binning feature vectors of these confidence sequence samples are used as prior cluster centers. Then, based on the prior cluster centers, cluster centers for unknown species are expanded. Next, based on the prior cluster centers and the expanded cluster centers, the sequence binning feature set is clustered. Finally, binning of the target sequence dataset is achieved based on the optimal clustering results. This application fully utilizes the prior knowledge provided by the existing reference library, incorporating this prior knowledge into feature-independent metagenomic binning, essentially achieving a fusion of these two types of binning methods.
[0030] Compared to binning based on a reference library, this application achieves binning for sequences of unknown species; compared to reference library-independent binning, it has better binning performance than existing reference library-independent binning methods because it uses species information from the reference library as prior knowledge. Attached Figure Description
[0031] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.
[0032] Figure 1 This is a schematic diagram of the main steps of the metagenomic binning method that incorporates prior knowledge of a reference library in one or more embodiments of this application. Detailed Implementation
[0033] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0034] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0035] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0036] Example 1
[0037] This embodiment provides a metagenomics binning method that incorporates prior knowledge from a reference library, comprising three stages: feature processing, acquiring prior knowledge, and binning. The method includes the following steps:
[0038] Step 1: Obtain the target sequence dataset, extract features from each sequence sample to obtain its initial distinguishing feature vector, and after feature transformation, obtain the binning feature vector of the sequence.
[0039] Step 1 corresponds to the feature processing stage, and specifically includes:
[0040] Step 1-1: Obtain the target sequence dataset. Let the target sequence dataset be X = {x1, x2, ..., x...} n}, where n represents the number of sequence samples.
[0041] Step 1-2: Extract features from all sequence samples in the target sequence dataset to obtain an initial distinguishing feature set. Specifically, for any sequence sample x... i ∈X, calculate its initial discriminative features, and obtain the initial discriminative feature vector F of the sequence sample. i =(f i,1 ,f i,1 ,…,f i,m ), where m is the feature dimension; thus, the initial discriminative feature set {F1, F2, ..., F} corresponding to the target sequence dataset X is obtained. n For long reads and overlapping groups, this initial discriminative feature mainly includes composition and coverage information.
[0042] Steps 1-3: Perform feature transformation on the initial discriminative feature set to obtain the binning feature vector set. Specifically, for the initial discriminative feature set {F1, F2, ..., F...}, ... n The binning feature vector set {F'1, F'2, ..., F'} is obtained by performing feature transformation using machine learning or deep learning models. n}, where F' i =(f' i,1 ,f' i,2 ,…,f' i,s ) represents the sequence sample x i The binning feature vectors are i = 1, 2, ..., n, and s is the dimension of the binning feature.
[0043] The purpose of the feature transformation is to obtain a low-dimensional representation of the initial discriminative feature vector, i.e., the binning feature vector, which can be achieved using a deep learning model VAE or a dimensionality reduction model UMAP. As a preferred implementation, a deep learning model VAE is first used, followed by a dimensionality reduction model UMAP on the obtained latent vectors. Using a deep learning model VAE can preserve the saliency information of the initial discriminative feature set to the maximum extent while achieving dimensionality reduction. Then, the final low-dimensional representation is obtained through the dimensionality reduction model UMAP, ensuring the difference between binning feature vectors of different species in the binning feature vector set, and also improving the efficiency of subsequent clustering.
[0044] Taking a long-read dataset as an example, suppose the long-read dataset is X={x1,x2,...,x...} n}, where n is the number of long read samples. For any long read sample x i For each ∈X, its 3-nucleotide composition and k-mer coverage are calculated as initial distinguishing features, resulting in an initial distinguishing feature set {F1, F2, ..., F...}. nThen, this initial distinguishing feature set is transformed using the deep learning model VAE and the dimensionality reduction model UMAP to obtain the binning feature vector set {F'1, F'2, ..., F'}. n}, where F' i =(f' i,1 ,f' i,2 ,…,f' i,s Let i = 1, 2, ..., n, and s be the dimension of the binning eigenvectors. In this embodiment, s = 2.
[0045] Step 2: Compare the target sequence dataset with the reference database to obtain the estimated number of species in the target sequence dataset and the confidence level that each sequence sample belongs to different species. Generate a feasible interval for the number of bins based on the estimated number of species. Within this interval, the number of each feasible bin is greater than or equal to the estimated number of species. Obtain a prior cluster center set based on the confidence level that each sequence sample belongs to different species. Use the feasible interval for the number of bins and the prior cluster center set as prior knowledge.
[0046] Step 2 corresponds to the prior knowledge acquisition stage, and specifically includes:
[0047] Step 2-1: Align the target sequence dataset X with the reference library to obtain an estimated number of species K in dataset X. # And the confidence level that each sequence sample belongs to a different species.
[0048] Step 2-2: Set the feasible range for the number of boxes Where α is the interval width factor, which takes an empirical value greater than 1. In this embodiment, α = 1.5.
[0049] Steps 2-3: For each species, based on the confidence level that each sequence sample belongs to that species, select multiple benchmark samples for that species, and obtain the binning feature vectors of these benchmark samples based on the binning feature vector set. The center of these binning feature vectors is the prior cluster center corresponding to that species. In this embodiment, the mean of multiple binning feature vectors is used as the center of the multiple binning feature vectors.
[0050] Specifically, based on the confidence level of each sequence sample belonging to different species obtained in step 2-1, for species v, v = 1, 2, ..., K # The t sequence samples with the highest confidence levels are selected as benchmark samples for this species; then, in {F'1,F'2,…,F' n Find the binning feature vectors of these benchmark samples, and calculate the center of these binning feature vectors as the confidence cluster center cx for species v. v Based on this, the prior cluster center set of all species is obtained.
[0051] Taking a long read dataset as an example, the target sequence dataset X is first compared with the reference library to obtain an estimated value K of the number of species contained in dataset X. # And the confidence level of each sequence sample belonging to different species, and then, for any species v, v = 1, 2, ..., K # The 50 long read samples with the highest confidence levels were selected as benchmark samples; then, in {F'1,F'2,…,F' n Find the binning feature vectors of these 50 benchmark samples, and calculate the center of these binning feature vectors as the confidence cluster center cx for species v. v Based on this, the prior cluster center set of all species is obtained.
[0052] Step 3 corresponds to the boxing stage.
[0053] Step 3: For each feasible number of bins within the feasible range of bin numbers, determine the corresponding cluster center set, which includes a prior cluster center set and augmented cluster centers. For each feasible number of bins, perform cluster analysis on the bin feature vector set based on the corresponding cluster center set, select the optimal clustering result, and obtain the sequence sample set corresponding to each cluster in the optimal clustering result, which is the binning result.
[0054] Step 3 specifically includes:
[0055] Step 3-1: For each feasible number of bins K∈G, select the cluster center set corresponding to that number of bins. in, For the prior cluster centers from the reference library, To expand the cluster centers, the selection of expanded cluster centers involves random selection from the bin feature vector set, ensuring that the distance between any two expanded cluster centers, and between any expanded cluster center and the bin feature vectors of each prior cluster center, is not less than a threshold D. The distance between the bin feature vectors can be calculated using Euclidean distance, cosine similarity, etc., and is not limited here.
[0056] Step 3-2: Select a center-based clustering model, such as the k-means model, with U... K For the cluster center set, the binning feature vector set {F'1,F'2,…,F' n Clustering is performed to obtain the clustering results {c1,c2,…,c} corresponding to each feasible bin number K. K}
[0057] Step 3-3: For The clustering results corresponding to the number of bins in the dataset are compared, and the optimal clustering result is selected, denoted as . Among them, K* The optimal number of boxes.
[0058] The evaluation of clustering results can be carried out using indicators such as silhouette coefficient or CH index. The optimal clustering result can be obtained by comparing the clustering results based on multiple indicators and making a comprehensive evaluation.
[0059] Steps 3-4: For any sequence sample x∈X, let Let x be the binning feature vector corresponding to x, then according to the optimal clustering result... Calculate B j ={x|x∈X and },j=1,2,…,K * This yields the sequence sample set corresponding to each cluster. This is the result of binning.
[0060] Example 2
[0061] Based on the method described in Embodiment 1, this embodiment provides a metagenomic binning system that incorporates prior knowledge from a reference library, wherein the reference library stores standard gene sequences of known species, including:
[0062] The feature extraction module is used to acquire the target sequence dataset, extract features from each sequence sample to obtain its initial distinguishing feature vector, and after feature transformation, obtain the binning feature vector of the sequence.
[0063] The prior knowledge acquisition module is used to compare the target sequence dataset with a reference library to obtain an estimated number of species in the target sequence dataset and a confidence level that each sequence sample belongs to a different species; it generates a feasible interval for the number of bins based on the estimated number of species, within which the number of each feasible bin is greater than or equal to the estimated number of species; and it obtains a prior cluster center set based on the confidence level that each sequence sample belongs to a different species, using the feasible interval for the number of bins and the prior cluster center set as prior knowledge.
[0064] The binning module is used to determine the corresponding cluster center set for each feasible number of bins within the feasible range of bin numbers. The cluster center set includes a prior cluster center set and an amplified cluster center set. For each feasible number of bins, cluster analysis is performed on the bin feature vector set based on the corresponding cluster center set. The optimal clustering result is selected, and the sequence sample set corresponding to each cluster in the optimal clustering result is obtained, which is the binning result.
[0065] Example 3
[0066] The purpose of this embodiment is to provide an electronic device.
[0067] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in Embodiment 1.
[0068] Example 4
[0069] The purpose of this embodiment is to provide a computer-readable storage medium.
[0070] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in Embodiment 1.
[0071] The above embodiments two to four correspond to method embodiment one. For specific implementation details, please refer to the relevant description section of embodiment one. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0072] The above one or more embodiments fully utilize the prior knowledge provided by existing reference libraries and incorporate it into metagenomic binning. Compared with existing technologies, this method solves the problems of existing metagenomic binning being unable to handle unknown species sequences or having insufficient binning accuracy. It can binnify gene sequences of unknown species and has better binning performance than reference library-independent binning methods.
[0073] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0074] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A metagenomic binning method incorporating prior knowledge from a reference library, wherein the reference library stores standard gene sequences of known species, characterized in that, Includes the following steps: Obtain the target sequence dataset, extract features from each sequence sample to obtain its initial discriminative feature vector, and after feature transformation, obtain the binning feature vector of the sequence. The target sequence dataset is compared with a reference database to obtain an estimated number of species in the target sequence dataset and a confidence level that each sequence sample belongs to a different species. Based on the estimated number of species, a feasible interval for the number of bins is generated, within which the number of each feasible bin is greater than or equal to the estimated number of species. Based on the confidence level that each sequence sample belongs to a different species, a priori cluster center set is obtained, and the feasible interval for the number of bins and the priori cluster center set are used as prior knowledge. For each number of bins within the feasible range of bin numbers, a corresponding cluster center set is determined. The cluster center set includes a prior cluster center set and an amplified cluster center set. For each feasible number of bins, cluster analysis is performed on the bin feature vector set based on the corresponding cluster center set. The optimal clustering result is selected, and the sequence sample set corresponding to each cluster in the optimal clustering result is obtained, which is the binning result.
2. The metagenomic binning method combining prior knowledge from a reference library as described in claim 1, characterized in that, The feature transformation is used to obtain a low-dimensional representation of the initial distinguishing feature vector, i.e., the binning feature vector.
3. The metagenomic binning method combining prior knowledge from a reference library as described in claim 2, characterized in that, The feature transformation employs any of the following methods: (1) Deep learning model VAE; (2) Dimensionality reduction model UMAP; (3) First, use deep learning model VAE, and then use dimensionality reduction model UMAP on the obtained latent vectors.
4. The metagenomic binning method combining prior knowledge from a reference library as described in claim 1, characterized in that, Based on the confidence level that each sequence sample belongs to a different species, the prior cluster center set is obtained as follows: For each species, based on the confidence that each sequence sample belongs to that species, multiple benchmark samples of that species are selected, and the binning feature vectors of these benchmark samples are obtained based on the binning feature vector set. The center of these binning feature vectors is the prior cluster center corresponding to that species.
5. The metagenomic binning method combining prior knowledge from a reference library as described in claim 1, characterized in that, The amplified cluster centers are selected randomly from the binning feature vector set, and the distance between any two amplified cluster centers and between each amplified cluster center and each prior cluster center is not less than a set threshold.
6. The metagenomic binning method combining prior knowledge from a reference library as described in claim 1, characterized in that, Based on the silhouette coefficient or CH index, the clustering results corresponding to all feasible bin numbers are compared, and the optimal clustering result is selected.
7. The metagenomic binning method combining prior knowledge from a reference library as described in claim 1, characterized in that, Obtaining the sequence sample set corresponding to each cluster in the optimal clustering result includes: Suppose X is a target sequence dataset. For any sequence sample x∈X, let Let x be the binning feature vector. If the optimal clustering result is... Then calculate Obtain the sequence sample set corresponding to each cluster. This is the result of binning.
8. A metagenomic binning system incorporating prior knowledge from a reference library, wherein the reference library stores standard gene sequences of known species, characterized in that, include: The feature extraction module is used to acquire the target sequence dataset, extract features from each sequence sample to obtain its initial distinguishing feature vector, and after feature transformation, obtain the binning feature vector of the sequence. The prior knowledge acquisition module is used to compare the target sequence dataset with a reference library to obtain an estimated number of species in the target sequence dataset and a confidence level that each sequence sample belongs to a different species; it generates a feasible interval for the number of bins based on the estimated number of species, within which the number of each feasible bin is greater than or equal to the estimated number of species; and it obtains a prior cluster center set based on the confidence level that each sequence sample belongs to a different species, using the feasible interval for the number of bins and the prior cluster center set as prior knowledge. The binning module is used to determine the corresponding cluster center set for each feasible number of bins within the feasible range of bin numbers. The cluster center set includes a prior cluster center set and an amplified cluster center set. For each feasible number of bins, cluster analysis is performed on the bin feature vector set based on the corresponding cluster center set. The optimal clustering result is selected, and the sequence sample set corresponding to each cluster in the optimal clustering result is obtained, which is the binning result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the metagenomic binning method combining prior knowledge of the reference library as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the metagenomic binning method that incorporates prior knowledge of the reference library as described in any one of claims 1-7.