Directed acyclic generic genome graph construction method based on fragment topology sequence

By introducing extra-sequence sequences and potential loop detection and exclusion technologies in the construction of pan-genome maps, directed acyclic pan-genome maps are constructed, solving the problems of inefficiency and inability to perform high-precision multi-sequence alignment in the existing technology, and achieving the effect of rapid construction and efficient analysis.

CN119626330AInactive Publication Date: 2025-03-14JILIN UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510149254.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing pan-genome map construction method adopts a ring map structure, which makes it impossible to directly perform high-precision multi-sequence alignment, is inefficient, and is unable to effectively provide high-density genome diversity inputs for large models or AI systems.

Method used

The directed acyclic pan-genome map construction method based on fragment oversampling and complementation is adopted, and the directed acyclic pan-genome map is rapidly constructed by introducing oversampling and potential loop detection and exclusion technologies.

Benefits of technology

The rapid construction of directed acyclic pan-genome map is achieved, the analysis efficiency of massive genome data sets is improved, high-precision multi-sequence alignment and high-density genome diversity input is provided for large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626330A_ABST
    Figure CN119626330A_ABST
Patent Text Reader

Abstract

The invention discloses a directed acyclic generic genome graph construction method based on a fragment topology sequence in the technical field of genome graph construction, which comprises the following steps: giving a target graph, taking out a complete sequence to be added, generating a sequence path, taking the weight of a graph node as a basis, carrying out anchor point search on the nodes of the sequence path, traversing a matching node set in the sequence path, and constructing a directed acyclic generic genome graph. The method comprises the following steps of: dividing nodes of which the topology sequence coordinates are continuously increased into one group to form a node group list, and then calculating node group sub-lists of which the topology sequences are strictly increased and which contain the most nodes by using dynamic programming; and then deleting the matching nodes which do not exist in the sub-list and the anchor nodes in the target graph corresponding to the matching nodes to obtain a weight-based final anchor node-matching node pair set, and the like. According to the directed acyclic generic genome graph construction method disclosed by the invention, by introducing a topology sequence and constructing a potential ring detection and exclusion technology, the rapid construction of the directed acyclic generic genome graph is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of genome graph construction, and in particular to a method for constructing a directed acyclic pan-genome graph based on fragment topology. Background Art

[0002] With the rapid development of sequencing technology, there will be more and more massive genomic data sets, but the existing pan-genome graph construction methods all use cyclic graphs.

[0003] The defects of circular pan-genome maps are mainly in the following three aspects. First, they cannot be used directly as a basis for high-precision multiple sequence alignment; second, they are far from efficient enough for massive genomic data sets, which seriously hinders the mining of useful information from more and more massive genomic data sets in the future; third, they cannot effectively provide high-density genomic diversity inputs for large models or similar AI systems. Summary of the invention

[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0005] Therefore, the purpose of the present invention is to provide a method for constructing a directed acyclic pan-genome graph based on fragment topology sequence, which realizes the rapid construction of a directed acyclic pan-genome graph by introducing topology sequence and constructing potential loop detection and exclusion technology.

[0006] To solve the above technical problems, according to one aspect of the present invention, the present invention provides the following technical solutions: A method for constructing a directed acyclic pan-genome graph based on fragment topology sequence, the steps are as follows: S1. Given a target graph, take out the complete sequence to be added and generate a sequence path; S2, based on the weight of the graph node, perform anchor point search on the sequence path node; S3, traversing the matching node set in the sequence path, grouping the nodes with continuously increasing topological order coordinates into a group to form a node group list, and then using dynamic programming to calculate the node group sublist with strictly increasing topological order and containing the largest number of nodes, and then deleting the matching nodes that do not exist in the sublist and their corresponding anchor nodes in the target graph to obtain the final anchor node-matching node pair set based on weights; S4, pre-assigning the topological coordinates of the non-matching nodes in the sequence path. If there is no topological coordinate conflict in the pre-assigned coordinates, proceed to step S5. If there is a topological coordinate conflict in the assigned coordinates, proceed to step S6. S5, traverse the sequence path nodes, search for the same sequence fragment for the non-matching node in the target FTO-DAPG graph, and use the node whose topological sequence coordinates are equal to the pre-assigned coordinates of the node as the anchor node. If the number of nodes found is greater than 1, select one of the nodes at random as the anchor point; S6, merge the matching nodes and the corresponding target FTO-DAPG anchor nodes, and add the non-matching nodes to the target graph according to their corresponding relationships with the matching nodes, complete the operation of adding the sequence path to the graph, and then maintain the topological sequence coordinates; S7, detecting possible groups of points with the same sequence fragments and the same coordinates in the graph, and merging them into one node; S8. Merge subgraphs constructed from subsets of sequences.

