A genome assembly method based on edge attention graph neural network

By explicitly modeling overlapping edge features and performing parallel beam search using an edge attention graph neural network model, the problems of insufficient information utilization and erroneous splicing in complex overlapping graphs in existing technologies are solved, and more efficient genome assembly is achieved.

CN123182773APending Publication Date: 2026-11-27YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611244778.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing genome assembly methods struggle to fully utilize candidate edge overlap information in complex overlapping graphs, are susceptible to spurious connections, and greedy path decoding is prone to getting trapped in local optima, leading to incorrect splicing.

Method used

We employ a method based on edge attention graph neural networks. By constructing an edge attention graph neural network model, we explicitly model overlapping edge features, use edge features to adjust the message passing of the graph neural network, and perform parallel beam search on the probabilistic overlapping graph to decode constrained paths.

Benefits of technology

It improves the utilization of edge overlap information, reduces the risk of misassembly caused by repetitive regions and sequencing errors, and improves the continuity of assembly and genome coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182773A_ABST
    Figure CN123182773A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence assisted genome assembly, and relates to a genome assembly method based on an edge attention graph neural network, which comprises the following steps: constructing an initial overlap graph based on sequencing read length data, and extracting node feature vectors and edge feature vectors of the initial overlap graph; constructing an edge attention graph neural network model, inputting the overlap graph containing the node feature vectors and the edge feature vectors corresponding to each directed edge into the edge attention graph neural network model, and obtaining edge probability scores of each directed edge; and based on the edge probability scores of each directed edge, performing parallel beam search path decoding on the initial overlap graph to obtain a continuous sequence of the genome. The application solves the problems that the existing genome assembly method is difficult to fully utilize candidate edge overlap information in a complex overlap graph, is easily interfered by false connections in a repeated region, and is prone to falling into a local optimum in a greedy path decoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence-assisted genome assembly technology, specifically a genome assembly method based on a side attention graph neural network. Background Technology

[0002] De novo genome assembly refers to the process of reconstructing the genome sequence of a target organism based on the overlap and sequence consistency relationships between sequencing reads, without relying on a reference genome of the target sample as a template. This process is one of the fundamental tasks of modern genomics and is widely used in new species genome construction, structural variation analysis, pan-genome research, and complex eukaryotic genome analysis. Typically, sequencing platforms generate a large number of nucleic acid reads, and assembly algorithms need to identify true adjacency relationships among these reads to organize them into a continuous sequence.

[0003] Existing de novo assembly algorithms can be broadly categorized into de Bruin graph methods and overlap-layout-consistency methods. De Bruin graph methods typically divide reads into fixed-length fragments and construct a graph structure based on prefix and suffix relationships between these fragments. This type of method has some applicability in short-read sequencing data, but read segmentation disrupts long-distance information and may introduce numerous graph branches in long repetitive regions and complex structural regions. Overlap-layout-consistency methods typically identify candidate overlap relationships through full-match read alignment, construct an overlap graph based on these relationships, and then output continuous sequences through graph simplification, path selection, and sequence consistency steps. With the development of long-read technologies such as PacBio high-fidelity sequencing and Oxford Nanopore Technologies ultra-long-read sequencing, read lengths can typically exceed 20 kilobases, and some reads can reach over 100 kilobases. Therefore, overlap-layout-consistency methods have significant application value in long-read assembly scenarios.

[0004] However, long read lengths cannot completely eliminate structural ambiguities in genome assembly. Genomes are rife with repetitive sequences, near-repetitive sequences, telomeres, centromeres, and other complex structural regions. These regions can create multi-branched, looped, tangled, or multiple candidate paths with similar local evidence in the overlap graph, making it difficult for assembly algorithms to robustly distinguish true genomic paths from spurious connections caused by sequencing errors, chimeric read lengths, or repetitive sequences. For large eukaryotic genomes, the overlap graph is extremely large, containing a large number of candidate edges. Relying solely on local topological rules, fixed thresholds, or single-step greedy path extension can easily lead to premature selection of a single path in complex repetitive regions, resulting in broken sequences, incorrect splicing, or decreased structural consistency.

[0005] In existing technologies, some assembly tools prune overlap graphs using empirical rules. For example, candidate edges can be removed based on information such as coverage depth, overlap length, read direction, local in-degree, and out-degree, or the extension direction with the highest local score can be selected from the graph. These methods offer advantages such as simple engineering implementation and high computational efficiency, but the rule parameters are often related to the complexity of the target species, sequencing depth, sequencing platform error distribution, and the initial overlap detection tool. When there are significant differences in the genome structure of a species or a high proportion of repetitive regions, fixed rules may struggle to simultaneously ensure assembly continuity, reference coverage, and gene integrity.

[0006] In recent years, graph neural networks (GNNs) have been introduced into assembly graph analysis. GNNs can learn representations of nodes and their neighborhood structures and can be used to predict the reliability of candidate edges in the assembly graph. Existing methods employ a node-centric message-passing paradigm, updating node representations through neighborhood aggregation and then inferring edge reliability based on node embeddings. While these methods can utilize some contextual information, edges themselves carry important structural information in genomic overlap graphs. For example, edges can represent the overlap length, sequence similarity, and connection direction between two reads, which directly relate to whether candidate connections likely correspond to real genomic adjacencies. If the model only treats edges as adjacencies, it may fail to fully utilize the biological and physical constraints contained in candidate overlapping edges.

[0007] Furthermore, existing learning-based assembly methods may still employ greedy or near-optimal single-step strategies during the path decoding stage. For fuzzy branches in an overlapping graph, if the confidence difference between the optimal and second-best branches is small, directly selecting the highest branch may lead to the risk of erroneously crossing overlapping regions. Conversely, if the algorithm can maintain multiple candidate paths simultaneously on the probabilistic graph and check read length consistency, overlap similarity stability, and direction consistency during the extension process, the impact of local path selection errors on the final assembly result can be reduced in some scenarios.

[0008] Therefore, a genome assembly scheme is needed that can explicitly model overlapping edge features, use edge features to regulate graph neural network message passing, output reliability probability scores for candidate edges, and perform constrained path decoding on probabilistic overlapping graphs through parallel beam search. Summary of the Invention

