Differential-based vectorized parallel sequence-to-graph alignment method, apparatus, and device
By optimizing the sequence-to-graph alignment algorithm using the recursive relationship of the difference matrix, the problem of reduced vectorized parallelism in long read sequences is solved, achieving more efficient parallel computing and improving the performance of sequence-to-graph alignment.
Patent Information
- Application Number
- CN202511092684.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-08-05
Smart Images

Figure CN120600115B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sequence alignment, and relates to a vectorized parallel sequence-to-graph alignment method, apparatus and device based on difference. Background Art
[0002] Sequence alignment is a fundamental and crucial step in high-throughput sequence data analysis. Sequencing reads are aligned to a reference genome to determine their position and alignment within the reference genome, serving as the basis for downstream functional analysis. However, due to genomic variability between individuals, using a single linear reference genome as the basis for sequence alignment can, in some cases, lead to reference bias. If a sequence fragment contains a sequence not present in the linear reference genome, this sequence may be misaligned or fail to align, compromising the accuracy of downstream data analysis.
[0003] To address this issue, the industry has proposed a pan-genome-based solution. This compares multiple representative individual genomes, merging identical sections into a common path and diverging sections into branches. Ultimately, a graph-structured genome, or pan-genome graph, is formed, serving as the basis for sequencing read alignment. Using the pan-genome as a reference shifts the alignment of sequencing reads from a linear genome to a genome graph, shifting the alignment from linear sequence-to-sequence to sequence-to-graph alignment. Therefore, studying sequence-to-graph alignment is crucial for genome-wide correlation analysis.
[0004] Sequence-to-graph alignment compares the sequence of the read segments obtained by sequencing with the reference genome graph to obtain the position and alignment of the read segments in the reference genome graph, which serves as the basis for subsequent analysis.
[0005] Sequence-to-graph alignment can be considered a more complex variant of sequence alignment. Sequence alignment algorithms are represented by the classic Needle-Wunsch algorithm and Smith-Waterman algorithm. They are both based on the idea of dynamic programming and construct a scoring matrix where each cell corresponds to a base pair from the read segment and the reference sequence. Each base pair alignment includes matches, mismatches, insertions, and deletions, all of which correspond to different penalties. The score of the current cell is calculated based on the penalty and the score of the previous cell. The time complexity of the algorithm is ,in nThe reference genome for sequence-to-graph alignment has been transformed from a sequence into a graph structure, where node dependencies are more complex. The computation of each cell requires a variable number of previous cells, and all dependent nodes in the reference graph must be considered, resulting in a higher computational complexity than sequence alignment. When the sequence length and reference graph size reach hundreds of thousands, and the number of sequence-to-graph alignment tasks increases, a significant amount of computational time is required. Therefore, it is necessary to design more appropriate algorithms and utilize parallel computing methods such as vectorization to achieve a highly parallel sequence-to-graph alignment algorithm as much as possible, thereby accelerating the alignment process.
[0006] Most existing algorithms are based on variations of the Smith-Waterman algorithm for sequence alignment to derive a recursive formula for sequence-to-graph alignment. These algorithms sequentially evaluate the cells in the scoring matrix, with each cell calculating its own score based on the scores of all its dependent cells. Vectorized instructions can be used to simultaneously calculate the scores of multiple cells, thereby achieving parallel acceleration. Vector instructions can be divided into multiple channels, each processing a single piece of data with the same bit size and performing the same operation. While the total number of bits in a vector instruction remains constant, the wider the number of bits required per channel (i.e., per piece of data), the fewer channels are needed, the fewer operations can be performed simultaneously, and the lower the degree of vectorized parallelism. For example, with a 256-bit vector width, if each channel processes a 64-bit piece of data, four pieces of data can be processed simultaneously; if each channel processes a 32-bit piece of data, eight pieces of data can be processed simultaneously. In existing alignment algorithms, one channel of a vectorized instruction is typically responsible for calculating the score of one cell.
[0007] Jain et al. proposed a sequence-to-graph alignment algorithm in their paper Accelerating Sequence Alignment to Graphs. The algorithm obtains accurate alignment results by calculating the complete scoring matrix and achieves good acceleration through vectorization and parallelization. The algorithm calculates all cells in all scoring matrices in sequence according to the following recursive formula: Represents the scoring matrix Rank The elements of the column, and represent the penalties for match / mismatch / insertion / deletion respectively;
[0008] ;
[0009] This algorithm uses vectorized parallelism. Each vector operation can simultaneously compute cells at the same position in different matrices. This allows for the simultaneous calculation of multiple scoring matrices, effectively processing multiple sequence-to-graph alignment tasks. However, as the length of the reads to be aligned increases, the corresponding alignment scores in the scoring matrices also increase. This increases the number of bits required for each vectorization channel, reducing the degree of vectorization parallelism and degrading alignment performance.
[0010] Each channel of the vectorized instruction is responsible for calculating the score of a cell, so the number of bits in the channel needs to be able to store the maximum possible value of the score. The maximum possible value of the score = sequence length Matching score, the matching score is usually a constant, so when the sequence length becomes longer and longer, more bits are needed to store the score, and the vectorized instruction has more bits per channel. As the number of channels decreases, the number of cells calculated at the same time decreases, and the degree of parallelism decreases.
[0011] When the sequence length is only a few hundred bases, usually only 8 bits are sufficient to store the alignment score. However, using third-generation sequencing technology, sequences up to hundreds of thousands of bases can be obtained. In this case, 32 bits or even more are required to store the alignment score. The parallelism of vectorized instructions will drop to a quarter of the original level or even less, which becomes the main bottleneck hindering the performance of long-read sequence-to-graph alignment.
[0012] Sequence-to-graph alignment algorithms based on dynamic programming can be accelerated through parallelization using vector instructions. However, with the advent of third-generation sequencing technologies, read lengths can reach tens or even hundreds of thousands of base pairs. Long sequences require 16-bit or 32-bit integers to store the scores in the dynamic programming scoring matrix. This increases the number of bits required for a single vector instruction channel, resulting in reduced vectorization parallelism and poor algorithm performance. Summary of the Invention
[0013] In response to the problems existing in the above-mentioned traditional methods, the present invention proposes a differential-based vectorized parallel sequence-to-graph comparison method, device and equipment, which can improve the performance of sequence-to-graph comparison.
[0014] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0015] In one aspect, a vectorized parallel sequence-to-graph comparison method based on difference is provided, the method comprising the steps of:
[0016] Obtain genome map and sequencing sequence.
[0017] Construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.
[0018] Define the row difference matrix and column difference matrix. The elements of the row difference matrix are the difference between the comparison scores of two adjacent cells in the same column of the dynamic programming scoring matrix. The elements of the column difference matrix are the difference between the comparison scores of the cell of the dynamic programming scoring matrix and all its predecessor cells in the same row.
[0019] According to the intermediate variables set by the definitions of the row difference matrix and the column difference matrix, the recursive relationship between the row difference matrix and the column difference matrix is derived; the intermediate variable is the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row.
[0020] The recursive relationship between the row difference matrix and the column difference matrix is used to calculate the value of each cell of the row difference matrix and the column difference matrix.
[0021] According to the definition of the row difference matrix and the row difference matrix, the score of each cell of the dynamic programming scoring matrix is calculated.
[0022] On the other hand, a vectorized parallel sequence-to-graph comparison device based on difference is also provided, the device comprising:
[0023] The comparison sequence acquisition module is used to obtain genome maps and sequencing sequences.
[0024] The dynamic programming scoring matrix determination module is used to construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.
[0025] The difference matrix definition module is used to define the row difference matrix and the column difference matrix. The elements of the row difference matrix are the difference in comparison scores between two adjacent cells in the same column of the dynamic programming scoring matrix. The elements of the column difference matrix are the difference in comparison scores between a cell in the dynamic programming scoring matrix and all its predecessor cells in the same row.
[0026] The recursive relationship construction module between difference matrices is used to derive the recursive relationship between the row difference matrix and the column difference matrix based on the intermediate variables set by the definitions of the row difference matrix and the column difference matrix; the intermediate variable is the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row.
[0027] The difference matrix cell value calculation module is used to calculate each cell value of the row difference matrix and the column difference matrix by using the recursive relationship between the row difference matrix and the column difference matrix.
[0028] The dynamic programming scoring matrix score determination module is used to calculate the score of each cell of the dynamic programming scoring matrix according to the definition of the row difference matrix and the row difference matrix.
[0029] On the other hand, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the above-mentioned differential-based vectorized parallel sequence-to-graph comparison methods are implemented.
[0030] One of the above technical solutions has the following advantages and beneficial effects:
[0031] The above-mentioned difference-based vectorized parallel sequence-to-graph alignment method, device, and equipment include: constructing a dynamic programming scoring matrix based on the genome map and sequencing sequence: defining a row difference matrix and a column difference matrix; deriving a recursive relationship between the row difference matrix and the column difference matrix based on intermediate variables set according to the definitions of the row difference matrix and the column difference matrix; calculating the value of each cell of the row difference matrix and the column difference matrix using the recursive relationship between the row difference matrix and the column difference matrix; and calculating the score of each cell of the dynamic programming scoring matrix based on the definition of the row difference matrix and the row difference matrix. This method proposes a difference-based alignment scoring recursive formula, which converts the direct calculation of cell scores into the calculation of differences between cells, and always controls the number of bits of a single vector channel to 8 bits, thereby improving the parallelism of vectorization and further enhancing the performance of sequence-to-graph alignment. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 Schematic diagram of the flow of a vectorized parallel sequence-to-graph comparison method based on difference in one embodiment. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this application.
[0036] It should be noted that, when referred to in this document as an "embodiment", it means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in this document refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0037] The following describes the implementation of the present invention in detail with reference to the accompanying drawings in the embodiments of the present invention.
[0038] In one embodiment, Figure 1 As shown, a vectorized parallel sequence-to-graph comparison method based on difference is provided, which may include the following processing steps 100 to 108:
[0039] Step 100: Obtain genome map and sequencing sequence.
[0040] Step 102: Construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.
[0041] Specifically, the dynamic programming scoring matrix Rank The values of the column cells are determined according to the original recursive formula for sequence-to-graph alignment.
[0042] Step 104: Define a row difference matrix and a column difference matrix. The elements of the row difference matrix are the differences in the comparison scores between two adjacent cells in the same column of the dynamic programming scoring matrix. The elements of the column difference matrix are the differences in the comparison scores between a cell in the dynamic programming scoring matrix and all its predecessor cells in the same row.
[0043] Specifically, the row difference matrix Represents the original matrix The difference in comparison scores between two adjacent cells in the same column is:
[0044] ;
[0045] in, is the row difference matrix U Middle Rank The value of the column cell, Represents the scoring matrix Rank The value of the column cell, Represents the scoring matrix Rank The value of the column cell.
[0046] Column difference matrix Represents the original matrix The difference between the comparison scores of the cell and all its predecessor cells in the same row is calculated as follows:
[0047] ;
[0048] in, is the column difference matrix V Middle Rank Column cell values, column difference matrix No. Rank The column corresponds to multiple values, each value express The difference between the current row and all its predecessor cells, For reference figure j nodes The predecessor node, E is the set of directed edges in the reference graph.
[0049] Step 106: Based on the intermediate variables defined in the row difference matrix and the column difference matrix, derive the recursive relationship between the row difference matrix and the column difference matrix; the intermediate variable is the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell in the previous row.
[0050] Specifically, according to the definition of the difference matrix, the recursive relationship between the difference matrices is derived. First, the intermediate variables need to be calculated. , and establish the row difference matrix and column difference matrix The recursive relationship between them is used to calculate the entire difference matrix in sequence.
[0051] A vectorized parallel sequence-to-graph comparison method based on difference is proposed. By calculating the difference values between the cells of the scoring matrix instead of the original values of the cells in the scoring matrix, the number of operations of a single vectorized channel is controlled within 8 bits, thereby improving the parallelism of vectorization and comparison performance.
[0052] Step 108: Calculate each cell value of the row difference matrix and the column difference matrix using the recursive relationship between the row difference matrix and the column difference matrix.
[0053] Step 110: Calculate the score of each cell of the dynamic programming scoring matrix according to the definition of the row difference matrix and the row difference matrix.
[0054] Specifically, after completing the row difference matrix and column difference matrix After calculating the current cell value, the score of the cell can be calculated by defining the difference matrix , the calculation formula is:
[0055] ;
[0056] Through the above conversion, in the process of sequence to image comparison, the absolute value of the score The calculation of is transformed into the calculation of the difference value of adjacent cells, which only requires calculation 、 、 The three differential matrices keep the number of operations in a single vector channel within 8 bits, achieving maximum parallelism in vectorization and improving comparison performance.
[0057] Steps 104 and 106 are the computational core of the algorithm, and parallel computing is achieved through vectorization methods during the computation process.
[0058] The above-mentioned difference-based vectorized parallel sequence-to-graph alignment method includes: constructing a dynamic programming scoring matrix based on the genome graph and sequencing sequence: defining a row difference matrix and a column difference matrix; deriving a recursive relationship between the row difference matrix and the column difference matrix based on intermediate variables set according to the definitions of the row difference matrix and the column difference matrix; calculating the value of each cell of the row difference matrix and the column difference matrix using the recursive relationship between the row difference matrix and the column difference matrix; and calculating the score of each cell of the dynamic programming scoring matrix based on the definition of the row difference matrix and the row difference matrix. This method proposes a difference-based alignment scoring recursive formula, which converts the direct calculation of cell scores into the calculation of differences between cells, and always controls the number of bits of a single vector channel to 8 bits, thereby increasing the parallelism of vectorization and further improving the performance of sequence-to-graph alignment.
[0059] In one embodiment, the original recursive formula for sequence-to-graph alignment is:
[0060] ;
[0061] in Represents the scoring matrix Rank The value of the column cell, is the predecessor cell of the previous row, For the scoring matrix Rank j The value of the column cell, For the scoring matrix Rank The value of the column cell, Indicates the Row and Match / mismatch scores between column bases, and Represents horizontal and vertical penalties respectively, represents the set of all directed edges in the graph, and Represents a node in a graph.
[0062] In one embodiment, the intermediate variable in step 106 is:
[0063] ;
[0064] in, The corresponding scoring matrix Rank The first column cell k An intermediate variable, is the predecessor cell of the previous row, is the column difference matrix i -1 line j The first column cell k values, is the column difference matrix i -1 line j The first column cell values, is the row difference matrix i Rank The value of the column cell.
[0065] In one embodiment, the recursive relationship between the row difference matrix and the column difference matrix in step 108 is:
[0066] ;
[0067] ;
[0068] in, is the row difference matrix i Rank The value of the column cell, is the column difference matrix Rank The first column cell k values, is the column difference matrix i Rank The first column cell k values, The corresponding scoring matrix Rank The first column cell k an intermediate variable.
[0069] Specifically, the intermediate variable Substitution ,calculate The formula is as follows:
[0070] ;
[0071] The intermediate variable Substitution ,calculate The formula is as follows:
[0072] ;
[0073] In some embodiments, an experimental example is also provided. Experiments are conducted by simulating reference genome and read data to verify its feasibility. Table 1 shows the experimental results of this embodiment.
[0074] Table 1 Experimental results
[0075]
[0076] This experiment conducted five tests. When processing gene sequences of the same scale, the differential-based vectorized graph alignment algorithm was not only faster than the scalar mode, but also achieved significant performance improvements compared to the non-differential vectorized algorithm, achieving an average speedup of approximately 1.44 times compared to the non-differential vectorized algorithm.
[0077] It should be understood that although the above process Figure 1 The steps in the flowchart are shown in the order indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0078] In one embodiment, a vectorized parallel sequence-to-graph comparison device based on difference is also provided, the device comprising:
[0079] The comparison sequence acquisition module is used to obtain genome maps and sequencing sequences.
[0080] The dynamic programming scoring matrix determination module is used to construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.
[0081] The difference matrix definition module is used to define the row difference matrix and the column difference matrix. The elements of the row difference matrix are the difference in comparison scores between two adjacent cells in the same column of the dynamic programming scoring matrix. The elements of the column difference matrix are the difference in comparison scores between a cell in the dynamic programming scoring matrix and all its predecessor cells in the same row.
[0082] The recursive relationship construction module between difference matrices is used to derive the recursive relationship between the row difference matrix and the column difference matrix based on the intermediate variables set by the definitions of the row difference matrix and the column difference matrix; the intermediate variable is the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row.
[0083] The difference matrix cell value calculation module is used to calculate each cell value of the row difference matrix and the column difference matrix by using the recursive relationship between the row difference matrix and the column difference matrix.
[0084] The dynamic programming scoring matrix score determination module is used to calculate the score of each cell of the dynamic programming scoring matrix according to the definition of the row difference matrix and the row difference matrix.
[0085] In one embodiment, the original recursive formula for sequence-to-graph alignment in dynamic programming scoring matrix determination is:
[0086] ;
[0087] in Represents the scoring matrix Rank The value of the column cell, is the predecessor cell of the previous row, For the scoring matrix Rank j The value of the column cell, For the scoring matrix Rank The value of the column cell, Indicates the Row and Match / mismatch scores between column bases, and Represents horizontal and vertical penalties respectively, represents the set of all directed edges in the graph, and Represents a node in the graph
[0088] In one embodiment, the intermediate variables of the recursive relationship building module between the difference matrices are:
[0089] ;
[0090] in, The corresponding scoring matrix Rank The first column cell An intermediate variable, is the predecessor cell of the previous row, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values, is the row difference matrix i Rank The value of the column cell.
[0091] In one embodiment, the recursive relationship between the row difference matrix and the column difference matrix in the difference matrix cell value calculation module is:
[0092] ;
[0093] ;
[0094] in, is the row difference matrix The value of the cell in row j column, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values, The corresponding scoring matrix Rank The first column cell an intermediate variable.
[0095] It can be understood that for the specific explanation of the differential-based vectorized parallel sequence to graph comparison device, please refer to the corresponding explanation of the various embodiments of the differential-based vectorized parallel sequence to graph comparison method above, which will not be repeated here. The various modules in the above-mentioned differential-based vectorized parallel sequence to graph comparison device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a device with data processing functions in the form of hardware, or can be stored in the memory of the aforementioned device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. The aforementioned device can be but not limited to various types of data processing computer devices already available in the art.
[0096] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processing steps in the above-mentioned embodiment of the difference-based vectorized parallel sequence to graph comparison method are implemented.
[0097] It can be understood that in addition to the memory and processor mentioned above, the above-mentioned computer device also includes other software and hardware components not listed in this specification. The specific components can be determined according to the specific model of the image processing computer in different application scenarios. This specification will not list them one by one in detail.
[0098] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of protection of the present application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application.
Claims
1. A vectorized parallel sequence-to-graph comparison method based on difference, characterized in that: Including steps: Obtain genome maps and sequencing sequences; Constructing a dynamic programming scoring matrix based on the genome map and the sequencing sequence; Define a row difference matrix and a column difference matrix, where the elements of the row difference matrix are the difference between the comparison scores of two adjacent cells in the same column of the dynamic programming scoring matrix, and the elements of the column difference matrix are the difference between the comparison scores of a cell in the dynamic programming scoring matrix and all its predecessor cells in the same row; Define the intermediate variable as the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row; According to the definitions of the row difference matrix and the column difference matrix, the definition of the intermediate variable is changed to derive the recursive relationship between the row difference matrix and the column difference matrix; the intermediate variable is: ; in, The corresponding scoring matrix Rank The first column cell An intermediate variable, Represents the scoring matrix Rank The value of the column, is the predecessor cell of the previous row, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values, is the row difference matrix Rank The value of the column cell, and Represents horizontal and vertical penalties respectively, Indicates the Row and Match or mismatch scores between column bases; The recursive relationship between the row difference matrix and the column difference matrix is used to calculate the value of each cell of the row difference matrix and the column difference matrix; the recursive relationship between the row difference matrix and the column difference matrix is: ; ; in, is the row difference matrix Rank The value of the column cell, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values; According to the definition of the row difference matrix and the row difference matrix, the score of each cell of the dynamic programming scoring matrix is calculated.
2. The vectorized parallel sequence-to-graph comparison method based on difference according to claim 1, characterized in that: The original recursive formula for sequence-to-graph alignment is: ; in For the scoring matrix Rank The value of the column cell, For the scoring matrix Rank The value of the column cell, represents the set of all directed edges in the graph, and Represents a node in a graph.
3. A vectorized parallel sequence-to-graph comparison device based on difference, characterized in that: include: Comparison sequence acquisition module, used to obtain genome maps and sequencing sequences; A dynamic programming scoring matrix determination module is used to construct a dynamic programming scoring matrix based on the genome map and the sequencing sequence; A difference matrix definition module is used to define a row difference matrix and a column difference matrix, where the elements of the row difference matrix are the difference in comparison scores between two adjacent cells in the same column of the dynamic programming scoring matrix, and the elements of the column difference matrix are the difference in comparison scores between a cell of the dynamic programming scoring matrix and all its predecessor cells in the same row; A recursive relationship building module between difference matrices, used to define an intermediate variable as the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row; According to the definitions of the row difference matrix and the column difference matrix, the definition of the intermediate variable is changed to derive the recursive relationship between the row difference matrix and the column difference matrix; the intermediate variable is: ; in, The corresponding scoring matrix Rank The first column cell An intermediate variable, Represents the scoring matrix Rank The value of the column, is the predecessor cell of the previous row, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values, is the row difference matrix Rank The value of the column cell, and Represents horizontal and vertical penalties respectively, Indicates the Row and Match or mismatch scores between column bases; The difference matrix cell value calculation module is used to calculate each cell value of the row difference matrix and the column difference matrix using the recursive relationship between the row difference matrix and the column difference matrix; the recursive relationship between the row difference matrix and the column difference matrix is: ; ; in, is the row difference matrix Rank The value of the column cell, is the column difference matrix Rank The first column cell values, is the column difference matrix Rank The first column cell values; The dynamic programming scoring matrix score determination module is used to calculate the score of each cell of the dynamic programming scoring matrix according to the definition of the row difference matrix and the row difference matrix.
4. The vectorized parallel sequence-to-graph comparison device based on difference according to claim 3, characterized in that: The original recursive formula for sequence-to-graph comparison in dynamic programming scoring matrix determination is: ; in Represents the scoring matrix Rank The value of the column cell, For the scoring matrix Rank The value of the column cell, For the scoring matrix Rank The value of the column cell, For the scoring matrix Rank The value of the column cell, represents the set of all directed edges in the graph, and Represents a node in a graph.
5. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the difference-based vectorized parallel sequence-to-graph comparison method described in any one of claims 1 to 2.
Citation Information
Patent Citations
Information hiding method and device
CN107369186A
RBP binding site prediction algorithm based on deep learning
CN113035280A