[0007] As a preferred embodiment of the method for constructing a directed acyclic pan-genome graph based on fragment topology sequence described in the present invention, in step S1, the specific steps of generating the sequence path are as follows: The complete sequence is divided into L-k+1 sequence segments through a sliding window with a step size of 1 and a length of k, and each sequence segment is regarded as the sequence content of a node; The nodes formed by each sequence fragment are connected by edges in the direction of the sliding window, with the nth node pointing to the n+1th node.

[0008] As a preferred solution of the method for constructing a directed acyclic pan-genome graph based on fragment topology sequence described in the present invention, in step S2, the specific steps of searching for anchor points of sequence path nodes based on the weights of graph nodes are as follows: For each node in the sequence path, search for the same graph node in the graph as the sequence fragment; If multiple nodes are found, the graph node with the largest weight is selected as the anchor node of the sequence path node, and the corresponding sequence path node is the matching node. If there are two or more nodes with the largest weight in the target graph for a sequence path node to be added, the anchor point search for the sequence path node is directly abandoned.

[0009] As a preferred solution of the method for constructing a directed acyclic pan-genome graph based on fragment topology sequence described in the present invention, in step S6, the specific steps of maintaining the topology sequence coordinates are as follows: If a topological order conflict is found, the coordinate conflict point is recorded, and all conflict points and their descendant nodes are found in the merged target FTO-DAPG as the update range. Then, the conflict point is used as the traversal starting point, and a breadth-first traversal determined by the topological order is performed to update the coordinates of each node in the range.

[0010] As a preferred solution of the method for constructing a directed acyclic pan-genome graph based on fragment topology sequence described in the present invention, in step S7, the specific steps of detecting possible groups of points with the same sequence fragments and the same coordinates in the graph and merging them into one node are as follows: Node groups with the same forward topological order coordinates and reverse topological order coordinates are repeatedly detected and merged until such node groups no longer exist in the graph. The reverse topological order coordinates are updated after the nodes with the same forward topological order coordinates are merged, and the forward topological order coordinates are updated after the nodes with the same reverse topological order coordinates are merged.

[0011] As a preferred embodiment of the method for constructing a directed acyclic pan-genome graph based on fragment topology sequence described in the present invention, in step S8, the specific steps of merging subgraphs constructed from sequence subsets are as follows: Select one of the two FTO-DAPGs as the target graph and the other as the graph to be merged, and establish the backbone nodes in each graph; Search the target graph and the backbone nodes of the graph to be added to obtain the initial maximum weight anchor node and matching node pair respectively; If the initial anchor node set and the matching node set correspond one-to-one and there is no topological sequence coordinate conflict, the initial anchor node set and the matching node set are directly identified as the final anchor node set and the matching node set; then the topological sequence coordinates of the backbone nodes in the graph to be merged are pre-assigned; If the initial anchor node set and the matching node set correspond one-to-one but there is a topological order coordinate conflict, or the initial anchor node set and the matching node set do not correspond one-to-one, then the potential loop elimination algorithm is used to obtain the largest subset of the initial matching node set without topological order conflicts, and then the topological order coordinates of the backbone nodes in the graph to be merged are pre-assigned; If there is no topological order conflict in the pre-assigned coordinates, directly merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph. If there is a topological order conflict in the pre-assigned coordinates, record the conflicting nodes, and then merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph; after completing the merging of the matching node into the anchor node, add all the nodes in the other graphs to be merged into the target graph according to their topological connection relationship with the matching node; The topological order coordinates of the target graph are updated so that there are no topological order conflicts on all paths, and then the mergeable nodes in the target graph are further merged based on the topological order coordinates.