[0009] This invention provides a genome assembly method based on edge attention graph neural network to solve the problems of existing assembly methods, such as difficulty in fully utilizing candidate edge overlap information in complex overlapping graphs, susceptibility to interference from spurious connections in repetitive regions, and easy getting trapped in local optima in greedy path decoding.

[0010] The technical solution adopted in this invention is a genome assembly method based on a side attention graph neural network, comprising the following steps: S1: Construct an initial overlap graph based on sequencing read data, and extract the node feature vectors and edge feature vectors of the initial overlap graph; S2: Construct an edge attention graph neural network model. Input the initial overlapping graph containing the node feature vectors and the edge feature vectors corresponding to each directed edge into the edge attention graph neural network model to obtain the edge probability score p_uv of each directed edge. S3: Based on the edge probability scores of each directed edge, perform parallel beam search path decoding on the initial overlapping graph to obtain the continuous genome sequence.

[0011] Furthermore, S1 specifically involves: constructing an initial overlap graph based on sequencing read data. The initial overlap graph is a directed graph, where nodes represent sequencing read sequences and directed edges represent candidate overlap relationships between sequences. The node feature vector of each node and the edge feature vector of each directed edge in the initial overlap graph are extracted.

[0012] Furthermore, the specific steps of S2 are as follows: S2.1: Construct an edge attention graph neural network model, which includes a cascaded feature mapping module, an edge conditional convolution module, a gated attention aggregation module, and an MLP edge prediction module; The feature mapping module is used to map the input node feature vectors and edge feature vectors into initial hidden representations and edge condition vectors, respectively. The edge-conditional convolution module is used to modulate the basic message of the source node element by element using the edge-conditional vector to generate the actual message to be transmitted. The gating attention aggregation module is used to calculate the normalized gating attention weights of each source node and to perform weighted aggregation of the actual messages transmitted by each source node. The MLP edge prediction module is used to map the joint feature of the source node's final hidden representation, the target node's final hidden representation, and the edge conditional vector into an edge probability score. S2.2: Train the side attention graph neural network model to obtain the trained side attention graph neural network model; S2.3: Input the initial overlapping graph containing node feature vectors and edge feature vectors into the trained edge attention graph neural network model for inference to obtain the edge probability score of each directed edge.

[0013] Furthermore, the specific steps in S2.2 are as follows: S2.2.1: Using sequencing simulation tools, with chromosome-level reference genome as a template, one or more sequencing reads are generated independently for each chromosome to obtain a simulated sequencing read dataset, which is then divided into training set and validation set according to chromosome source; S2.2.2: For each sequencing read data in the training set and validation set, an overlap graph construction tool is used to generate an original overlap graph that only corrects sequencing errors. Then, a two-stage topology mapping algorithm is used to generate real labels for each candidate edge in the original overlap graph that only corrects sequencing errors, resulting in a set of labeled training overlap graphs. S2.2.3: Input the labeled training overlap graph into the edge attention graph neural network model, calculate the loss value using the chain symmetric focus loss function, and update the model parameters until the model converges.

[0014] Furthermore, in S2.2.2, a two-stage topology mapping algorithm is used to generate true labels for each candidate edge in the original overlapping graph that only corrects sequencing errors, resulting in a set of labeled training overlapping graphs. The specific steps are as follows: S2.2.2.1: Obtain the simulated sequencing read data and its corresponding mapping location information file, parse the file, and obtain the coordinates of each simulated sequencing read on the reference genome; S2.2.2.2: Obtain each directed edge in the original overlapping graph that only corrects sequencing errors as candidate edges. Using the coordinates of each simulated sequencing read on the reference genome, determine whether the nodes corresponding to any two simulated sequencing reads simultaneously meet the preset conditions. Mark the candidate edges that meet the conditions as candidate feasible edges to obtain a set of candidate feasible edges. The preset conditions are shown in equations (1) to (4): (1) in: This represents the chain direction of the read length corresponding to node A on the reference genome. This represents the chain direction of the read length corresponding to node B on the reference genome; (2) in: Let A be the termination coordinate of the read length corresponding to node A on the reference genome. The starting coordinates of the read length corresponding to node B on the reference genome; (3) in: This represents the starting coordinates of the read length corresponding to node A on the reference genome; (4) in: The termination coordinates of the read length corresponding to node B on the reference genome; S2.2.2.3: For each chromosome, a simulated read node containing the start site of the reference genome is used as the source node, and a simulated read node containing the end site of the reference genome is used as the terminal node. A bidirectional breadth-first search is used to simultaneously traverse the source node and the terminal node in both forward and backward directions. Candidate feasible edges covered by both traversals are assigned positive labels, and candidate feasible edges not covered by either traversal are assigned negative labels, resulting in a set of labeled training overlap graphs.

[0015] Furthermore, the specific steps in S2.3 are as follows: S2.3.1: Utilizing the multilayer perceptron in the feature mapping module For node feature vectors Perform mapping and generate nodes. Initial hidden representation at layer 0 Using edge multilayer perceptron opposite edge feature vector Perform mapping, via edge conditional activation function Process and generate directed edges edge condition vector ,in j As the source node, For the target node; S2.3.2: Initial hidden representation of the node Sum of edge condition vectors Input an edge-conditional convolutional module with multiple edge-conditional convolutional layers stacked sequentially, for the source node The current layer hidden representation is used to apply a learnable weight matrix and biases to generate the underlying message, utilizing the edge condition vector. The basic message is modulated element by element to generate the actual message to be transmitted. S2.3.3: Input the actual transmitted message into the gating attention aggregation module to calculate the unnormalized attention coefficients. With normalized gating attention weights; S2.3.4: The actual transmitted messages are weighted and aggregated using normalized gating attention weights to obtain the aggregation results of each attention head. The aggregation results of each attention head are concatenated and linearly mapped to obtain the aggregated node representation. S2.3.5: The aggregated node representation is residually connected to the hidden representation of the l-th layer node, and then processed by nonlinear activation function, random deactivation and layer normalization in sequence to obtain the final hidden representation of the (l+1)-th layer node; S2.3.6: Concatenate the final hidden representations of the source nodes and the target nodes of each directed edge, along with the corresponding edge condition vectors, and input them into the MLP edge prediction module to obtain the edge probability scores of each directed edge.

