Genome assembly method, genome assembly device, storage medium and equipment

By transforming the genome assembly problem into a combinatorial optimization model and using variable quantum algorithms, the problem of excessive computing resource consumption in high-throughput gene sequencing is solved, and more efficient genome assembly path solving is achieved.

CN117457067BActive Publication Date: 2025-01-14SHENZHEN SPINQ TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310267687.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2025-01-14
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

The computing resources consume huge amounts in high-throughput gene sequencing, exceeding the limits of classical computers, resulting in problems of computational complexity and resource consumption.

Method used

The genome assembly problem is transformed into a combination optimization model, further transformed into the optimal eigenvalue solution problem of Hamiltonian, and the solution is used to solve it using variable component quantum algorithm to obtain the optimal assembly path through the superposition and entanglement of quantum.

Benefits of technology

It effectively reduces the consumption of computing resources, improves computing power, solves the problem of excessive computing resources in high-throughput gene sequencing, and optimizes the genome assembly process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117457067B_ABST
    Figure CN117457067B_ABST
Patent Text Reader

Abstract

The present invention discloses a genome assembly method, a genome assembly device, a storage medium and a computer device. The genome assembly method comprises: constructing a directed cyclic graph according to the genome to be sequenced; constructing an unconstrained objective function of a combinatorial optimization problem according to the directed cyclic graph; constructing a Hamiltonian according to the unconstrained objective function; obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm; and obtaining the optimal assembly path in the directed cyclic graph according to the optimal eigenstate. The method makes full use of the superposition and entanglement of quantum, which is conducive to solving the problem of excessive consumption of computing resources in the process of high-throughput gene sequencing. At the same time, the method fully considers the situation of repeated gene fragments, which is conducive to solving the thorny problem that the genome assembly cannot be performed correctly due to the presence of repeated gene fragments in actual operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of gene sequencing, and specifically, relates to a genome assembly method, a genome assembly device, a computer-readable storage medium and a computer device. Background Art

[0002] Genome sequencing is one of the most important technologies in the development of human society. Since the length of the genome sequence that can be sequenced by current sequencing technology and sequencing instruments is much smaller than the actual genome length, the actual genome is often randomly cut into fragments of appropriate size through the "shotgun method" in experiments, and then the base information of the fragments is read by the sequencing instrument to generate data. Subsequently, the massive data is assembled into a genome through genome assembly technology, and the purpose of genome sequencing is finally achieved.

[0003] At present, the commonly used genome assembly algorithms include OLC (Overlap-layout-consensus) and DBG (Debrujin Graph). Among them, the core of the OLC algorithm is to first compare all sequencing reads with each other through a dynamic programming algorithm, and draw a Hamiltonian graph based on the comparison results, and then find a suitable path in this graph to assemble short sequences into contigs. The core idea of ​​the DBG algorithm is to divide reads into shorter k-mers (length is k), and form a De Bruijn graph based on every two adjacent k-mers with k-1 base overlaps. Finally, a path containing as many reads as possible is found in the graph to assemble short sequences into contigs. In an ideal case, the path is an Euler path, which is far superior to the OLC algorithm in terms of calculation.

[0004] In the process of searching for pathways in the Hamiltonian graph of the OLC algorithm or searching for Euler paths in the de Bruijn graph, the huge amount of data obtained by high-throughput sequencing increases the computational complexity of the assembly process and consumes higher computing resources. The required computing resources may exceed the limits of classical computers, ultimately making it impossible for classical computers to calculate.

[0005] Therefore, the huge consumption of computing resources during gene sequencing and assembly is a technical problem that needs to be urgently solved in this field. Summary of the invention

[0006] The technical problem solved by the present invention is: how to solve the problem of huge consumption of computing resources in high-throughput gene sequencing.

[0007] A genome assembly method, comprising:

[0008] Construct a directed cyclic graph based on the genome to be sequenced;

[0009] Constructing an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph;

[0010] The Hamiltonian is obtained according to the objective function without constraints;

[0011] Obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm;

[0012] An optimal assembly path in the directed cyclic graph is obtained according to the optimal eigenstate.

[0013] Preferably, the method for constructing a directed cyclic graph based on the genome to be sequenced is:

[0014] Construct the nodes of the directed cyclic graph according to each k-mers obtained from the genome to be sequenced;

[0015] Align the bases of each k-mers and determine the directed edges between each k-mers;

[0016] According to the experimental results obtained by the second-generation and third-generation sequencing technologies, the weight value ω of each directed edge is defined Δ,i,j , Δ is the number of edges between the i-th node and the j-th node in the directed path.

[0017] Preferably, the method of constructing an unconstrained objective function of a combinatorial optimization problem according to the directed cyclic graph includes:

[0018] Construct the objective function f(x) and constraint conditions G(x) with constraints based on the directed cyclic graph;

[0019] Combining the constrained objective function f(x) and the constraint G(x), we construct the unconstrained objective function C(x).

[0020] Preferably, the objective function f(x) with constraints is expressed as: f(x)=∑ Δ ∑ p ∑ i,j ω Δ,i, j x i,p x j,p+Δ ,

[0021]

[0022] ω Δ,i,j is the weight of the edge between the i-th node and the j-th node.

[0023] Preferably, the constraint condition includes a first constraint condition and a second constraint condition, wherein:

[0024] The first constraint is that the genome assembly starts from the source, and only one node i is selected in the first step, and the expression is: n represents the number of nodes, i represents the i-th node, i∈[1,n];

[0025] The second constraint condition is: after the i-th node is selected in the p-th step, the j-th node can be selected or no node can be selected in the p+1-th step. After no node is selected in the p-th step, no node can be selected in the p+1-th step. The expression of the second constraint condition is:

[0026] or i x i,p+1 =0,∑ i x i,p =0.

[0027] Preferably, the expression of the unconstrained objective function C(x) is: , where A and B are penalty coefficients, and satisfy B>A>>|∑ Δ ∑ i,j ω Δ,i,j |.

[0028] Preferably, the method for constructing the Hamiltonian according to the unconstrained objective function C(x) is:

[0029] Using the bit string X = x1, x2, ..., x N Coded bits x i,p+Δ , where N = P*n, P is the total number of steps, n is the number of nodes, when x i,p+Δ = 1, the x in the bit string X (p+Δ-1)*n+i =1;

[0030] The bit string X = x1, x2, ..., x N x in l (l∈[1,2n 2 ]) is converted to the Pauli operator σ z and the unit operator I, the conversion relationship is: Where Z l is the Pauli operator σ acting on the lth qubit z ;

[0031] The unconstrained objective function C(x) is converted into the Hamiltonian H, expressed as:

[0032]

[0033] Preferably, the method of obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm is:

[0034] Acquire a parameterized quantum state of a current iteration round, and obtain a current round expected value of the Hamiltonian based on the parameterized quantum state measurement;

[0035] The parameterized quantum state of the next iteration round is updated according to the current round expectation value, and the next round expectation value of the Hamiltonian is measured, and the iteration is continued until the expectation value of the Hamiltonian converges, and the expectation value of the Hamiltonian obtained by the last round of measurement is used as the optimal eigenvalue, and the quantum state corresponding to the optimal eigenvalue is used as the optimal eigenstate.

[0036] Preferably, the method for obtaining the optimal assembly path in the directed cyclic graph according to the optimal eigenstate is:

[0037] According to the optimal eigenstate, the length is 2n 2 A binary bit string;

[0038] Convert the high bits of the binary bit string to low bits to obtain a binary bit string to be decoded;

[0039] Divide the binary bit string to be decoded into 2n sub-bit strings of length n;

[0040] Convert each sub-bit string into decimal to obtain the optimal assembly path;

[0041] Here, n represents the number of nodes.

[0042] The present application also discloses a genome assembly device, which comprises:

[0043] The first construction module is used to construct a directed cyclic graph according to the genome to be sequenced;

[0044] A second construction module is used to construct an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph;

[0045] A third construction module is used to construct a Hamiltonian according to the unconstrained objective function;

[0046] A variational quantum algorithm module, used for obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate by using a variational quantum algorithm;

[0047] A path decoding module is used to obtain an optimal assembly path in the directed cyclic graph according to the optimal eigenstate.