[0012] Compared with the prior art, the present invention has the following beneficial effects: by introducing topological sequences and constructing potential loop detection and elimination technology, the present invention realizes the rapid construction of a directed acyclic pan-genome graph. It makes the accurate analysis of massive genomes from impossible to daily life. For example, the high-precision multiple sequence alignment that people currently have no way to achieve and the difficult joint variant calling can be solved based on this technology and the multiple sequence alignment technology on the directed acyclic graph developed later. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below in combination with the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them: Figure 1 A schematic diagram of the topological order provided by the present invention, wherein for a linear directed path (a) the topological order, i.e. the order in which nodes appear along the path direction, is unique, and for a directed acyclic graph (b) the topological order only requires that the parent node appear before the child node, while there is no requirement for the order of different child nodes; Figure 2 A flowchart for constructing a subgraph provided by the present invention; Figure 3 A schematic diagram of sequence path generation provided by the present invention; Figure 4 A schematic diagram of pseudo code for searching for the maximum weight anchor node provided by the present invention; Figure 5 Schematic diagram of the first type of topology conflict processing provided by the present invention, wherein (a) the topology coordinates of the initial anchor node (red circle) of the target graph based on the maximum weight and the initial matching node (yellow) of the sequence path to be added are copied from the anchor node and a non-monotonically increasing ("1, 5, 6, 7, 8, 9, 2, 13") topology conflict occurs along the topology direction of the sequence path; (b) the final anchor node (red thick) and matching node (yellow thick) obtained after topology conflict processing; (c) the ring formed by directly merging the initial anchor node-matching node without performing topology conflict processing (indicated by a red edge); (d) the final merged graph obtained based on the final anchor node-matching node; Figure 6 A pseudo code schematic diagram of the present invention for combining continuous matches in a sequence path and continuous topological sequence coordinates into blocks for judgment processing; Figure 7 A pseudo-code schematic diagram of the dynamic programming calculation of the maximum topology-free order conflict matching node subset provided by the present invention; Figure 8A pseudo code schematic diagram of searching for same-coordinate anchor points provided by the present invention; Fig. 9 A pseudo code schematic diagram is incorporated into the sequence path provided by the present invention; Fig.10 This is a schematic diagram of pseudo code for topology sequence coordinate maintenance provided by the present invention. DETAILED DESCRIPTION

[0014] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0015] Secondly, the present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0016] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0017] The present invention provides a method for constructing a directed acyclic pan-genome graph based on fragment topology sequence, which realizes the rapid construction of a directed acyclic pan-genome graph by introducing topology sequence and constructing potential loop detection and exclusion technology.