[0016] Furthermore, the specific steps of S3 are as follows: S3.1: Select multiple candidate edges with edge probability scores higher than the threshold in the initial overlapping graph, and use them as the starting seed edge and the ending seed edge respectively; perform a bundle search in the forward direction starting from each starting seed edge, and at the same time perform a bundle search in the reverse direction starting from each ending seed edge; when the forward search path and the reverse search path meet at the intermediate node, it is determined that the path is connected and is retained; after traversing all connected paths, select the path with the longest splicing sequence as the assembly path. S3.2: Let the bundle width be B, where the bundle width B represents the number of candidate paths retained after each round of expansion. For each candidate path in the current round, determine whether there are multiple candidate outgoing edges at the end node of the current candidate path. If so, treat each candidate outgoing edge as an independent expansion branch to generate the expanded candidate path set. S3.3: For each candidate path, calculate the cumulative score of the path using the edge probability score of each edge on the path, and sort all candidate paths according to the cumulative score, retaining the B candidate paths with the highest scores to enter the next round of expansion; S3.4: When a candidate path reaches a multi-branch intersection, calculate the confidence difference between the optimal branch and each candidate branch; if the confidence difference is less than a preset confidence difference threshold... δ If the candidate branch is identified as a fuzzy branch, a penalty will be imposed on the cumulative score of the branch, the current path will be terminated, or conservative pruning will be performed. S3.5: Perform feasibility constraint checks on candidate paths and eliminate candidate paths that violate any physical constraints; Physical constraints include: the overlap length of adjacent edges is less than the node sequence length; The overlap similarity of candidate edges is greater than the average overlap similarity of two adjacent candidate edges; The same node must not be used twice or more in the candidate path; There is no directional conflict between the forward path and the complementary reverse path; S3.6: When a candidate path meets any termination condition, terminate the iterative expansion of the candidate path, and splice the sequences corresponding to each node according to the overlap length and direction relationship between adjacent nodes in the candidate path to generate a continuous genome sequence. The termination condition is: The current candidate path has no candidate outgoing edges at its terminal node, therefore it is determined that it cannot be extended. If the same node appears repeatedly in the current candidate path, it is determined to be a region reuse. The current candidate path is determined to be a fuzzy branch and terminated in S3.4; The current candidate path violates any physical constraint in S3.5 and is therefore pruned.

[0017] The beneficial effects of this invention are: 1) This invention explicitly inputs the edge features such as the overlap length and overlap similarity of candidate edges in the overlapping graph into the edge attention graph neural network model, and adjusts the message passing between nodes through edge conditional convolution, so that the model can perform graph reasoning around the reliability of candidate overlap relationships. This method can improve the problem of insufficient utilization of edge overlap information when relying only on node center representation.

[0018] 2) This invention assigns normalized weights to different candidate connections in the local neighborhood of the target node through a gated attention mechanism, enabling edge features to participate in neighborhood information aggregation. In repetitive regions, chimeric read lengths, or multi-branch regions induced by sequencing errors, this mechanism can be used as a learning-based soft pruning method to reduce the impact of some unreliable candidate edges on node representation updates and edge prediction results.

[0019] 3) This invention uses a chain-symmetric focal loss function for model training, which can alleviate the impact of a large number of easily classified samples on training when the edge prediction samples are imbalanced, and constrain the prediction differences of paired edges or complementary edges, thereby improving the stability of edge reliability estimation.

[0020] 4) This invention employs parallel beam search instead of single-step greedy extension during the sequence reconstruction stage, simultaneously maintaining multiple candidate paths on the probabilistic overlap graph. When the confidence levels of multiple branches are close, conservative path termination or pruning can be performed through confidence difference thresholds and dynamic physical consistency checks, reducing the risk of erroneous splicing in some complex regions.

[0021] 5) In experiments on five datasets of varying complexity—Arabidopsis thaliana, red junglefowl, sandalwood, rice, and human CHM13—the Edge-Attention Graph Neural Network (EAGNN) model of this invention achieved good continuity metrics while maintaining high reference coverage and gene spatial integrity. In the Arabidopsis dataset, EAGNN had 54 contigs, an N50 of 12.7 Mb, and an NGA50 of 12.7 Mb; in the rice dataset, it had 43 contigs, an N50 of 30.9 Mb, and an NGA50 of 21.7 Mb; and in the human CHM13 dataset, it had 141 contigs, an N50 of 121.0 Mb, and an NGA50 of 49.6 Mb. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the side attention graph neural network model in this invention; Figure 2 This is a schematic diagram of the edge conditional convolution and gated attention aggregation process in the edge attention graph neural network model of this invention; Figure 3 This is a schematic diagram of the parallel beam search path decoding process constrained by biological consistency in this invention; Figure 4 This is a schematic diagram illustrating the process of constructing training data and generating edge labels for the edge attention graph neural network model in this invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] For ease of explanation, the genome overlap diagram is denoted as... ,in, For a set of nodes, Let be a set of directed edges. Genome overlap map; target node Each node A single read or a sequence of reads; Directed edge , For the source node Point to target node Candidate overlap relationships; target node The original node feature vector is ,in, For node feature dimensions, For the real number field; Directed edge The original edge feature vector is ,in, The edge feature dimension; The edge probability score is output by the edge attention graph neural network model. , used to represent directed edges The estimated probability corresponding to real biological adjacency relationships.

[0026] The genome assembly method based on side attention graph neural network proposed in this invention is carried out according to the following steps: S1: Construct an initial overlapping graph based on sequencing data, and extract the node feature vectors and edge feature vectors of the initial overlapping graph; In a specific embodiment of this application, S1 specifically involves: constructing an initial overlap graph based on sequencing read data. The initial overlap graph is a directed graph, where nodes represent sequencing read sequences and directed edges represent candidate overlap relationships between sequences. The node feature vector of each node and the edge feature vector of each directed edge in the initial overlap graph are extracted. Node feature vectors Information includes three dimensions: sequence length, coverage, and node metric, as well as edge features. The vector includes overlap length and overlap similarity, where overlap length represents the source node. With the target node The length of the overlap region and the overlap similarity are compared along the candidate connection directions. The degree of consistency of the overlapping regions is shown in equation (1): (1) in: For overlap similarity, The length of the overlapping region corresponding to the candidate edge. This represents the edit distance between two sequences within the overlapping region.

[0027] Equation (1) represents the proportion of the overlap length after deducting the editing difference. The higher the value, the more similar the two sequences are in the overlapping region. The overlap similarity is used by the model to determine whether the candidate edge is more likely to correspond to the real genomic adjacency relationship.