[0048] The present application also discloses a computer-readable storage medium, which stores a genome assembly program. When the genome assembly program is executed by a processor, the above-mentioned genome assembly method is implemented.

[0049] The present application also discloses a computer device, which includes a computer-readable storage medium, a processor, and a genome assembly program stored in the computer-readable storage medium. When the genome assembly program is executed by the processor, the above-mentioned genome assembly method is implemented.

[0050] The genome assembly method and genome assembly device disclosed in the present invention have the following technical effects:

[0051] By converting the genome assembly path selection problem into the optimal solution problem in the combinatorial optimization model, and further converting it into the optimal eigenvalue solution problem of the Hamiltonian, and using the variational quantum algorithm to solve it, and finally obtaining the optimal assembly path through decoding, we can make full use of the superposition and entanglement of quantum, which is conducive to solving the problem of excessive consumption of computing resources in the process of high-throughput gene sequencing. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flow chart of the genome assembly method according to Embodiment 1 of the present invention;

[0053] Figure 2 This is a schematic diagram of converting the genome assembly problem of Example 1 of the present invention into a combinatorial optimization problem;

[0054] Figure 3 This is a schematic diagram of a parameterized quantum circuit according to Embodiment 1 of the present invention;

[0055] Figure 4 Schematic diagram of the principle of the variational quantum algorithm of the first embodiment of the present invention;

[0056] Figure 5 A schematic diagram of a decoding path according to the first embodiment of the present invention;

[0057] Figure 6 This is a principle block diagram of a genome assembly device according to Embodiment 2 of the present invention;

[0058] Figure 7 Schematic diagram of a computer device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] Before describing the various embodiments of the present application in detail, the technical concept of the present application is first briefly described: In the genome assembly process of the prior art, a large amount of calculation is required to obtain the optimal assembly path. In the face of high-throughput gene fragment data, huge computing resources are often consumed and may exceed the limits of classical computers. To this end, the genome assembly method provided by the present application first converts the traditional genome assembly problem into a combinatorial optimization problem, then converts the solution of the combinatorial optimization problem into the solution of the Hamiltonian, and uses a variational quantum algorithm to obtain the optimal solution, thereby obtaining the optimal genome assembly path, making full use of quantum superposition and entanglement, and can effectively improve computing power.

[0061] Specifically, if Figure 1 As shown, the genome assembly method of this embodiment 1 includes the following steps:

[0062] Step S10, constructing a directed cyclic graph according to the genome to be sequenced;

[0063] Step S20, constructing an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph;

[0064] Step S30, constructing a Hamiltonian according to the unconstrained objective function;

[0065] Step S40, using a variational quantum algorithm to obtain the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate;

[0066] Step S50: Obtain an optimal assembly path in the directed cyclic graph according to the optimal eigenstate.

[0067] Specifically, in the first embodiment, based on the DBG algorithm, a directed cyclic graph is constructed according to the sequencing information of each gene fragment to describe the genome assembly problem. Further, step S10 includes the following steps:

[0068] Step S101, constructing nodes of a directed cyclic graph based on each k-mers obtained from the genome to be sequenced. Using the genome "shotgun method", random lengths of reads of the genome to be sequenced are obtained, and all reads are divided into shorter fixed-length k-mers, and the k-mers are used as nodes of the directed cyclic graph, and the length of the k-mers is k.

[0069] Step S102, compare the bases of each k-mers to determine the directed edges between each k-mers. If the base remaining after removing the first base of the previous k-mers is the same as the base remaining after removing the last base of the next k-mers, a directed edge is allocated to the nodes corresponding to the two k-mers.

[0070] Step S103: Define the weight value ω of each directed edge according to the experimental results obtained by the second-generation and third-generation sequencing technologies. Δ,i,j , Δ is the number of edges between the i-th node and the j-th node in the directed path. 环 +1, N 环 is the number of nodes for constructing a ring in the directed cyclic graph, and the problem of repeated gene segments can be solved by setting a weight value with a larger absolute value.