[0018] The directed acyclic pangenome graph based on fragment topological order is referred to as FTO-DAPG. The core innovative technology in the construction process of this graph is the topological order (such as Figure 1 To achieve parallel computing, a data set can be divided into multiple subsets. First, multiple threads are used to build multiple subsets in parallel, and then the overall graph is obtained by merging them level by level. Therefore, the construction process is divided into subgraph construction and graph merging.

[0019] 1. Subgraph construction Subgraph construction is the process of continuously converting the complete sequences to be added into sequence paths and then adding them to the target graph. After all the sequences are added to the graph, the graph is sorted and the possible missing nodes that can be merged during the sequence path addition process are supplemented and merged. The process overview is as follows Figure 2 As shown. The core of the many steps and their corresponding algorithm design is to find nodes in the sequence path graph that contain the same sequence fragment and conform to the topological order as anchor points under the premise that there is no ring structure in the target graph, and to integrate the sequence path into the graph by merging the matching nodes and anchor points in the sequence path. The specific instructions are as follows: 1.1 Sequence path generation The complete sequence is divided into L-k+1 sequence segments through a sliding window with a step size of 1 and a length of k, and each sequence segment is regarded as the sequence content of a node. In the direction of the sliding window, the nodes formed by each sequence segment are connected by edges, from the nth node to the n+1th node (such as Figure 3 After completing the above steps, the complete sequence can be converted into a sequence path. When the target graph is empty and there is no sequence path added, the first sequence path directly becomes the initial target graph.

[0020] 1.2 Maximum weight anchor point search After the sequence path is formed, the first anchor search can be performed on the sequence path node. During this search, the anchor points of other sequence path nodes on both sides of each sequence path node have not been fully determined, so the position of the surrounding anchor points in the graph cannot be used as the basis for searching the anchor points of each node. For different nodes containing the same fragment, the larger the weight (node ​​attribute, the larger the node weight, the more complete sequences passing through the node in the graph), the greater the probability of appearance, and it is also the most likely to be an anchor node in the target graph for a sequence path node to be added containing the same fragment. Therefore, you can choose to use the weight of the graph node as the basis for searching the anchor point (you can then use the pre-assigned coordinates as the basis for searching, see the same coordinate anchor point search for details), so this search is called the maximum weight anchor point search. Search for graph nodes with the same sequence fragment in the target graph for each node in the sequence path in turn. If multiple are found, select the graph node with the largest weight as the anchor node of the sequence path node, and the corresponding sequence path node is called a matching node. If there are two or more nodes with the largest weight in the target graph for a sequence path node to be added, the anchor point search for the sequence path node is directly abandoned. The pseudo code is as follows Figure 4 As shown. According to the above rules, if two or more nodes formed by the same sequence fragments appear in the sequence path, they will find the same target graph node as the anchor node. This problem will be solved in the process of eliminating topological order coordinate conflicts (see topological order conflict resolution below for details). In addition, during the search for high-weight anchor points, custom conditions can be set to skip some sequence path nodes. For example, in the FTO-DAPG construction of the new crown genome, we skipped the maximum weight anchor point search for nodes in the sequence path where the sequence fragment contained only one base or the sequence fragment contained one or more degenerate bases. Because these nodes usually have more matching nodes in the graph, they will cause too many topological order conflict calculations and reduce the efficiency of the composition.

[0021] 1.3 Analysis of potential looping and resolution of topology conflicts 1.3.1 Analysis of potential looping situations Some matching node combinations of the sequence path to be added that correspond to the maximum weight anchor node in the target graph may cause a ring structure in the graph during merging. Therefore, it is necessary to detect such matching node combinations and cancel their relationship with the anchor node to prevent the formation of potential ring structures. After completing the maximum weight anchor node search, the coordinates of the anchor node in the target FTO-DAPG will be copied to the matching node in the sequence path. So far, we have obtained the initial "anchor node (in the target graph)" set and "matching node (in the sequence path to be added)" set based on the maximum weight. The maximum weight anchor node-matching node combinations that can cause potential rings can be divided into two categories: the first category is that the anchor nodes in the target graph and the matching nodes in the sequence path have a one-to-one correspondence, but the topological order of the anchor node set in the target graph and the matching node set in the sequence path are inconsistent. The second category is that there are two or more nodes with the same sequence fragment in the sequence path that share the same graph node as the anchor node. Both types of maximum weight anchor node-matching node combinations will reflect the topological order coordinate conflict of the matching node in the sequence path. The first type of topology order conflict and its corresponding initial / final anchor node-matching node based on maximum weight are given as follows: Figure 5 shown.

[0022] 1.3.2 Resolution of topology conflicts When a topological order coordinate conflict occurs in the sequence path matching nodes, it is necessary to cancel one or more "anchor node-matching node" pairs so that there is no topological order coordinate conflict in the remaining matching nodes. In order to retain as many mergeable nodes as possible, the set of matching nodes in the sequence path can be traversed, and the nodes with continuously increasing topological order coordinates can be grouped together to form a node group list. Then, dynamic programming is used to calculate the node group sublist with strictly increasing topological order and the largest number of nodes. Subsequently, the matching nodes that do not exist in the sublist and their corresponding anchor nodes in the target graph are deleted to obtain the final anchor node-matching node pair set based on weights. The continuous matches in the sequence path with continuous topological order coordinates are merged into blocks for judgment processing (pseudo code as shown in Figure 6 As shown), the amount of calculation for subsequent dynamic programming can be reduced (pseudo code as Figure 7 as shown).

[0023] 1.4 Pre-assignment of topological coordinates of non-matching nodes in sequence paths After confirming that there are no topological order coordinate conflicts for the matching nodes in the sequence path, the possible topological order coordinates after being added to the graph can be calculated in advance and pre-assigned for each non-matching node in the sequence path (the matching nodes have been assigned the topological order coordinates of the corresponding anchor nodes in the target FTO-DAPG graph). The rules for pre-assigning sequence path coordinates are as follows: 1) The starting node of the sequence path is pre-assigned with a coordinate of 1. 2) The sequence path nodes are traversed in topological order, and the maximum topological order coordinate of the parent node plus 1 is pre-assigned as its topological order coordinate. The pre-assigned coordinates of the non-matching nodes in the sequence path are equal to the topological order coordinates after being added to the graph only when no topological order conflicts occur. In the event of a topological order conflict in the pre-assigned coordinates, it is necessary to update the graph coordinates during the topological order coordinate maintenance and recalculate some graph coordinates (pseudo code as shown in the figure). Figure 8 as shown).