[0028] S2: Construct an edge attention graph neural network model. Input the overlapping graph, which contains the node feature vectors and the edge feature vectors corresponding to each directed edge, into the edge attention graph neural network model to obtain the edge probability scores of each directed edge in the initial overlapping graph. ; S2.1: Construct a side attention graph neural network model, which includes a cascaded feature mapping module, a side conditional convolution module, a gated attention aggregation module, and an MLP side prediction module. Figure 1 This is a schematic diagram of the side attention graph neural network model of the present invention, showing the connection relationship between each module and the data flow; S2.2: Train the side attention graph neural network model to obtain the trained side attention graph neural network model; In the specific implementation of this application, step S2.2 is as follows: S2.2.1: Using sequencing simulation tools, with chromosome-level reference genome as a template, one or more sequencing reads are generated independently for each chromosome to obtain a simulated sequencing read dataset, which is then divided into training set and validation set according to chromosome source; During the model training phase, the PBSIM3 tool (a simulator for all types of PacBio and ONTlong reads) was used to simulate and generate PacBio HiFi reads based on the complete telomere-to-telomere reference genome of the human HG002 sample from the Genomeina Bottle consortium. Different chromosomes were then divided into training and validation sets to reduce homologous region leakage between training and validation data. Each chromosome data could be further used to generate one or more independent sequencing repeats, thus forming an overlap graph set for model training and validation.

[0029] S2.2.2: For each sequencing read length in the training and validation sets, an overlap graph construction tool is used to generate an original overlap graph that only corrects sequencing errors. Then, a two-stage topology mapping algorithm is used to generate ground truth labels for each candidate edge in the original overlap graph that only corrects sequencing errors, resulting in a set of labeled training overlap graphs. Figure 4 This is a schematic diagram illustrating the training data construction and edge label generation process of this invention; In the specific implementation of this application, firstly, taking the human reference genome as an example, 23 chromosomes are extracted as independent reference sequence files (fa files). Then, PBSIM3 is used to perform sequencing simulation on the fa file of each chromosome to generate corresponding simulated sequencing data (fq file). At the same time, PBSIM3 also outputs MAF files to describe the precise alignment position of each simulated read on the reference sequence.

[0030] Based on this, for each chromosome data in the training and validation sets, one or more independent sequencing repeats are performed to obtain independent sequencing repeat data for each chromosome. Then, for each independent sequencing repeat data, an original overlap map with only sequencing errors corrected is generated using an overlap map construction tool.

[0031] This invention uses the original overlapping graph with only sequencing errors corrected during the training phase. This is because the original overlapping graph with only sequencing errors corrected retains more candidate connections and can more fully represent the topological ambiguity caused by repetitive regions, sequencing errors, and chimeric read lengths. If candidate edges are deleted too early during the training phase, the model will have difficulty effectively learning the difference between real and false edges in complex graph structures.

[0032] In S2.2.2, a two-stage topology mapping algorithm is used to generate true labels for each candidate edge in the original overlapping graph that only corrects sequencing errors, resulting in a set of labeled training overlapping graphs. The specific steps are as follows: S2.2.2.1: Obtain the simulated sequencing read data and its corresponding mapping location information file, parse the file, and obtain the coordinates of each simulated sequencing read on the reference genome; S2.2.2.2: Obtain each directed edge in the original overlapping graph that only corrects sequencing errors as candidate edges. Using the coordinates of each simulated sequencing read on the reference genome, determine whether the nodes corresponding to any two simulated sequencing reads simultaneously meet the preset conditions. Mark the candidate edges that meet the conditions as candidate feasible edges to obtain a set of candidate feasible edges. The preset conditions are: (2) in: This represents the chain direction of the read length corresponding to node A on the reference genome. This represents the chain direction of the read length corresponding to node B on the reference genome.

[0033] (3) in: Let A be the termination coordinate of the read length corresponding to node A on the reference genome. The starting coordinates of the read length corresponding to node B on the reference genome.

[0034] (4) in: Let be the starting coordinates of the read length corresponding to node A on the reference genome.

[0035] (5) in: The termination coordinates of the read length corresponding to node B on the reference genome.

[0036] The above constraint means that the two reads are located in the same chain direction and form a local positional relationship on the reference coordinates that conforms to the candidate overlap direction.

[0037] Since local coordinate relationships may be formally valid in repeated regions, but may not necessarily belong to globally feasible assembly paths, structural consistency assessment is still required.

[0038] S2.2.2.3: For each chromosome, a simulated read node containing the start site of the reference genome is used as the source node, and a simulated read node containing the end site of the reference genome is used as the terminal node. A bidirectional breadth-first search is used to simultaneously traverse the source node and the terminal node in both forward and backward directions. Candidate feasible edges covered by both traversals are assigned positive labels, and candidate feasible edges not covered by either traversal are assigned negative labels, resulting in a set of labeled training overlap graphs.

[0039] S2.2.3: Input the labeled training overlap graph into the edge attention graph neural network model, calculate the loss value using the chain symmetric focus loss function, and update the model parameters until the model converges.

[0040] In the specific implementation of this application, edge prediction tasks often suffer from class imbalance, with a significant difference between the number of positive and negative samples, and some candidate edges are repeated regions that are difficult to distinguish. To improve training stability, a chain-symmetric focus loss function can be used as shown in equation (6): (6) in: For symmetric focus loss function, As candidate edges, Candidate edges Virtual paired edges or complementary corresponding edges, For the model to select candidate edges The output predicted probability, For the model to select candidate edges The output predicted probability, Candidate edges Category weights, for Class weights of virtual paired edges or complementary corresponding edges. and A real number between (0, 1) and satisfies , As the focus parameter, It is a real number greater than 0, preferably 1.0 or 2.0. Candidate edges The logical output, for Logical output of virtual paired edges or complementary corresponding edges. The labels for the candidate edges. for Labels for virtual paired edges or complementary corresponding edges. It is the natural logarithm. Absolute value The difference penalty coefficient is preferably 0.1 or 0.5, but the specific value needs to be determined through parameter tuning. Excessive constraints on model flexibility If the value is too small, topological consistency cannot be effectively guaranteed.