[0071] For example, Figure 2 As shown in the left half of the figure, the nodes in the figure represent the k-mers of length k obtained by splitting the reads for genome assembly, the connection relationship of the edge represents two k-mers with a length of k-1 bases overlapping, and the value on the edge represents the weight ω 1,i,j Since errors may occur during gene sequencing, they can be represented by setting different weight values. As shown in the figure, a weight value of -2 indicates the connection of k-mers when an error occurs in gene sequencing; a weight value of -4 indicates the connection of k-mers when the gene sequencing is correct.

[0072] The ring structure in the figure indicates the connection of the repeated sequences, and the arrow indicates the assembly order. In order to solve the problem of repeated gene fragments, a weight value with a larger absolute value can be defined to solve it. Figure 2 The curve with weight value ω Δ,i,j =-200, Δ=3. As shown in the right half of the figure, the genome assembly problem is converted into a combinatorial optimization problem. In form, the k-mers represented by each node in the directed cyclic graph are converted into a node sequence represented by numbers, such as ATC is the first node, TCG is the second node, and so on. The ellipse is the node, the number in the ellipse is the node number, and the number on the directed edge is the weight of the edge between the two nodes. In the right figure, finding a path with the smallest weight under certain conditions represents the optimal assembly path.

[0073] Furthermore, the essence of converting the genome assembly problem into a combinatorial optimization problem is to convert the optimal path selection in the genome assembly problem into the optimal solution to the combinatorial optimization problem. Specifically, the method of constructing a combinatorial optimization model according to the directed cyclic graph corresponding to the gene to be sequenced in step S20 includes the following steps:

[0074] Step S201, constructing a constrained objective function f(x) and constraint conditions G(x) according to a directed cyclic graph;

[0075] Step S202: Combine the constrained objective function f(x) and the constraint G(x) to construct an unconstrained objective function C(x), where the solution of the objective function C(x) represents the assembly path of the directed cyclic graph.

[0076] The expression of the first objective function is: f(x)=∑ Δ ∑ p ∑ i,j ω Δ,i,j x i,p x j,p+Δ ,

[0077]

[0078] ω Δ,i,j is the weight of the edge between the i-th node and the j-th node.

[0079] Furthermore, the de novo assembly strategy needs to start from the source. When there are repeated sequences, the source can be passed through halfway. Therefore, the first constraint is set to select only one node i in the first step, and the expression is: n represents the number of nodes.

[0080] Furthermore, it is also necessary to determine whether k-mers (nodes) are selected in the intermediate step p+1. Scenario 1 is: when only one k-mers (node) i is selected in the pth step, that is Then in step p+1, only one node j can be selected, that is Or do not select any node, that is Case 2: When no k-mers (nodes) are selected in step p, that is Then no node can be selected in step p+1, that is, Combining the two situations, the expression of the second constraint is:

[0081] or i x i,p+1 =0,∑ i x i,p =0

[0082] In step S202, the expression of the unconstrained objective function C(x) is constructed as follows:

[0083]

[0084] Where A and B are penalty coefficients, and they satisfy B>A>>|∑ Δ ∑ i,j ω Δ,i,j |.

[0085] Furthermore, the essence of constructing the Hamiltonian according to the combined optimization model in step S30 is to convert the unconstrained objective function C(x) into a Hamiltonian in matrix form.

[0086] First, use the bit string X = x1, x2, ..., x N Coded bits x i,p+Δ , where N = P*n, P is the total number of steps, n is the number of nodes, when x i,p+Δ = 1, the x in the bit string X (p+Δ-1)*n+i =1. Among them, x i,p+Δ ∈{0,1},i∈[1,n],p+Δ∈[1,2n].

[0087]

[0088] When the number of nodes is n, the maximum number of steps is 2n, so there are 2n 2 variable x i,p+Δ After encoding, we will use a length of 2n 2 The bit string X represents x i,p+Δ For example, when x i,p+Δ =1, then the bit value corresponding to the (p+Δ-1)*n+ith bit in the bit string X is 1, that is, x (p+Δ-1)*n+i = 1. And vice versa.

[0089] Furthermore, the bit string X = x1, x2, ..., x N x in l (l∈[1,2n 2 ]) is converted to the Pauli operator σ z and the unit operator I, the conversion relationship is: Where Z l is the Pauli operator σ acting on the lth qubit z Therefore, the expression after converting the unconstrained objective function C(x) into the Hamiltonian H is:

[0090]

[0091] Furthermore, in step S40, the variational quantum algorithm mainly includes the steps of generating a parameterized quantum circuit, preparing a parameterized quantum state, measuring the expected value of the Hamiltonian, and updating parameters.

[0092] Specifically, generate 2n 2 A quantum circuit with qubits, such as Figure 3 As shown, first act on a layer of R x (θ) revolving door or R y (θ) Rotation gate. The dotted box quantum contains the CNOT gate and R x (θ) revolving door or R y (θ) Rotation gate. Every two quantum circuits act on a CNOT gate (controlled NOT gate). The rule is that there is only one control bit and one controlled bit in each bit. Then act on an Rx (θ) revolving door or R y (θ) Rotation gate. Repeat the operation of d dashed-line quantum circuits to form a parameterized quantum circuit.

[0093] Further, prepare the initial quantum state Initialization to get d*2n 2 Parameters Then the parameterized quantum circuit is applied to the initial quantum state |ψ0> to obtain 0 The superposition state |Ψ(θ 0 )>, that is, the parameterized quantum state. The parameterized quantum state |Ψ(θ 0 )> contains all computational base states, in other words, all genome assembly paths.

[0094] Furthermore, if Figure 4 As shown, based on the parameterized quantum state measurement of the current iteration round, the current round expectation value of the Hamiltonian is obtained:

[0095] E(θ s )=<Ψ(θ s )|H|Ψ(θ s )>

[0096] Here s∈N + (N + is a positive integer), s represents the sth iteration. Apply the gradient descent method, according to the current round expected value E(θ s ) Update the parameters θ s Get the new parameter θ s+1 , and the parameter θ s+1 Substitute it into the parameterized quantum circuit to obtain the parameterized quantum state of the next iteration round |Ψ(θ s+1 )>, and then measure the next round of expected value E(θ s+1 ), and continue iterating until the expected value of the Hamiltonian converges, that is, |E(θ s+1 )-E(θ s )|<δ(the value of δ is usually 10 -8 ), the optimization is terminated. At this time, the expected value of the Hamiltonian obtained from the last round of measurement E(θ final ) is the optimal eigenvalue, and the corresponding superposition state is |Ψ(θ final )>, where the calculation basis vector with the largest probability is the corresponding optimal eigenstate, denoted by |D>, where

[0097] The optimal eigenvalue and the optimal eigenstate obtained at this time are equivalent to the optimal solution of the combinatorial optimization model and the optimal assembly path in the directed cyclic graph. Therefore, in step S40, the assembly path is obtained by decoding the optimal eigenstate. Specifically, the method for obtaining the optimal assembly path in the directed cyclic graph according to the optimal eigenstate includes the following steps:

[0098] Step S401: Obtain a length of 2n according to the optimal eigenstate |D> 2 A binary bit string.

[0099] Step S402: convert the high bits of the binary bit string into low bits to obtain the binary bit string to be decoded.

[0100] Step S403: divide the binary bit string to be decoded into 2n sub-bit strings of length n.

[0101] Step S404: Convert each sub-bit string into decimal to obtain an optimal assembly path.

[0102] For example, Figure 5 As shown in the figure, when the node is n = 4, the optimal eigenstate is converted into a binary bit string with a length of 32 bits, such as bit string 1 in the figure, and the high bit of the binary bit string is converted to the low bit to obtain the binary bit string to be decoded, such as bit string 2 in the figure. Then the binary bit string is divided into 8 sub-bit strings with a length of 4, such as P1, P2, P3, P4, P5, P6, P7, and P8 in the figure. Convert each sub-bit string to decimal i to determine the i-th k-mers selected in the kth step. According to the decoding path in the figure, the first step selects the first k-mers, the second step selects the second k-mers, the third step selects the third k-mers, the fourth step selects the fourth k-mers, and the fifth, sixth, seventh, and eighth steps do not select any k-mers. The final order of assembling k-mers is k-mer1→k-mer2→k-mer3→k-mer4.