[0024] 1.5 Searching for anchor points with the same coordinates before merging When the pre-assigned coordinates of the sequence path nodes have no topological order conflicts, the anchor points will be searched again for the sequence path nodes whose anchor point matching was cancelled when the topological order coordinate conflicts were eliminated, and the anchor points will also be searched for the sequence path nodes that were skipped in the maximum weight anchor point search. Unlike the first search for anchor nodes based on the maximum weight, some nodes in the sequence path have confirmed the anchor points and obtained the pre-assigned coordinate information. Therefore, the main basis for this anchor node search is the pre-assigned coordinates of the sequence path nodes. Traverse the sequence path nodes, and search for the same sequence fragments for non-matching nodes in the target FTO-DAPG graph, and the nodes whose topological order coordinates are equal to the pre-assigned coordinates of the node are used as anchor nodes. If the number of nodes found is greater than 1, one of the nodes can be randomly selected as the anchor point, because these nodes with the same coordinates will also be merged into one node during the merging process of nodes with the same coordinates during graph sorting.

[0025] Note that if there is a topology conflict in the pre-assigned coordinates, no search for anchor points with the same coordinates will be performed. Therefore, if no search for anchor points with the same coordinates is performed when the sequence is added before, it may cause nodes with the same coordinates and the same sequence fragments to exist in the graph. These nodes will be merged into the same node when merging nodes with the same coordinates after all sequences are added.

[0026] 1.6 Sequence pathway merged into target FTO-DAPG After completing the above operations, the matching node combination in the sequence path has been finally confirmed. It is only necessary to merge these matching nodes with the corresponding target FTO-DAPG anchor nodes, and add the non-matching nodes to the target graph according to their corresponding relationship with the matching nodes (pseudo code as shown in Fig. 9 As shown in the figure), the operation of adding the sequence path to the graph is completed.

[0027] 1.7 Topology coordinate maintenance In the process of pre-assigning the coordinates of the sequence path, if a topological order conflict is found, the coordinate conflict point needs to be recorded. And all conflict points and their descendant nodes are found in the merged target FTO-DAPG as the update range, and the conflict point is used as the traversal starting point to perform a breadth-first traversal determined by the topological order (pseudo code as follows Fig.10 As shown), the coordinates of each node within the range are updated.

[0028] 1.8 Merge nodes with the same coordinates after merging In the process of pre-assigning the coordinates of the sequence path, if a topology conflict is found, the node where the conflict occurs needs to be recorded for subsequent sorting of the topology coordinates in the graph, and the search for the same coordinate anchor point of the sequence path is abandoned. Therefore, there may be missed nodes with the same coordinate and sequence fragments in the graph that cannot be merged.

[0029] In FTO-DAPG, the merger of two mutually unreachable nodes will not cause a ring structure to appear in the graph. Nodes with the same forward or reverse topological order coordinates in the graph must be mutually unreachable. Therefore, it is possible to detect the node groups with the same sequence fragment and the same coordinates (forward or reverse) in the graph and merge them into one node. The operation process is to repeatedly detect the node groups with the same forward and reverse topological order coordinates and merge them until such node groups do not exist in the graph. It should be noted that the merger of nodes with the same forward topological order coordinates will cause the reverse topological order coordinates to change, and the merger of nodes with the same reverse topological order coordinates will also cause the forward topological order coordinates to change. Therefore, the reverse topological order coordinates need to be updated after the nodes with the same forward topological order coordinates are merged, and vice versa.