[0041] The chain-symmetric focus loss function is shown in equation (6). The first two terms are focus loss terms, used to reduce the dominant influence of a large number of easily classified samples on the gradient. The third term is a pairwise logistic output difference penalty term, used to constrain the prediction consistency of complementary directions or paired edges. In actual optimization, the chain-symmetric focus loss function can be minimized so that the model simultaneously focuses on the classification of difficult edges and topological consistency. This loss function is used to alleviate class imbalance in the edge prediction task and to impose constraints on the logistic output difference of complementary directions or paired edges, so that the model maintains topological consistency in the double-stranded DNA (DeoxyriboNucleic Acid) correspondence. S2.3: Include node feature vectors With edge feature vectors The initial overlapping graph is used as input to train the edge attention graph neural network model for inference, and the edge probability score of each directed edge is obtained. ; In a specific embodiment of this application, the specific steps of S2.3 are as follows: S2.3.1: Utilizing the multilayer perceptron in the feature mapping module For node feature vectors Perform mapping and generate nodes. Initial hidden representation at layer 0 , ,in, For the real number field, Let the hidden layer dimension be , as shown in equation (7): (7) in: For the target node The hidden representation at layer 0 (initial layer), For node multilayer perceptron, For the target node The node feature vectors.

[0042] In a specific embodiment of the present invention, the hidden layer dimension Usually, the power of 2 is taken, such as 8, 16, 32, 64.

[0043] Using edge multilayer perceptron opposite edge feature vector Perform mapping, via edge conditional activation function Process and generate directed edges edge condition vector , As shown in equation (8): (8) in: Let be the edge condition vector. Let be the edge activation function. It is an edge-multilayer perceptron.

[0044] Edge condition vector It is generated from edge features and shared or reused in subsequent inference layers to modulate messages between nodes.

[0045] S2.3.2: Initial hidden representation of the node Sum of edge condition vectors The input is a side-conditional convolutional module with multiple side-conditional convolutional layers stacked sequentially. Layer In each channel, for the source node The current layer hidden representation is used to apply a learnable weight matrix and biases to generate the underlying message, utilizing the edge condition vector. The basic message is modulated element by element to generate the actual message to be transmitted. As shown in equations (9) and (10): (9) in: In the first Layer nodes The hidden representation is , In the first The first in the layer The learnable weight matrix for each channel is as follows: , In the first The first in the layer Learnable bias for each channel For nodes In the Layer, First The basic messages for each channel.

[0046] (10) in: Hademaji, With the Each channel corresponds to an edge condition vector component or sub-vector. For the first Layer From the node in each channel Transmit to node Modulated messages.

[0047] Through this design, the same source node will generate different messages when facing different candidate overlapping edges. The model can dynamically adjust the information propagation based on the equilateral features of overlap length and overlap similarity.

[0048] To selectively reduce the impact of spurious connections within a local neighborhood, this invention further employs a gated attention mechanism for nodes. Its neighborhood is denoted as , indicating that all directed edges exist. The set of source nodes in the graph neural network model Layer In each channel, the model uses the current hidden representation of the target node. The current hidden representation of the source node and edge condition vector The data is concatenated and a learnable attention vector is utilized. The unnormalized attention coefficients are calculated using the LeakyReLU activation function. .

[0049] S2.3.3: The first Layer The actual transmitted message, modulated by edge features in each channel, is input into the gating attention aggregation module for the target node. Its local incoming neighbor set N ( i Within ) the current hidden representation of the target node The current hidden representation of the source node and edge condition vector The data is concatenated and a learnable attention vector is utilized. The unnormalized attention coefficients are calculated using the LeakyReLU activation function. As shown in equation (11): (11) in: In the first Layer There are directed edges in the channel The unnormalized attention coefficient, For a linear unit function with leakage correction, For the first Transpose of the learnable attention vector for each channel For the target node In the The current hidden representation of the layer, For the source node In the The current hidden representation of the layer, This involves concatenating vectors.

[0050] For the target node All incoming neighbors are normalized; incoming neighbors are all nodes with directed edges pointing to the target node. i source node j The set yields directed edges. In the Layer The normalized gating attention weights in each channel are shown in Equation (12): (12) in, Directed edge In the Layer The normalized gating attention weights in each channel reflect the source node's... Along the edge To the target node The relative importance when transmitting information For summation index variables, ) is the target node i The set of neighbors, For network layer indexing, It is an exponential function. For the first l Layer k Summation index variable in each channel The indicated source node to the target node i The unnormalized attention coefficient.

[0051] S2.3.4: The actual transmitted messages are weighted and aggregated using normalized gating attention weights to obtain the aggregation results of each attention head. The aggregation results of each attention head are concatenated and linearly mapped to obtain the aggregated node representation. Specifically, Figure 2 This is a schematic diagram of the edge-conditional convolution and gated attention aggregation process in the edge-attention graph neural network of this invention. Since the calculation of the normalized gated attention weights explicitly includes the edge conditional vector... This allows features such as overlap length and overlap similarity to participate in neighborhood information selection and weighting. After obtaining attention weights, the model aggregates the messages from each source node in the neighborhood after edge condition vector modulation, and then concatenates the aggregation results from each channel through a multi-channel mechanism to obtain the aggregated node representation. As shown in equation (13): (13) in, For nodes In the The node representation after layer aggregation without residual normalization. For channel splicing, For the number of channels, For channel indexing, For all existing directed edges point to The set of source nodes, For normalized gating attention weights.

[0052] This multi-channel aggregation method can capture reliability information of candidate connections from different representation subspaces.

[0053] S2.3.5: Combine the aggregated node representation with the first... l The hidden representations of the layer nodes are subjected to residual connections, and then sequentially processed by nonlinear activation functions, random deactivation, and layer normalization to obtain the th layer. l The final hidden representation of the +1 layer node is calculated as shown in equation (14): (14) in: For nodes In the The final hidden representation of the layer, For layer normalization, For nodes In the Hidden representation of layers, Indicates the first Learnable factors for layer residual updates For random inactivation, Represents a nonlinear activation function

[0054] S2.3.6: Concatenate the final hidden representations of the source nodes and the target nodes of each directed edge, along with the corresponding edge condition vectors, and input them into the MLP edge prediction module to obtain the edge probability scores of each directed edge.