[0103] The genome assembly method disclosed in the first embodiment converts the genome assembly path selection problem into the optimal solution problem in the combinatorial optimization model, further converts it into the optimal eigenvalue solution problem of the Hamiltonian, and uses a variational quantum algorithm to solve it. Finally, the optimal assembly path is obtained through decoding. It makes full use of quantum superposition and entanglement, which is conducive to solving the problem of excessive consumption of computing resources in the process of high-throughput gene sequencing. At the same time, it can also solve the problem of difficulty in genome assembly caused by the presence of a large number of gene repeat fragments in the genome.

[0104] like Figure 6As shown, the second embodiment discloses a genome assembly device, which includes a first construction module 100, a second construction module 200, a third construction module 300, a variational quantum algorithm module 400 and a path decoding module 500. The first construction module 100 is used to construct a directed cyclic graph according to the genome to be sequenced, the second construction module 200 is used to construct an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph, the third construction module 300 is used to construct a Hamiltonian according to the unconstrained objective function, the variational quantum algorithm module 400 is used to obtain the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm, and the path decoding module 500 is used to obtain the optimal assembly path in the directed cyclic graph according to the optimal eigenstate. Among them, the more detailed working process of each module in the genome assembly device can refer to the description of the first embodiment, which will not be repeated here.

[0105] This third embodiment also discloses a computer-readable storage medium, which stores a genome assembly program. When the genome assembly program is executed by a processor, the above-mentioned genome assembly method is implemented.

[0106] This fourth embodiment also discloses a computer device, at the hardware level, such as Figure 7 As shown, the computer device includes a processor 12, an internal bus 13, a network interface 14, and a computer-readable storage medium 11. The processor 12 reads the corresponding computer program from the computer-readable storage medium and then runs it, forming a request processing device at the logical level. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices. The computer-readable storage medium 11 stores a genome assembly program, and the genome assembly program implements the above-mentioned genome assembly method when executed by the processor.

[0107] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0108] The specific implementation methods of the present invention are described in detail above. Although some embodiments have been shown and described, those skilled in the art should understand that these embodiments can be modified and improved without departing from the principles and spirit of the present invention, the scope of which is defined by the claims and their equivalents. These modifications and improvements should also be within the scope of protection of the present invention.

Claims

1. A genome assembly method, characterized in that: The genome assembly method comprises: Construct a directed cyclic graph based on the genome to be sequenced; Constructing an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph; The Hamiltonian is obtained according to the objective function without constraints; Obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm; Obtaining an optimal assembly path in the directed cyclic graph according to the optimal eigenstate; The method of constructing an unconstrained objective function of a combinatorial optimization problem according to the directed cyclic graph includes: Construct the objective function f(x) and constraint conditions G(x) with constraints based on the directed cyclic graph; Combining the objective function f(x) with constraints and the constraint G(x), construct the objective function C(x) without constraints. The solution of the objective function C(x) represents the assembly path of the directed cyclic graph. The expression of the objective function f(x) with constraints is: f(x)=∑ Δ ∑ p ∑ i,j ω Δ,i,j x i,p x j,p+Δ , ω Δ,i,j is the weight of the edge between the i-th node and the j-th node; The constraint conditions include a first constraint condition and a second constraint condition, wherein: The first constraint is that the genome assembly starts from the source, and only one node i is selected in the first step, and the expression is: n represents the number of nodes, i represents the i-th node, i∈[1,n]; The second constraint condition is: after the i-th node is selected in the p-th step, the j-th node can be selected or no node can be selected in the p+1-th step. After no node is selected in the p-th step, no node can be selected in the p+1-th step. The expression of the second constraint condition is: or i x i,p+1 =0,∑ i x i,p =0.

2. The genome assembly method according to claim 1, characterized in that The method for constructing a directed cyclic graph based on the genome to be sequenced is: Construct the nodes of the directed cyclic graph according to each k-mers obtained from the genome to be sequenced; Align the bases of each k-mers and determine the directed edges between each k-mers; Perform gene sequencing on each k-mer according to the depth of each k-mer, obtain the experimental results obtained by the second-generation and third-generation sequencing technologies, and define the weight value ω of each directed edge Δ,i,j , Δ is the number of edges between the i-th node and the j-th node in the directed path.