[0030] 2. Sub-graph merging Dividing massive genomes into multiple subsets and constructing subgraphs is to achieve parallel computing, but we are ultimately more interested in the overall graph of all sequences. Therefore, it is necessary to merge subgraphs constructed from sequence subsets. The main method steps of this process are as follows: 2.1 Select one of the two FTO-DAPGs as the target graph (t-FTO-DAPG) and the other as the graph to be merged (i-FTO-DAPG). Establish the backbone nodes in each graph (for highly conservative sequences such as the SARS-CoV-2 genome, a better backbone node definition is to select nodes with a weight greater than half, and this definition can be adjusted with sequence similarity).

[0031] 2.2 Search for the initial maximum weight anchor node and matching node pair in the target graph and the backbone nodes of the graph to be added.

[0032] 2.3 If the initial anchor node set and the matching node set correspond one-to-one and there is no topological sequence coordinate conflict, the initial anchor node set and the matching node set are directly identified as the final anchor node set and the matching node set. Then the topological sequence coordinates of the backbone nodes in the graph to be merged are pre-assigned.

[0033] 2.4 If the initial anchor node set and the matching node set correspond one-to-one but there is a topological order coordinate conflict, or the initial anchor node set and the matching node set do not correspond one-to-one, then the potential loop elimination algorithm is implemented to obtain the largest subset of the initial matching node set without topological order conflicts, and then the topological order coordinates of the backbone nodes in the graph to be merged are pre-assigned.

[0034] 2.5 If there is no topological conflict in the pre-assigned coordinates, directly merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph. If there is a topological conflict in the pre-assigned coordinates, record the conflicting nodes, and then merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph. After completing the merging of the matching nodes into the anchor nodes, all nodes in other graphs to be merged are added to the target graph according to their topological connection relationship with the matching nodes.

[0035] 2.6 Update the topological order coordinates of the target graph so that there are no topological order conflicts on all paths. Then further merge the mergeable nodes in the target graph based on the topological order coordinates.

[0036] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced by equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed in the present invention may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for constructing a directed acyclic pan-genome graph based on fragment topology, characterized in that: Here are the steps: S1. Given a target graph, take out the complete sequence to be added and generate a sequence path; S2, based on the weight of the graph node, perform anchor point search for the sequence path node in the target FTO-DAPG graph; S3. If the matching node set and the anchor node set obtained by the search are in a one-to-one correspondence, and the topology coordinates copied from the anchor node by the matching node do not conflict with the topology order in the sequence path, then the weighted initial matching node set-anchor node set automatically becomes the weighted final matching node set-anchor node set. For the case where the matching node set and the anchor node set are in a one-to-one correspondence but the topology coordinates copied from the anchor node by the matching node conflict with the topology order in the sequence path, or the case where multiple matching nodes correspond to the same anchor node, it is necessary to traverse the matching node set in the sequence path, group the nodes with continuously increasing topology coordinates into a group to form a node group list, and then use dynamic programming to calculate a node group sublist with a strictly increasing topology order and containing the largest number of nodes, and then delete the matching nodes that do not exist in the sublist and their corresponding anchor nodes in the target graph to obtain the weighted final anchor node-matching node pair set; S4, pre-assigning the topological coordinates of the non-matching nodes in the sequence path. If there is no topological coordinate conflict in the pre-assigned coordinates, proceed to step S5. If there is a topological coordinate conflict in the assigned coordinates, proceed to step S6. S5, traverse the sequence path nodes, search for the same sequence fragment for the non-matching node in the target FTO-DAPG graph, and use the node whose topological sequence coordinates are equal to the pre-assigned coordinates of the node as the anchor node. If the number of nodes found is greater than 1, select one of the nodes at random as the anchor point; S6, merge the matching nodes and the corresponding target FTO-DAPG anchor nodes, and add the non-matching nodes to the target graph according to their corresponding relationships with the matching nodes, complete the operation of adding the sequence path to the graph, and then maintain the topological sequence coordinates; S7, detecting possible groups of points with the same sequence fragments and the same coordinates in the graph, and merging them into one node; S8. Merge subgraphs constructed from subsets of sequences.