[0055] For ease of explanation, the directed edges will be used in the edge prediction phase. Recorded as ,in, Indicates the source node, Represents the target node, for directed edges First, the source node go through L The final layer representation of the source node after layer propagation Target node Final layer representation and the edge condition vector corresponding to that edge. Perform vector concatenation to obtain the joint feature vector. As shown in equation (15) (15) in: For joint feature vectors, For the source node go through L The final layer representation after layer propagation. For the target node The final layer representation, This is a vector concatenation symbol. Let be the edge condition vector. This represents the total number of layers in the edge attention graph neural network model.

[0056] Joint feature vectors The input edge prediction module undergoes a nonlinear transformation, and then the output is compressed to the (0,1) interval by the Sigmoid activation function to obtain the edge probability score. As shown in equation (16): (16) in: For edge prediction multilayer perceptron, For the Sigmoid function, edge probability fraction Represents a directed edge The estimated probability of being retained in the final assembly path or corresponding to a real genomic adjacency is then used as heuristic guidance information for the path decoding stage.

[0057] S3: Based on edge probability scores Parallel beam search path decoding is performed on the initial overlap map to obtain a continuous genome sequence.

[0058] Figure 3 This is a schematic diagram of the parallel beam search path decoding process of the present invention. In a specific embodiment of this application, step S3 is as follows: S3.1: Select multiple candidate edges with edge probability scores higher than the threshold in the initial overlapping graph as the starting seed edge and the ending seed edge, respectively; perform a bundle search in the forward direction starting from each starting seed edge, and simultaneously perform a bundle search in the reverse direction starting from each ending seed edge; when the forward search path and the reverse search path meet at the intermediate node, it is determined that the path is connected and is retained; after traversing all connected paths, select the path with the longest splicing sequence as the final assembly path. After inference via the edge attention graph neural network, each candidate edge has an edge probability score. Sequence reconstruction can be viewed as a structured inference problem on a probabilistic overlap graph, i.e., finding a set of candidate trajectories that correspond to the real genome path. Since the overlap graph of a multi-base-scale eukaryotic genome is usually extremely large, it is difficult to obtain acceptable time and space costs in practice using deterministic global algorithms such as dynamic programming. Therefore, this invention adopts parallel beam search as an approximate inference method.

[0059] S3.2: Let the bundle width be B, where the bundle width B represents the number of candidate paths retained after each round of expansion. For each candidate path in the current round, determine whether there are multiple candidate outgoing edges at the end node of the current candidate path. If so, treat each candidate outgoing edge as an independent expansion branch to generate the expanded candidate path set. Where B is a positive integer, preferably 1.

[0060] S3.3: For each candidate path, calculate the cumulative score of the path based on the edge probability scores of each edge on the path, as shown in Equation (17), and sort all candidate paths according to the cumulative score, retaining the one with the highest score. B The candidate paths are expanded to the next round. This process allows the algorithm to track multiple candidate trajectories simultaneously when local evidence is insufficient, rather than immediately adopting a single highest-scoring edge.

[0061]

[0062] in: Indicate candidate path The cumulative score, As a candidate path, For additional parameters, To avoid taking the logarithm of zero, the smallest positive number set is preferably 0.001.

[0063] S3.4: When a candidate path reaches a multi-branch intersection, the branch with the highest score is taken as the optimal branch, and the remaining branches are taken as candidate branches. The confidence difference between the optimal branch and each candidate branch is calculated as shown in Equation (18). Candidate branches with confidence differences less than the preset confidence difference threshold δ are judged as fuzzy branches. If the cumulative score of the fuzzy branch is less than 0.3, conservative pruning is performed. If the cumulative score of the fuzzy branch is greater than 0.3, a penalty value is applied to the cumulative score to obtain the updated cumulative score of the fuzzy branch and the search of the path where the fuzzy branch is located is terminated. Δp = p best p candidate (18) in: Δp For confidence level differences,p best The confidence score of the current best branch. p candidate The confidence score of the candidate branch.

[0064] S3.5: Perform multi-dimensional feasibility constraint checks on candidate paths and eliminate candidate paths that violate any physical constraint; Physical constraints include: the overlap length of adjacent edges is less than the node sequence length; The overlap similarity of candidate edges is greater than the average overlap similarity of two adjacent candidate edges; The same node must not be used twice or more in the candidate path; There is no directional conflict between the forward path and the complementary reverse path; S3.6: When a candidate path meets any termination condition, terminate the iterative expansion of the candidate path, and splice the sequences corresponding to each node according to the overlap length and direction relationship between adjacent nodes in the candidate path to generate a continuous genome sequence. The termination condition is: The current candidate path has no candidate outgoing edges at its terminal node, therefore it is determined that it cannot be extended. If the same node appears repeatedly in the current candidate path, it is determined to be a region reuse. The current candidate path is determined to be a fuzzy branch and terminated in S3.4; The current candidate path violates any physical constraint in S3.5 and is therefore pruned.

[0065] In some embodiments, path decoding can be formalized as an approximate maximum a posteriori inference problem on a probabilistic graph. Since large eukaryotic genome overlap graphs are quite large, deterministic global routing is difficult to execute under practical time and space constraints. Therefore, a highly parallelized and biologically constrained bundle search is employed as an approximate inference method. This method does not require an exhaustive search of all possible paths, but rather retains candidate paths within a preset bundle width in each round of expansion, thus achieving a balance between computational feasibility and path quality.

[0066] To verify the effectiveness and universality of the proposed genome assembly method based on edge attention graph neural network (EAGNN), five representative genome datasets of varying complexity—Arabidopsis thaliana, red junglefowl, sandalwood, rice, and human CHM13—were used for testing. The method was compared with mainstream long-read assembly tools and related methods such as hifiasm, Canu, Verkko, NextDenovo, and Flye. The QUAST tool was used to evaluate the continuity of the assembled structure, the BUSCO tool to evaluate gene spatial integrity, and the yak tool to evaluate base-level accuracy. During training, stochastic gradient descent, Adam (Adaptive Moment Estimation), or AdamW (Adam with Decoupled Weight Decay) optimizers were used to update the model parameters. In one specific experiment, training was performed on an NVIDIA H100 80GB graphics processor, and the final model weights were obtained in approximately 44 hours. After training, the model weights are saved as a pre-trained EAGNN (Edge-Attention Graph Neural Network) model for use in the inference stage with subsequent real or evaluation data. In addition, since the original overlapping graph is large in scale, the inference stage can be performed on the central processing unit to process complete chromosome or whole genome graphs.