3. The genome assembly method according to claim 1, characterized in that The expression of the unconstrained objective function C(x) is: Where A and B are penalty coefficients, and they satisfy B>A>>|∑ Δ ∑ i,j ω Δ,i,j |.

4. The genome assembly method according to claim 1, characterized in that The method for constructing the Hamiltonian according to the unconstrained objective function C(x) is: Using the bit string X = x1, x2, ..., x N Coded bits x i,p+Δ , where N = P × n, P is the total number of steps, n is the number of nodes, when x i,p+Δ = 1, the x in the bit string X (p+Δ-1)*n+i =1; The bit string X = x1, x2, ..., x N x in l (l∈[1,2n 2 ]) is converted to the Pauli operator σ z and the unit operator I, the conversion relationship is: Where Z l is the Pauli operator σ acting on the lth qubit z ; The unconstrained objective function C(x) is converted into the Hamiltonian H, expressed as:

5. The genome assembly method according to claim 1, characterized in that The method of obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate using a variational quantum algorithm is: Acquire a parameterized quantum state of a current iteration round, and obtain a current round expected value of the Hamiltonian based on the parameterized quantum state measurement; The parameterized quantum state of the next iteration round is updated according to the current round expectation value, and the next round expectation value of the Hamiltonian is measured, and the iteration is continued until the expectation value of the Hamiltonian converges, and the expectation value of the Hamiltonian obtained by the last round of measurement is used as the optimal eigenvalue, and the quantum state corresponding to the optimal eigenvalue is used as the optimal eigenstate.

6. The genome assembly method according to claim 1, characterized in that The method for obtaining the optimal assembly path in the directed cyclic graph according to the optimal eigenstate is: According to the optimal eigenstate, the length is 2n 2 A binary bit string; Convert the high bits of the binary bit string to low bits to obtain a binary bit string to be decoded; Divide the binary bit string to be decoded into 2n sub-bit strings of length n; Convert each sub-bit string into decimal to obtain the optimal assembly path; Here, n represents the number of nodes.

7. A genome assembly device, characterized in that: The genome assembly device comprises: The first construction module is used to construct a directed cyclic graph according to the genome to be sequenced; A second construction module is used to construct an unconstrained objective function of the combinatorial optimization problem according to the directed cyclic graph; A third construction module is used to construct a Hamiltonian according to the unconstrained objective function; A quantum variational solution module, used for obtaining the optimal eigenvalue of the Hamiltonian and its corresponding optimal eigenstate by using a variational quantum algorithm; A path decoding module, used for obtaining an optimal assembly path in the directed cyclic graph according to the optimal eigenstate; The method of constructing an unconstrained objective function of a combinatorial optimization problem according to the directed cyclic graph includes: Construct the objective function f(x) and constraint conditions G(x) with constraints based on the directed cyclic graph; Combining the objective function f(x) with constraints and the constraint G(x), construct the objective function C(x) without constraints. The solution of the objective function C(x) represents the assembly path of the directed cyclic graph. The expression of the objective function f(x) with constraints is: f(x)=∑ Δ ∑ p ∑ i,j ω Δ,i,j x i,p x j,p+Δ , ω Δ,i,j is the weight of the edge between the i-th node and the j-th node; The constraint conditions include a first constraint condition and a second constraint condition, wherein: The first constraint is that the genome assembly starts from the source, and only one node i is selected in the first step, and the expression is: n represents the number of nodes, i represents the i-th node, i∈[1,n]; The second constraint condition is: after the i-th node is selected in the p-th step, the j-th node can be selected or no node can be selected in the p+1-th step. After no node is selected in the p-th step, no node can be selected in the p+1-th step. The expression of the second constraint condition is: or i x i,p+1 =0,∑ i x i,p =0.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a genome assembly program, and when the genome assembly program is executed by a processor, the genome assembly method according to any one of claims 1 to 6 is implemented.

9. A computer device, characterized in that: The computer device includes a computer-readable storage medium, a processor, and a genome assembly program stored in the computer-readable storage medium. When the genome assembly program is executed by the processor, the genome assembly method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Quantum variational method, apparatus, and storage medium for simulating quantum systems

    CN113710609A

  • Ground state energy determination method and device, equipment and storage medium

    CN115577776A