2. The method for constructing a directed acyclic pan-genome graph based on fragment topology according to claim 1, characterized in that: In step S1, the specific steps of generating the sequence path are as follows: The complete sequence is divided into L-k+1 sequence segments through a sliding window with a step size of 1 and a length of k, and each sequence segment is regarded as the sequence content of a node; The nodes formed by each sequence fragment are connected by edges in the direction of the sliding window, with the nth node pointing to the n+1th node.

3. The method for constructing a directed acyclic pan-genome graph based on fragment topology according to claim 1, characterized in that: In step S2, the specific steps of searching for anchor points of sequence path nodes based on the weights of graph nodes are as follows: For each node in the sequence path, search for the same graph node in the graph as the sequence fragment; If multiple nodes are found, the graph node with the largest weight is selected as the anchor node of the sequence path node, and the corresponding sequence path node is the matching node. If there are two or more nodes with the largest weight in the target graph for a sequence path node to be added, the anchor point search for the sequence path node is directly abandoned. After the anchor node search is completed, the topological sequence coordinates of the anchor node in the graph are copied to the corresponding matching node in the sequence path.

4. The method for constructing a directed acyclic pan-genome graph based on fragment topology according to claim 1, characterized in that: In step S6, the specific steps of maintaining the topology sequence coordinates are as follows: If a topological order conflict is found, the coordinate conflict point is recorded, and all conflict points and their descendant nodes are found in the merged target FTO-DAPG as the update range. Then, the conflict point is used as the traversal starting point, and a breadth-first traversal determined by the topological order is performed to update the coordinates of each node in the range.

5. The method for constructing a directed acyclic pan-genome graph based on fragment topology according to claim 1, characterized in that: In step S7, the specific steps of detecting possible groups of points with the same sequence fragments and coordinates in the graph and merging them into one node are as follows: Node groups with the same forward topological order coordinates and reverse topological order coordinates are repeatedly detected and merged until such node groups no longer exist in the graph. The reverse topological order coordinates are updated after the nodes with the same forward topological order coordinates are merged, and the forward topological order coordinates are updated after the nodes with the same reverse topological order coordinates are merged.

6. The method for constructing a directed acyclic pan-genome graph based on fragment topology according to claim 1, characterized in that: In step S8, the specific steps of merging the subgraphs constructed from the sequence subsets are as follows: Select one of the two FTO-DAPGs as the target graph and the other as the graph to be merged, and establish the backbone nodes in each graph; Search the target graph and the backbone nodes of the graph to be added to obtain the initial maximum weight anchor node and matching node pair respectively; If the initial anchor node set and the matching node set correspond one-to-one and there is no topological sequence coordinate conflict, the initial anchor node set and the matching node set are directly identified as the final anchor node set and the matching node set; then the topological sequence coordinates of the backbone nodes in the graph to be merged are pre-assigned; If the initial anchor node set and the matching node set correspond one-to-one but there is a topological order coordinate conflict, or the initial anchor node set and the matching node set do not correspond one-to-one, then the potential loop elimination algorithm is used to obtain the largest subset of the initial matching node set without topological order conflicts, and then the topological order coordinates of the backbone nodes in the graph to be merged are pre-assigned; If the pre-assigned coordinates have no topological order conflict, directly merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph; if the pre-assigned coordinates have a topological order conflict, record the conflicting nodes, and then merge the final matching node in the graph to be merged into the corresponding anchor node in the target graph; After the matching nodes are merged into the anchor nodes, all nodes in other to-be-merged graphs are added to the target graph according to their topological connection relationships with the matching nodes; The topological order coordinates of the target graph are updated so that there are no topological order conflicts on all paths, and then the mergeable nodes in the target graph are further merged based on the topological order coordinates.

Citation Information

Patent Citations

  • Nucleotide sequence assembly method and device

    CN104850761A

  • Sequence assembly method and system

    CN112786110A

  • Methods for the alignment of sequence reads to non-acyclic genome graphs on heterogeneous computing systems

    WO2023170091A1