[0067] In the Arabidopsis dataset, EAGNN output 54 contigs, with a maximum contig length of 22.9 Mb and a total length of 142.0 Mb, achieving a reference coverage of approximately 99.98%. In contrast, the state-of-the-art genome assembly tool hifiasm generated 1823 contigs, with a maximum contig length of 22.9 Mb and a total length of 202.3 Mb, also achieving a reference coverage of 99.98%, while the Arabidopsis reference genome size was 133.7 Mb. These results demonstrate that on this dataset, EAGNN can reduce assembly fragmentation while maintaining high reference coverage.

[0068] In the sandalwood dataset, EAGNN outputs 108 contigs, with a maximum contig length of 34.5 Mb, a total length of 450.9 Mb, an N50 of 8.8 Mb, an NG50 of 15.6 Mb, an NGA50 of 6.2 Mb, and a reference coverage of approximately 99.961%. These results demonstrate that, in complex plant genome scenarios, EAGNN can maintain a good balance between continuity and reference coverage.

[0069] In the rice dataset, EAGNN outputs 43 contigs, with an N50 of 30.9 Mb, an NGA50 of 21.7 Mb, and a reference coverage of approximately 99.840%. While most high-level methods on this dataset perform similarly, EAGNN still achieves a lower contig count while maintaining a higher reference coverage.

[0070] In the human CHM13 dataset, EAGNN outputs 141 contigs with a total length of 3066.2 Mb, an N50 of 121.0 Mb, an NG50 of 121.0 Mb, and an NGA50 of 49.6 Mb, resulting in a reference coverage of approximately 99.739%. This dataset is used to demonstrate the scalability of the method in large and complex eukaryotic genomes. Experimental results show that EAGNN achieves comparable continuity to mainstream long-read assembly tools on this dataset while maintaining high reference coverage.

[0071] In the BUSCO evaluation, all methods achieved high gene integrity overall. On the CHM13 dataset, EAGNN and Canu both achieved 100.0% integrity. On the Arabidopsis and chicken datasets, EAGNN achieved 99.0% and 99.4%, respectively; on the rice and sandalwood datasets, EAGNN achieved 97.8% and 99.2%, respectively. These results indicate that under the evaluation conditions, EAGNN did not show a significant sacrifice in the integrity of conserved single-copy genes when improving structural continuity.

[0072] To further verify the advanced nature and effectiveness of the edge attention graph neural network (EAGNN) designed in this invention, a comparative experiment was conducted with three classic node-centric graph neural network structures: GAT, GCN, and GraphSAGE. NGA50 was used as the core evaluation index for assembly path resolution capability and continuous sequence generation quality. Experimental results show that in the human CHM13 dataset, the NGA50 values ​​for GAT, GCN, and GraphSAGE are 40.42 Mb, 36.00 Mb, and 44.32 Mb, respectively, while the NGA50 value for EAGNN is 49.65 Mb. In the Arabidopsis and rice datasets, the NGA50 values ​​for EAGNN are 12.75 Mb and 21.68 Mb, respectively. This comparison demonstrates that explicitly using edge features for message modulation and gated attention aggregation can improve the path resolution continuity relative to the node-centric baseline model under these experimental conditions.

[0073] To verify the effectiveness of the proposed chain-symmetric focal loss function, the loss functions were replaced with the binary cross-entropy loss function and the focal loss function, respectively. Using NGA50 as the evaluation metric, the NGA50 values ​​for the chain-symmetric focal loss function, the binary cross-entropy loss function, and the focal loss function were 12.7 Mb, 9.5 Mb, and 8.7 Mb, respectively, on the Arabidopsis dataset. Regarding the final number of contigs, the chain-symmetric focal loss function, the binary cross-entropy loss function, and the focal loss function achieved 85, 93, and 100, respectively, on the Pumpkin dataset. This comparison demonstrates that the proposed chain-symmetric focal loss function significantly improves upon the ordinary binary cross-entropy loss function and the focal loss function in reducing fragmentation and enhancing assembly continuity.

[0074] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0075] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A genome assembly method based on a side attention graph neural network, characterized in that, Includes the following steps: S1: Construct an initial overlapping graph based on sequencing read data, and extract the node feature vectors and edge feature vectors of the initial overlapping graph; S2: Construct an edge attention graph neural network model. Input the initial overlapping graph, which contains the node feature vectors and the edge feature vectors corresponding to each directed edge, into the edge attention graph neural network model to obtain the edge probability score of each directed edge. ; S3: Based on the edge probability scores of each directed edge, perform parallel beam search path decoding on the initial overlapping graph to obtain the continuous genome sequence.

2. The genome assembly method based on a side attention graph neural network according to claim 1, characterized in that, S1 specifically involves: constructing an initial overlap graph based on sequencing read data. The initial overlap graph is a directed graph, where nodes represent sequencing read sequences and directed edges represent candidate overlap relationships between sequences. The node feature vector of each node and the edge feature vector of each directed edge in the initial overlap graph are extracted.

3. The genome assembly method based on a side attention graph neural network according to claim 1, characterized in that, The specific steps for S2 are as follows: S2.1: Construct an edge attention graph neural network model, which includes a cascaded feature mapping module, an edge conditional convolution module, a gated attention aggregation module, and an MLP edge prediction module; The feature mapping module is used to map the input node feature vectors and edge feature vectors into initial hidden representations and edge condition vectors, respectively. The edge-conditional convolution module is used to modulate the basic message of the source node element by element using the edge-conditional vector to generate the actual message to be transmitted. The gating attention aggregation module is used to calculate the normalized gating attention weights of each source node and to perform weighted aggregation of the actual messages transmitted by each source node. The MLP edge prediction module is used to map the joint feature of the source node's final hidden representation, the target node's final hidden representation, and the edge conditional vector into an edge probability score. S2.2: Train the side attention graph neural network model to obtain the trained side attention graph neural network model; S2.3: Input the initial overlapping graph containing node feature vectors and edge feature vectors into the trained edge attention graph neural network model for inference to obtain the edge probability score of each directed edge.

