Genome assembly method and system based on iterative k-mer decomposition
By using a method of iterating sequence length from large to small in the genome assembly method, the sequence fragment collection is decomposed and the high-frequency and low-frequency collections are processed respectively, the problems of high computational complexity, low assembly quality and slow assembly speed in the prior art are solved, and more efficient genome assembly is achieved.
Patent Information
- Application Number
- CN202411915277.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing genome assembly methods have problems such as high computational complexity, low assembly quality and slow assembly speed. Especially through the k-mer assembly method of iterating k values from small to large, the calculation complexity is high, the processing speed is slow, and the low-frequency k-mer utilization rate is low.
The genome assembly method based on iterative k-mer decomposition is adopted. By gradually iterating the sequence length from large to small, and decomposing the sequence fragment sets, the high-frequency sets and low-frequency sets are processed separately in each iteration, reducing the computational burden and improving assembly speed and quality.
It effectively reduces the computational burden, improves assembly speed and assembly quality, improves the utilization rate of low-frequency k-mer, prevents the problem of traversing paths of de Bruin graphs, and makes the final output assembly sequence set longer and the assembly effect is better.
Smart Images

Figure CN119360966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a genome assembly method and system based on iterative k-mer decomposition. Background Art
[0002] Genome assembly is one of the core tasks in bioinformatics. Genome assembly refers to the splicing of a large number of short sequence fragments (called sequencing reads) obtained through genome sequencing technology to reconstruct a complete genome sequence. Since sequencing reads only cover part of the genome and may contain repeated sequences and sequencing errors, the assembly process usually requires the use of algorithms and graph structures (such as de Bruijn graphs) to identify overlapping relationships and optimize the splicing order to accurately restore the complete sequence of the original genome.
[0003] In the prior art, conventional genome assembly methods based on k-mer counting have the limitation of fixed k values, which makes it difficult to balance assembly accuracy and the ability to identify low coverage areas. In order to solve the limitation of fixed k values, there are also k-mer assembly methods that iterate k values from small to large, which can improve assembly accuracy compared to conventional assembly methods. However, the k-mer assembly method that iterates k values from small to large has the problems of high computational complexity, slow processing speed, and low utilization of low-frequency k-mers. Summary of the invention
[0004] The genome assembly method and system based on iterative k-mer decomposition provided in the embodiments of the present invention at least solve the problems of high computational complexity, low assembly quality and slow assembly speed of existing genome assembly methods, by gradually iterating the sequence length from large to small and decomposing the sequence fragment set, processing the high-frequency set and the low-frequency set separately in each round of iteration, effectively reducing the computational burden and improving the assembly speed and assembly quality.
[0005] In a first aspect, the present invention provides a genome assembly method based on iterative k-mer decomposition, comprising processing a sequence fragment set according to a sequence length to obtain a frequency set; wherein the first sequence length is the maximum sequence length of the input sequence fragment set; dividing the frequency set according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set; judging the size of a preset length threshold and the sequence length; if the preset length threshold is not greater than the sequence length, taking the low-frequency set as a new sequence fragment set, performing a subtraction operation on the sequence length, and processing the new sequence fragment set according to the sequence length obtained by the subtraction operation to obtain a new high-frequency set and a low-frequency set corresponding to the new sequence fragment set; if the preset length threshold is greater than the sequence length, constructing a de Bruijn graph based on the obtained multiple high-frequency sets, and outputting an assembled sequence set according to the de Bruijn graph.
[0006] In one embodiment of the present invention, a sequence fragment set is processed according to the sequence length to obtain a frequency set, including: extracting each sequence fragment in the sequence fragment set according to the sequence length to obtain a continuous nucleotide sequence and the number of continuous nucleotide sequences corresponding to each sequence fragment; and establishing a mapping relationship between the continuous nucleotide sequence and the number of continuous nucleotide sequences to obtain the frequency set.
[0007] In one embodiment of the present invention, the frequency set is divided according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set, including: comparing the preset frequency threshold and the number of each continuous nucleotide sequence in the frequency set; if the preset frequency threshold is less than the number of continuous nucleotide sequences, confirming that the corresponding continuous nucleotide sequence belongs to the high-frequency set; if the preset frequency threshold is not less than the number of continuous nucleotide sequences, confirming that the corresponding continuous nucleotide sequence belongs to the low-frequency set.
[0008] In one embodiment of the present invention, a de Bruijn graph is constructed based on the obtained multiple high-frequency sets, including: selecting an unprocessed high-frequency set from the multiple high-frequency sets as a set to be repaired; obtaining the current sequence length corresponding to the set to be repaired; judging the size of the current sequence length and the maximum sequence length; if the current sequence length is equal to the maximum sequence length, confirming that the current set to be repaired is an initial repair set, and switching to selecting an unprocessed high-frequency set from the multiple high-frequency sets as a set to be repaired; if the current sequence length is less than the maximum sequence length, processing the current set to be repaired to obtain a repair set, and switching to selecting an unprocessed high-frequency set from the multiple high-frequency sets as a set to be repaired; wherein the sequence length of the repair set is equal to the maximum sequence length; merging the initial repair set and the repair set to obtain a repaired high-frequency set; and constructing the de Bruijn graph based on the repaired high-frequency set.
[0009] In one embodiment of the present invention, the current set to be repaired is processed to obtain a repair set, including: obtaining a mapping relationship between each continuous nucleotide sequence and the number of continuous nucleotide sequences in the set to be repaired; processing the continuous nucleotide sequences according to the mapping relationship to obtain restored sequence fragments; and extracting each restored sequence fragment according to the maximum sequence length to obtain the repair set.
[0010] In one embodiment of the present invention, outputting an assembly sequence set according to the de Bruijn graph includes: optimizing the de Bruijn graph to obtain an optimized de Bruijn graph; and traversing the optimized de Bruijn graph to output the assembly sequence set.
[0011] In one embodiment of the present invention, the optimization operation includes at least one of merging repeated paths, merging bubble structures, and removing small branches.
[0012] In a second aspect, the present invention also provides a genome assembly system based on iterative k-mer decomposition, comprising a processing module, a partitioning module, an iterative decomposition module, and an assembly module; the processing module is used to process a sequence fragment set according to a sequence length to obtain a frequency set; wherein the first sequence length is the maximum sequence length of the input sequence fragment set; the partitioning module is used to partition the frequency set according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set; the iterative decomposition module is used to determine the size of a preset length threshold and the sequence length; wherein, when the preset length threshold is not greater than the sequence length, the iterative decomposition module uses the low-frequency set as a new sequence fragment set, performs a subtraction operation on the sequence length, and transmits the new sequence fragment set and the sequence length obtained according to the subtraction operation to the processing module; when the preset length threshold is greater than the sequence length, the iterative decomposition module transmits the obtained multiple high-frequency sets to the assembly module; the assembly module is used to construct a de Bruijn graph based on the obtained multiple high-frequency sets, and output an assembled sequence set based on the de Bruijn graph.
[0013] In a third aspect, the present invention also provides an electronic device, comprising: a processor, and a memory for storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes a genome assembly method based on iterative k-mer decomposition as described in any one of the above.
[0014] In a fourth aspect, the present invention further provides a non-transitory machine-readable medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute a genome assembly method based on iterative k-mer decomposition as described in any one of the above.
[0015] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0016] The genome assembly method and system based on iterative k-mer decomposition of the present invention gradually reduce the sequence length from large to small starting from the maximum sequence length of the input sequence fragment set, and use the corresponding sequence length to process the sequence fragment set to obtain a frequency set and a corresponding high-frequency set and low-frequency set. Through the large-to-small processing method, the calculation speed can be accelerated while gradually reducing the size of the data set, so as to achieve efficient assembly of large-scale genome data and effectively improve the assembly speed.
[0017] Subsequently, the high-frequency set is used as a reliable set, which is retained and used for the subsequent construction of the De Bruijn graph and assembly sequence; while the low-frequency set is used as an unreliable set for the next round of iterative processing. First, since only the unreliable set is decomposed in each iteration, the amount of data in each round can be significantly reduced, thereby improving the computational efficiency and reducing the computational burden by reducing the data scale. Secondly, since the low-frequency set will not be directly discarded as in the prior art method, but will be used for the next round of iterative processing and splitting, the low-frequency set that was originally easily overlooked can be retained and utilized, which not only improves the data utilization rate, but also further improves the final assembly quality. Finally, the De Bruijn graph can be constructed based on the obtained multiple high-frequency sets, effectively preventing the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 It is a flowchart of a genome assembly method based on iterative k-mer decomposition in a preferred embodiment of the present invention.
[0020] Figure 2 It is a schematic diagram of the structure of a genome assembly system based on iterative k-mer decomposition in a preferred embodiment of the present invention.
[0021] The above drawings include the following reference numerals:
[0022] 10. Processing module; 20. Partitioning module; 30. Iterative decomposition module; 40. Assembly module. DETAILED DESCRIPTION
[0023] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0024] It should be noted that in the prior art, the genome assembly method based on k-mer counting has the advantages of efficiently processing large-scale data, accurately identifying repetitive regions, and optimizing the use of memory and computing resources. It reduces sequencing noise through frequency screening and can flexibly adjust the k value to adapt to genomes of different complexities, making the assembly faster and more accurate, and is particularly suitable for the rapid assembly of large-scale genomes. Therefore, the genome assembly method based on k-mer has gradually become mainstream.
[0025] Among them, k-mer refers to a continuous nucleotide sequence of length k. By extracting a fixed-length k-mer in each sequence fragment (read), the complex genome assembly problem can be transformed into a k-mer graph structure splicing problem. The current k-mer-based assembly method mainly relies on constructing a de Bruijn graph, which can effectively process and represent redundant information in large-scale k-mer sets, thereby improving assembly efficiency.
[0026] Specifically, in the genome assembly process based on k-mer counting, first, all k-mer sets of length k are extracted from the sequencing data, and then each k-mer is regarded as a node in the graph by constructing a De Bruijn graph. Adjacent k-mers share an overlapping region of length k-1 and are connected by edges in the graph. In this way, the genome assembly problem can be converted into a graph path traversal problem, thereby identifying the completeness of the sequence. The De Bruijn graph has significant advantages in processing large-scale data and can effectively integrate repetitive sequences while reducing storage space.
[0027] However, the construction and traversal efficiency of the De Bruijn graph are affected by the size of the k value. In traditional assembly methods based on fixed k values, choosing an appropriate k value is crucial. K-mers with larger k values can more effectively identify and splice long repeat regions, reduce the occurrence of incorrect connections, and thus improve assembly accuracy, but have poor recognition capabilities for low coverage regions, which can easily lead to breakage. K-mers with smaller k values can more comprehensively capture short overlapping regions and are suitable for splicing low coverage regions, but are prone to generating redundant paths and incorrect splicing, resulting in decreased assembly accuracy. Therefore, the selection of a fixed k value is a difficult technical problem that is difficult to balance.
[0028] In order to solve the limitations of the fixed k value method, there is a k-mer assembly method in the prior art that performs genome assembly by iterating the k value from small to large. That is, the k value is gradually increased to construct a de Bruijn graph from small to large. This method first uses a smaller k value to extract k-mer and construct a preliminary contig (i.e., a spliced continuous gene sequence fragment) to capture short repetitive regions in the sequence. Subsequently, the k value is gradually increased to eliminate redundant paths and identify longer overlapping regions. Finally, the k-mer with a larger k value is used to splice the long repetitive regions in the genome to generate a more complete genome structure. This method improves the accuracy of genome assembly to a certain extent by re-extracting and splicing k-mers at different k values.
[0029] However, the k-mer assembly method by iterating k values from small to large also has significant defects. First, its computational complexity is high. The k-mer assembly method by iterating k values from small to large needs to first independently perform k-mer counting and de Bruijn graph construction under smaller k values. Since small k values will generate more k-mers, the calculation process will be more complicated. Secondly, its processing speed is slow. Every time the k value is changed, it is necessary to regenerate the k-mer set with different k values and construct the corresponding de Bruijn graph, that is, the de Bruijn graph needs to be rebuilt and traversed during the iteration process of different k values, resulting in a slow processing speed. Finally, its low-frequency k-mer utilization rate is low. In the k-mer assembly method by iterating k values from small to large, low-frequency k-mers under different k values are usually ignored or discarded. However, low-frequency k-mers may account for a large proportion in real data sets. Directly discarding them will cause some genomic information to be lost, reducing the assembly quality.
[0030] In order to solve the shortcomings of the k-mer assembly method in the prior art in terms of computational overhead, processing speed and data utilization by iterating k values from small to large, Figure 1 As shown, the present invention provides a genome assembly method based on iterative k-mer decomposition, comprising:
[0031] The sequence fragment set is processed according to the sequence length (i.e. k) to obtain the frequency set.
[0032] According to the preset frequency threshold, the frequency set is divided into a high-frequency set and a low-frequency set.
[0033] Determine the size of the preset length threshold and the sequence length.
[0034] If the preset length threshold is not greater than the sequence length, the low-frequency set is taken as a new sequence fragment set, and a subtraction operation is performed on the sequence length. According to the sequence length obtained by the subtraction operation, the new sequence fragment set is processed to obtain a new high-frequency set and a low-frequency set corresponding to the new sequence fragment set.
[0035] If the preset length threshold is greater than the sequence length, a de Bruijn graph is constructed based on the obtained multiple high-frequency sets, and the assembled sequence set (i.e., assembled contig set) is output based on the de Bruijn graph.
[0036] It should be noted that the sequence fragment set includes multiple sequence fragments (i.e., multiple reads). Each sequence fragment (i.e., read) represents a string of genomic sequences, and its length is about 50 to 300 bp. After obtaining the sequence fragment set, the total number of corresponding sequence fragments, the maximum sequence length (i.e., k max ) and the minimum sequence length (i.e., k min ) are all known quantities.
[0037] When processing a sequence fragment set according to the sequence length, the first sequence length is the maximum sequence length, and the subsequent sequence lengths are gradually reduced. Each frequency set includes a sequence fragment, a sequence length, and corresponding continuous nucleotide sequences and the number of continuous nucleotide sequences. Exemplarily, after obtaining a new frequency set, it is stored in a data structure, such as a hash table. This large-to-small processing method can speed up the calculation speed while gradually reducing the size of the data set, and realize efficient assembly of large-scale genomic data, so as to effectively improve the assembly speed.
[0038] It should be noted that the preset frequency threshold is a preset value, which can be set as needed by those skilled in the art. Exemplarily, the preset frequency threshold is set to 1, and the continuous nucleotide sequences with a number of continuous nucleotide sequences greater than 1 in the frequency set belong to the high-frequency set, and vice versa. The high-frequency set is a reliable set that can be retained and used for subsequent construction of the de Bruijn graph and assembly sequence. The low-frequency set is an unreliable set and is used for the next round of iterative processing.
[0039] Specifically, after determining the size of the preset length threshold and the current sequence length, if the preset length threshold is not greater than the current sequence length, the low-frequency set is used as a new sequence fragment set. Preferably, the preset length threshold is set to the minimum sequence length. At the same time, a decrement operation is performed on the sequence length. Among them, those skilled in the art can set the decrement value according to actual needs. Subsequently, a new sequence length is obtained according to the decrement operation, and a new sequence fragment set (i.e., the old low-frequency set obtained in the previous round) is processed to obtain a new frequency set. Next, the new frequency set is divided according to the preset frequency threshold to obtain a new high-frequency set and a low-frequency set corresponding to the new sequence fragment set. Similarly, after obtaining the new high-frequency set and low-frequency set, the high-frequency set is retained as a reliable set; and the low-frequency set is used as an unreliable set for the next round of iterative processing.
[0040] By processing high-frequency sets and low-frequency sets separately, firstly, since only unreliable sets are decomposed in each iteration, the amount of data in each round can be significantly reduced, thereby improving computing efficiency and reducing computing burden by reducing data scale. Secondly, since low-frequency sets are not directly discarded as in the prior art methods, but are used for the next round of iterative processing and splitting, the low-frequency sets that were originally easily overlooked can be retained and utilized, which not only improves data utilization, but also further improves the final assembly quality. Finally, the De Bruijn graph can be constructed based on the multiple high-frequency sets obtained, effectively preventing the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better.
[0041] After the iteration reaches a preset length threshold greater than the sequence length, the sequence fragments of the low-frequency set can no longer be extracted. At this time, a de Bruijn graph can be constructed based on the obtained multiple high-frequency sets, and the assembled sequence set can be output based on the de Bruijn graph.
[0042] The genome assembly method based on iterative k-mer decomposition of the present invention gradually reduces the sequence length from large to small starting from the maximum sequence length of the input sequence fragment set, and uses the corresponding sequence length to process the sequence fragment set to obtain a frequency set and a corresponding high-frequency set and low-frequency set. Through the large-to-small processing method, the calculation speed can be accelerated while gradually reducing the size of the data set, thereby realizing efficient assembly of large-scale genome data and effectively improving the assembly speed.
[0043] Subsequently, the high-frequency set is used as a reliable set, which is retained and used for the subsequent construction of the De Bruijn graph and assembly sequence; while the low-frequency set is used as an unreliable set for the next round of iterative processing. First, since only the unreliable set is decomposed in each iteration, the amount of data in each round can be significantly reduced, thereby improving the computational efficiency and reducing the computational burden by reducing the data scale. Secondly, since the low-frequency set will not be directly discarded as in the prior art method, but will be used for the next round of iterative processing and splitting, the low-frequency set that was originally easily overlooked can be retained and utilized, which not only improves the data utilization rate, but also further improves the final assembly quality. Finally, the De Bruijn graph can be constructed based on the obtained multiple high-frequency sets, effectively preventing the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better.
[0044] The genome assembly method based on iterative k-mer decomposition of the present invention, in some embodiments, processes a set of sequence fragments according to sequence length to obtain a frequency set, including:
[0045] According to the sequence length, each sequence fragment in the sequence fragment set is extracted to obtain the continuous nucleotide sequence and the number of continuous nucleotide sequences corresponding to each sequence fragment.
[0046] A mapping relationship between continuous nucleotide sequences and the number of continuous nucleotide sequences is established to obtain a frequency set.
[0047] It should be noted that the sequence length of the continuous nucleotide sequence obtained by extraction is the sequence length used in the current extraction. Exemplarily, the current sequence length is 47, and the sequence length of each continuous nucleotide sequence obtained after the corresponding sequence fragment is extracted is also 47. The number of continuous nucleotide sequences is the number of continuous nucleotide sequences that can be extracted after the corresponding sequence fragment is extracted. How to extract sequence fragments according to sequence length belongs to the prior art and will not be repeated here.
[0048] Although the length of the sequence used for extraction is the same, the sequence fragments in the current sequence fragment set are different, so the continuous nucleotide sequence and the number of continuous nucleotide sequences that can be extracted will be different. Therefore, after each sequence fragment in the current sequence fragment set is extracted, statistics need to be performed. According to the statistical results, a mapping relationship between the continuous nucleotide sequence and the number of continuous nucleotide sequences is established to obtain a frequency set. Then, the frequency set can be divided according to the preset frequency threshold.
[0049] It is conceivable that since the sequence length is iteratively reduced from large to small starting from the maximum sequence length, it is possible to speed up the calculation while gradually reducing the size of the data set, thereby achieving efficient assembly of large-scale genomic data and effectively improving the assembly speed.
[0050] The genome assembly method based on iterative k-mer decomposition of the present invention, in some embodiments, divides the frequency set according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set, including:
[0051] Compare the preset frequency threshold and the number of each continuous nucleotide sequence in the frequency set.
[0052] If the preset frequency threshold is less than the number of continuous nucleotide sequences, the corresponding continuous nucleotide sequences are confirmed to belong to the high-frequency set. If the preset frequency threshold is not less than the number of continuous nucleotide sequences, the corresponding continuous nucleotide sequences are confirmed to belong to the low-frequency set.
[0053] It should be noted that the preset frequency threshold is a preset value, which can be set as needed by those skilled in the art. Exemplarily, the preset frequency threshold is set to 1, and the continuous nucleotide sequences with a number of continuous nucleotide sequences greater than 1 in the frequency set belong to the high-frequency set, and vice versa. The high-frequency set is a reliable set that can be retained and used for subsequent construction of the de Bruijn graph and assembly sequence. The low-frequency set is an unreliable set and is used for the next round of iterative processing.
[0054] The genome assembly method based on iterative k-mer decomposition of the present invention, in some embodiments, constructs a de Bruijn graph according to the obtained multiple high-frequency sets, including:
[0055] From multiple high-frequency sets, an unprocessed high-frequency set is selected as a set to be repaired.
[0056] Get the current sequence length corresponding to the collection to be repaired.
[0057] Determine the size of the current sequence length and the maximum sequence length.
[0058] If the current sequence length is equal to the maximum sequence length, the current set to be repaired is confirmed to be the initial repair set, and an unprocessed high-frequency set is selected from multiple high-frequency sets as the set to be repaired for corresponding processing.
[0059] If the current sequence length is less than the maximum sequence length, the current set to be repaired is processed to obtain a repair set, and then an unprocessed high-frequency set is selected from multiple high-frequency sets as the set to be repaired, wherein the sequence length of the repair set is equal to the maximum sequence length.
[0060] The initial patch set and the patch set are merged to obtain a patch high frequency set.
[0061] Construct a de Bruijn graph from the patched high frequency set.
[0062] It can be imagined that when assembling, since the sequence length is iterated from the maximum sequence length from large to small, after dividing the frequency set according to the preset frequency threshold, it can be concluded that the current high-frequency set is the initial repair set or the repair set to be processed. Each processed repair set is merged with the initial repair set, and this step can be regarded as a repair process. Using the merged repair high-frequency set to construct the De Bruijn graph can effectively prevent the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better.
[0063] Furthermore, in some embodiments of the genome assembly method based on iterative k-mer decomposition of the present invention, processing the current set to be repaired to obtain the repaired set includes:
[0064] Obtain a mapping relationship between each continuous nucleotide sequence and the number of continuous nucleotide sequences in the set to be repaired.
[0065] The continuous nucleotide sequence is processed according to the mapping relationship to obtain the restored sequence fragments.
[0066] According to the maximum sequence length, each restored sequence fragment is extracted to obtain a patch set.
[0067] It should be noted that the mapping relationship between each continuous nucleotide sequence and the number of continuous nucleotide sequences is a known quantity, which can be obtained by extracting sequence fragments according to the sequence length. How to process continuous nucleotide sequences to obtain restored sequence fragments belongs to the prior art and will not be repeated here. Through this step, the sequence lengths of the repair set and the initial repair set can be equal, so that the two sets can be merged to obtain a repaired high-frequency set. Using the merged repaired high-frequency set to construct a De Bruijn graph can effectively prevent the problem of broken traversal paths in constructing the De Bruijn graph, so that the final output assembly sequence set is longer and the assembly effect is better.
[0068] The genome assembly method based on iterative k-mer decomposition of the present invention, in some embodiments, outputs an assembled sequence set according to a de Bruijn graph, including:
[0069] The De Bruijn graph is optimized to obtain an optimized De Bruijn graph.
[0070] The optimized De Bruijn graph is traversed and the assembled sequence set is output.
[0071] Exemplarily, the optimization operation includes at least one of merging repeated paths, merging bubble structures, and removing small branches. By performing the optimization operation on the De Bruijn graph, the size of the graph can be effectively reduced, and the computing and storage efficiency can be improved. After the optimized De Bruijn graph is traversed, the assembly result, i.e., the assembly sequence set, can be output.
[0072] The effect verification is carried out below. Specifically, partial genome sequencing data of Escherichia coli and the corresponding reference genome are downloaded from the public database NCBI, the genome sequencing data is used as the input sequence fragment set, and the corresponding reference genome is used as the control. The maximum sequence length is set to 47, the minimum sequence length is set to 27, the change in sequence length after each iteration is 5, and the preset length threshold is set to 1. The input sequence fragment set is processed according to the genome assembly method based on iterative k-mer decomposition described in the present invention, and the k-mer assembly method of iterative k value from small to large in the prior art. After the assembly is completed, the results and the reference genome of the control are submitted to the assembly effect evaluation tool "QUAST" for verification and evaluation.
[0073] Among them, the k-mer assembly method of the prior art that iterates k values from small to large has 721.94bp matching errors per 100,000bp. However, the genome assembly method based on iterative k-mer decomposition described in the present invention has 688.63bp matching errors per 100,000bp, and the calculation process is simpler and the technical processing speed is faster.
[0074] An embodiment of the present invention further provides a genome assembly system based on iterative k-mer decomposition, including a processing module 10 , a partitioning module 20 , an iterative decomposition module 30 and an assembly module 40 .
[0075] The processing module 10 is used to process the sequence segment set according to the sequence length to obtain a frequency set.
[0076] The division module 20 is used to divide the frequency set according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set.
[0077] The iterative decomposition module 30 is used to determine the size of the preset length threshold and the sequence length. When the preset length threshold is not greater than the sequence length, the iterative decomposition module 30 uses the low-frequency set as a new sequence segment set, performs a subtraction operation on the sequence length, and transmits the new sequence segment set and the sequence length obtained according to the subtraction operation to the processing module 10. When the preset length threshold is greater than the sequence length, the iterative decomposition module 30 transmits the obtained multiple high-frequency sets to the assembly module 40.
[0078] The assembly module 40 is used to construct a de Bruijn graph according to the obtained multiple high-frequency sets, and output an assembly sequence set according to the de Bruijn graph.
[0079] It should be noted that the sequence fragment set includes multiple sequence fragments (i.e., multiple reads). Each sequence fragment (i.e., read) represents a string of genomic sequences, and its length is about 50 to 300 bp. After obtaining the sequence fragment set, the total number of corresponding sequence fragments, the maximum sequence length (i.e., k max ) and the minimum sequence length (i.e., k min ) are all known quantities.
[0080] When the processing module 10 processes the sequence fragment set according to the sequence length, the first sequence length is the maximum sequence length, and the subsequent sequence lengths are gradually reduced. Each frequency set includes sequence fragments, sequence lengths, and corresponding continuous nucleotide sequences and continuous nucleotide sequence number information. Exemplarily, after obtaining a new frequency set, it is stored in a data structure, such as a hash table. This large-to-small processing method can speed up the calculation speed while gradually reducing the size of the data set, and realize efficient assembly of large-scale genomic data to effectively improve the assembly speed.
[0081] It should be noted that the preset frequency threshold is a preset value, which can be set as needed by those skilled in the art. Exemplarily, the preset frequency threshold is set to 1, and the continuous nucleotide sequences with a number of continuous nucleotide sequences greater than 1 in the frequency set belong to the high-frequency set, and vice versa. The high-frequency set is a reliable set that can be retained and used for subsequent construction of the de Bruijn graph and assembly sequence. The low-frequency set is an unreliable set and is used for the next round of iterative processing.
[0082] Specifically, after the iterative decomposition module 30 determines the size of the preset length threshold and the current sequence length, if the preset length threshold is not greater than the current sequence length, the low-frequency set is used as the new sequence fragment set. Preferably, the preset length threshold is set to the minimum sequence length. At the same time, the sequence length is decremented. Among them, those skilled in the art can set the decrement value according to actual needs. Subsequently, the iterative decomposition module 30 transmits the new sequence length and the new sequence fragment set to the processing module 10 for corresponding processing and obtaining a new frequency set. Then, the new frequency set is divided by the division module 20 to obtain a new high-frequency set and a low-frequency set corresponding to the new sequence fragment set. Similarly, after obtaining the new high-frequency set and low-frequency set, the high-frequency set is retained as a reliable set; and the low-frequency set is used as an unreliable set for the next round of iterative processing.
[0083] By processing high-frequency sets and low-frequency sets separately, firstly, since only unreliable sets are decomposed in each iteration, the amount of data in each round can be significantly reduced, thereby improving computing efficiency and reducing computing burden by reducing data scale. Secondly, since low-frequency sets are not directly discarded as in the prior art methods, but are used for the next round of iterative processing and splitting, the low-frequency sets that were originally easily overlooked can be retained and utilized, which not only improves data utilization, but also further improves the final assembly quality. Finally, the De Bruijn graph can be constructed based on the multiple high-frequency sets obtained, effectively preventing the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better.
[0084] After iterating until the preset length threshold is greater than the sequence length, the sequence fragments of the low-frequency set can no longer be extracted. At this time, the obtained high-frequency sets can be transmitted to the assembly module 40, and the assembly module 40 constructs a de Bruijn graph based on the obtained multiple high-frequency sets, and outputs the assembled sequence set based on the de Bruijn graph.
[0085] The genome assembly system based on iterative k-mer decomposition of the present invention gradually reduces the sequence length from large to small starting from the maximum sequence length of the input sequence fragment set, and uses the corresponding sequence length to process the sequence fragment set to obtain a frequency set and a corresponding high-frequency set and low-frequency set. Through the large-to-small processing method, the calculation speed can be accelerated while gradually reducing the size of the data set, thereby realizing efficient assembly of large-scale genome data and effectively improving the assembly speed.
[0086] Subsequently, the high-frequency set is used as a reliable set, which is retained and used for the subsequent construction of the De Bruijn graph and assembly sequence; while the low-frequency set is used as an unreliable set for the next round of iterative processing. First, since only the unreliable set is decomposed in each iteration, the amount of data in each round can be significantly reduced, thereby improving the computational efficiency and reducing the computational burden by reducing the data scale. Secondly, since the low-frequency set will not be directly discarded as in the prior art method, but will be used for the next round of iterative processing and splitting, the low-frequency set that was originally easily overlooked can be retained and utilized, which not only improves the data utilization rate, but also further improves the final assembly quality. Finally, the De Bruijn graph can be constructed based on the obtained multiple high-frequency sets, effectively preventing the problem of broken traversal paths in constructing the De Bruijn graph, making the final output assembly sequence set longer and the assembly effect better.
[0087] The present invention also provides an electronic device, including a processor and a memory storing a program. The program includes instructions, and when the instructions are executed by the processor, the processor executes the genome assembly method based on iterative k-mer decomposition described in any one of the above embodiments.
[0088] The present invention also provides a non-transitory machine-readable medium storing a computer program, wherein the computer instructions are used to enable a computer to execute the genome assembly method based on iterative k-mer decomposition described in any one of the above embodiments.
[0089] It should be noted that electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0090] The computer programs for implementing the methods of the embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0091] In the context of an embodiment of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0092] It should be noted that the term "including" and its variations used in the embodiments of the present invention are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present invention are illustrative and not restrictive. Those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more".
[0093] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0094] The various steps described in the method implementation methods provided by the embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.
[0095] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments refer to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.
[0096] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the attached claims.
Claims
1. A genome assembly method based on iterative k-mer decomposition, characterized in that: include: Processing the sequence fragment set according to the sequence length to obtain a frequency set; wherein, the method includes extracting each sequence fragment in the sequence fragment set according to the sequence length to obtain a continuous nucleotide sequence and the number of continuous nucleotide sequences corresponding to each sequence fragment; establishing a mapping relationship between the continuous nucleotide sequence and the number of continuous nucleotide sequences to obtain the frequency set; the first sequence length is the maximum sequence length of the input sequence fragment set; According to a preset frequency threshold, the frequency set is divided into a high-frequency set and a low-frequency set; Determine the size of a preset length threshold and the length of the sequence; If the preset length threshold is not greater than the sequence length, taking the low-frequency set as the new sequence fragment set, performing a decrement operation on the sequence length, and processing the new sequence fragment set according to the sequence length obtained by the decrement operation to obtain a new high-frequency set and a low-frequency set corresponding to the new sequence fragment set; If the preset length threshold is greater than the sequence length, a de Bruijn graph is constructed according to the obtained multiple high-frequency sets, and an assembled sequence set is output according to the de Bruijn graph.
2. The genome assembly method based on iterative k-mer decomposition according to claim 1, characterized in that: According to a preset frequency threshold, the frequency set is divided to obtain a high-frequency set and a low-frequency set, including: Comparing the preset frequency threshold and the number of each continuous nucleotide sequence in the frequency set; If the preset frequency threshold is less than the number of the continuous nucleotide sequences, then confirming that the corresponding continuous nucleotide sequence belongs to the high frequency set; If the preset frequency threshold is not less than the number of the continuous nucleotide sequences, it is confirmed that the corresponding continuous nucleotide sequences belong to the low-frequency set.
3. The genome assembly method based on iterative k-mer decomposition according to claim 1, characterized in that: Constructing a de Bruijn graph according to the obtained multiple high frequency sets, including: Selecting an unprocessed high frequency set from the plurality of high frequency sets as a set to be repaired; Obtaining the current sequence length corresponding to the set to be repaired; Determine the size of the current sequence length and the maximum sequence length; If the current sequence length is equal to the maximum sequence length, confirming that the current set to be repaired is an initial repair set, and switching to selecting an unprocessed high frequency set from the plurality of high frequency sets as the set to be repaired; If the current sequence length is less than the maximum sequence length, the current set to be repaired is processed to obtain a repair set, and then an unprocessed high frequency set is selected from the multiple high frequency sets as the set to be repaired; wherein the sequence length of the repair set is equal to the maximum sequence length; Merging the initial patch set and the patch set to obtain a patch high-frequency set; The de Bruijn graph is constructed based on the patched high frequency set.
4. The genome assembly method based on iterative k-mer decomposition according to claim 3, characterized in that: Processing the current set to be repaired to obtain a repair set includes: Obtaining a mapping relationship between each continuous nucleotide sequence and the number of continuous nucleotide sequences in the to-be-repaired set; Processing the continuous nucleotide sequence according to the mapping relationship to obtain a restored sequence fragment; According to the maximum sequence length, each of the restored sequence fragments is extracted to obtain the repair set.
5. The genome assembly method based on iterative k-mer decomposition according to claim 1, characterized in that: Outputting an assembled sequence set according to the de Bruijn graph includes: Optimizing the de Bruijn graph to obtain an optimized de Bruijn graph; The optimized De Bruijn graph is traversed to output the assembly sequence set.
6. The genome assembly method based on iterative k-mer decomposition according to claim 5, characterized in that: The optimization operation includes at least one of merging repeated paths, merging bubble structures, and removing small branches.
7. A genome assembly system based on iterative k-mer decomposition, characterized in that: include: Processing module, partitioning module, iterative decomposition module, assembly module; The processing module is used to process the sequence fragment set according to the sequence length to obtain a frequency set; wherein, it includes extracting each sequence fragment in the sequence fragment set according to the sequence length to obtain a continuous nucleotide sequence and the number of continuous nucleotide sequences corresponding to each sequence fragment; establishing a mapping relationship between the continuous nucleotide sequence and the number of continuous nucleotide sequences to obtain the frequency set; the first sequence length is the maximum sequence length of the input sequence fragment set; The division module is used to divide the frequency set according to a preset frequency threshold to obtain a high-frequency set and a low-frequency set; The iterative decomposition module is used to determine the size of a preset length threshold and the sequence length; wherein, when the preset length threshold is not greater than the sequence length, the iterative decomposition module uses the low-frequency set as a new set of sequence fragments, performs a subtraction operation on the sequence length, and transmits the new set of sequence fragments and the sequence length obtained according to the subtraction operation to the processing module; when the preset length threshold is greater than the sequence length, the iterative decomposition module transmits the obtained multiple high-frequency sets to the assembly module; The assembly module is used to construct a de Bruijn graph according to the obtained multiple high-frequency sets, and output an assembly sequence set according to the de Bruijn graph.
8. An electronic device comprising: A processor, and a memory storing a program, characterized in that the program includes instructions, which, when executed by the processor, cause the processor to perform the genome assembly method based on iterative k-mer decomposition according to any one of claims 1 to 6.
9. A non-transitory machine-readable medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the genome assembly method based on iterative k-mer decomposition according to any one of claims 1 to 6.
Citation Information
Patent Citations
Processes and systems for nucleic acid sequence assembly
CN106575322A
Short sequence error correction method and device for second-generation sequence
CN108614954A