Differential-based vectorization parallel sequence-to-graph comparison method, device and equipment

By calculating the sequence-to-graph alignment through the differential matrix recursive relation, the problem of decreased vectorization parallelism under long read sequence lengths is solved, and efficient sequence-to-graph alignment performance is improved.

CN120600115AActive Publication Date: 2025-09-05NAT UNIV OF DEFENSE TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511092684.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-09-05
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

The existing sequence-to-graph alignment algorithm suffers from decreased vectorization parallelism in the case of long read sequence lengths, resulting in reduced computing performance and an inability to efficiently process sequence data of hundreds of thousands of base pairs.

Method used

The difference matrix recursive relationship is adopted to calculate the cell values ​​of the dynamic programming scoring matrix through the row difference matrix and the column difference matrix, which is converted into cell difference calculation. The single channel bit number of the control vector is within 8 bits to improve the parallelism.

Benefits of technology

Improves the performance of sequence-to-graph comparison, accelerates the comparison process, and achieves higher parallelism and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120600115A_ABST
    Figure CN120600115A_ABST
Patent Text Reader

Abstract

The invention relates to a difference-based vectorized parallel sequence-to-graph comparison method, device and equipment, and the method comprises the steps: constructing a dynamic planning scoring matrix according to a genome graph and a sequencing sequence: defining a row difference matrix and a column difference matrix; deducing a recursive relational expression between the row difference matrix and the column difference matrix according to intermediate variables defined and set by the row difference matrix and the column difference matrix; calculating each cell value of the row difference matrix and the column difference matrix by adopting a recursive relational expression between the row difference matrix and the column difference matrix; and calculating the score of each cell of the dynamic planning scoring matrix according to the definition of the row difference matrix and the row difference matrix. According to the method, a comparison scoring recursion formula based on difference is provided, direct calculation of cell scores is converted into calculation of difference values between cells, and the number of bits of a vector single channel is controlled to be 8 all the time, so that the parallelism of vectorization is improved, and the performance of sequence-to-graph comparison is further improved.
Need to check novelty before this filing date? Find Prior Art

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; ; 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.

[0008] 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.

[0009] 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.

[0010] 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

[0011] 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.

[0012] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: In one aspect, a vectorized parallel sequence-to-graph comparison method based on difference is provided, the method comprising the steps of: Obtain genome map and sequencing sequence.

[0013] Construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.

[0014] 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.

[0015] 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.

[0016] 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.

[0017] 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.

[0018] On the other hand, a vectorized parallel sequence-to-graph comparison device based on difference is also provided, the device comprising: The comparison sequence acquisition module is used to obtain genome maps and sequencing sequences.

[0019] The dynamic programming scoring matrix determination module is used to construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.

[0020] 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.

[0021] 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.

[0022] 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.

[0023] 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.

[0024] 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.

[0025] One of the above technical solutions has the following advantages and beneficial effects: 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

[0026] 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.

[0027] Figure 1 Schematic diagram of the flow of a vectorized parallel sequence-to-graph comparison method based on difference in one embodiment. DETAILED DESCRIPTION

[0028] 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.

[0029] 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.

[0030] 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.

[0031] The following describes the implementation of the present invention in detail with reference to the accompanying drawings in the embodiments of the present invention.

[0032] 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: Step 100: Obtain genome map and sequencing sequence.

[0033] Step 102: Construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.

[0034] 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.

[0035] 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.

[0036] Specifically, the row difference matrix Represents the original matrix The difference in comparison scores between two adjacent cells in the same column is: ; 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.

[0037] 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: ; 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.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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: ; 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.

[0044] Steps 104 and 106 are the computational core of the algorithm, and parallel computing is achieved through vectorization methods during the computation process.

[0045] 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.

[0046] In one embodiment, the original recursive formula for sequence-to-graph alignment is: ; 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.

[0047] In one embodiment, the intermediate variable in step 106 is: ; 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 matrixi -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.

[0048] In one embodiment, the recursive relationship between the row difference matrix and the column difference matrix in step 108 is: ; ; 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.

[0049] Specifically, the intermediate variable Substitution ,calculate The formula is as follows: ; The intermediate variable Substitution ,calculate The formula is as follows: ; 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.

[0050] Table 1 Experimental results

[0051] 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.

[0052] 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.

[0053] In one embodiment, a vectorized parallel sequence-to-graph comparison device based on difference is also provided, the device comprising: The comparison sequence acquisition module is used to obtain genome maps and sequencing sequences.

[0054] The dynamic programming scoring matrix determination module is used to construct a dynamic programming scoring matrix based on the genome map and sequencing sequence.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] In one embodiment, the original recursive formula for sequence-to-graph alignment in dynamic programming scoring matrix determination is: ; 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 In one embodiment, the intermediate variables of the recursive relationship building module between the difference matrices are: ; 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.

[0060] 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: ; ; 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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; Derivation of a recursive relationship between the row difference matrix and the column difference matrix according to the intermediate variables defined and set according to the row difference matrix and the column difference matrix; wherein 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; 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; 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 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.

3. The vectorized parallel sequence-to-graph comparison method based on difference according to claim 2, characterized in that: The intermediate variables are: in, The corresponding scoring matrix Rank The first column cell An intermediate variable, 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.

4. The vectorized parallel sequence-to-graph comparison method based on difference according to claim 1, characterized in that: 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 corresponding scoring matrix Rank The first column cell an intermediate variable.

5. 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 construction module between difference matrices, configured to derive a recursive relationship between the row difference matrix and the column difference matrix based on intermediate variables defined in the row difference matrix and the column difference matrix; the intermediate variable being the difference between the value of the current cell of the dynamic programming scoring matrix and the predecessor cell of the previous row; A 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 a recursive relationship between the row difference matrix and the column difference matrix; 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.

6. The vectorized parallel sequence-to-graph comparison device based on difference according to claim 5, 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 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.

7. The vectorized parallel sequence-to-graph comparison device based on difference according to claim 6, characterized in that: The intermediate variables of the recursive relationship construction module between the difference matrices are: 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 The cell in row j and column j values, is the row difference matrix Rank The value of the column cell.

8. The vectorized parallel sequence-to-graph comparison device based on difference according to claim 5, characterized in that: The recursive relationship between the row difference matrix and the column difference matrix in the difference matrix cell value calculation module 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 corresponding scoring matrix Rank The first column cell an intermediate variable.

9. 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 4.

Citation Information

Patent Citations

  • Information hiding method and device

    CN107369186A

  • RBP binding site prediction algorithm based on deep learning

    CN113035280A

  • Sequence-to-graph comparison method, system and device based on graph compression and storage medium

    CN118824369A

  • Parallel processing synchronous optimization method and system for high-throughput gene sequencing

    CN119339799A

  • DNA sequence vectorization parallel comparison method and device based on wavefront algorithm

    CN119479815A