4. The genome assembly method based on a side attention graph neural network according to claim 3, characterized in that, The specific steps in S2.2 are as follows: S2.2.1: Using sequencing simulation tools, with chromosome-level reference genome as a template, one or more sequencing reads are generated independently for each chromosome to obtain a simulated sequencing read dataset, which is then divided into training set and validation set according to chromosome source; S2.2.2: For each sequencing read data in the training set and validation set, an overlap graph construction tool is used to generate an original overlap graph that only corrects sequencing errors. Then, a two-stage topology mapping algorithm is used to generate real labels for each candidate edge in the original overlap graph that only corrects sequencing errors, resulting in a set of labeled training overlap graphs. S2.2.3: Input the labeled training overlap graph into the edge attention graph neural network model, calculate the loss value using the chain symmetric focus loss function, and update the model parameters until the model converges.

5. The genome assembly method based on a side attention graph neural network according to claim 4, characterized in that, In S2.2.2, a two-stage topology mapping algorithm is used to generate true labels for each candidate edge in the original overlapping graph that only corrects sequencing errors, resulting in a set of labeled training overlapping graphs. The specific steps are as follows: S2.2.2.1: Obtain the simulated sequencing read data and its corresponding mapping location information file, parse the file, and obtain the coordinates of each simulated sequencing read on the reference genome; S2.2.2.2: Obtain each directed edge in the original overlapping graph that only corrects sequencing errors as candidate edges. Using the coordinates of each simulated sequencing read on the reference genome, determine whether the nodes corresponding to any two simulated sequencing reads simultaneously meet the preset conditions. Mark the candidate edges that meet the conditions as candidate feasible edges to obtain a set of candidate feasible edges. The preset conditions are shown in equations (1) to (4): (1) in: This represents the chain direction of the read length corresponding to node A on the reference genome. This represents the chain direction of the read length corresponding to node B on the reference genome; (2) in: Let A be the termination coordinate of the read length corresponding to node A on the reference genome. The starting coordinates of the read length corresponding to node B on the reference genome; (3) in: This represents the starting coordinates of the read length corresponding to node A on the reference genome; (4) in: The termination coordinates of the read length corresponding to node B on the reference genome; S2.2.2.3: For each chromosome, a simulated read node containing the start site of the reference genome is used as the source node, and a simulated read node containing the end site of the reference genome is used as the terminal node. A bidirectional breadth-first search is used to simultaneously traverse the source node and the terminal node in both forward and backward directions. Candidate feasible edges covered by both traversals are assigned positive labels, and candidate feasible edges not covered by either traversal are assigned negative labels, resulting in a set of labeled training overlap graphs.

6. The genome assembly method based on a side attention graph neural network according to claim 3, characterized in that, The specific steps in S2.3 are as follows: S2.3.1: Utilizing the multilayer perceptron in the feature mapping module For node feature vectors Perform mapping and generate nodes. Initial hidden representation at layer 0 Using edge multilayer perceptron opposite edge feature vector Perform mapping, via edge condition activation function Process and generate directed edges edge condition vector ,in j As the source node, For the target node; S2.3.2: Initial hidden representation of the node Sum of edge condition vectors Input an edge-conditional convolutional module with multiple edge-conditional convolutional layers stacked sequentially, for the source node The current layer hidden representation is used to apply a learnable weight matrix and biases to generate the underlying message, utilizing the edge condition vector. The basic message is modulated element by element to generate the actual message to be transmitted. S2.3.3: Input the actual transmitted message into the gating attention aggregation module to calculate the unnormalized attention coefficients. With normalized gating attention weights; S2.3.4: The actual transmitted messages are weighted and aggregated using normalized gating attention weights to obtain the aggregation results of each attention head. The aggregation results of each attention head are concatenated and linearly mapped to obtain the aggregated node representation. S2.3.5: The aggregated node representation is residually connected to the hidden representation of the l-th layer node, and then processed by nonlinear activation function, random deactivation and layer normalization in sequence to obtain the final hidden representation of the (l+1)-th layer node; S2.3.6: Concatenate the final hidden representations of the source nodes and the target nodes of each directed edge, along with the corresponding edge condition vectors, and input them into the MLP edge prediction module to obtain the edge probability scores of each directed edge.

7. The genome assembly method based on a side attention graph neural network according to claim 1, characterized in that, The specific steps for S3 are as follows: S3.1: Select multiple candidate edges with edge probability scores higher than the threshold in the initial overlapping graph, and use them as the starting seed edge and the ending seed edge respectively; perform a bundle search in the forward direction starting from each starting seed edge, and at the same time perform a bundle search in the reverse direction starting from each ending seed edge; when the forward search path and the reverse search path meet at the intermediate node, it is determined that the path is connected and is retained; after traversing all connected paths, select the path with the longest splicing sequence as the assembly path. S3.2: Let the bundle width be B, where the bundle width B represents the number of candidate paths retained after each round of expansion. For each candidate path in the current round, determine whether there are multiple candidate outgoing edges at the end node of the current candidate path. If so, treat each candidate outgoing edge as an independent expansion branch to generate the expanded candidate path set. S3.3: For each candidate path, calculate the cumulative score of the path using the edge probability score of each edge on the path, and sort all candidate paths according to the cumulative score, retaining the B candidate paths with the highest scores to enter the next round of expansion; S3.4: When a candidate path reaches a multi-branch intersection, calculate the confidence difference between the optimal branch and each candidate branch; if the confidence difference is less than a preset confidence difference threshold... δ If the candidate branch is identified as a fuzzy branch, a penalty will be imposed on the cumulative score of the branch, the current path will be terminated, or conservative pruning will be performed. S3.5: Perform feasibility constraint checks on candidate paths and eliminate candidate paths that violate any physical constraints; Physical constraints include: the overlap length of adjacent edges is less than the node sequence length; The overlap similarity of candidate edges is greater than the average overlap similarity of two adjacent candidate edges; The same node must not be used twice or more in the candidate path; There is no directional conflict between the forward path and the complementary reverse path; S3.6: When a candidate path meets any termination condition, terminate the iterative expansion of the candidate path, and splice the sequences corresponding to each node according to the overlap length and direction relationship between adjacent nodes in the candidate path to generate a continuous genome sequence. The termination condition is: The current candidate path has no candidate outgoing edges at its terminal node, therefore it is determined that it cannot be extended. If the same node appears repeatedly in the current candidate path, it is determined to be a region reuse. The current candidate path is determined to be a fuzzy branch and terminated in S3.4; The current candidate path violates any physical constraint in S3.5 and is therefore pruned.