Construction method and device of haplotype network, electronic equipment and medium
By using the evolutionary relationship in the historical monomer -type network and updating the current single body type, constructing a target single -body network based on the smallest tree diagram, solving the problem of low construction efficiency of single -body network construction in existing technology, realized the realization Quick and efficient single network update.
Patent Information
- Application Number
- CN202411406825.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Existing haplotype network construction methods run slowly when processing large-scale genomic data, and it is impossible to quickly build haplotype networks. Especially when genomic sequences continue to increase, static methods can only build networks from scratch, resulting in the operation time being exceeded. long.
By obtaining the initial data of multiple new genomic sequences and the initial single body network, the combination determines the current single body type, and uses the evolutionary relationship in the historical monomer -type network to match the current single body type. Determine the current single body type corresponding to the ancestor of the target father, build a target single body network based on the minimum tree -shaped graph.
While ensuring the accuracy of a single network, it has significantly improved the efficiency of building a single body network, and can quickly update the single -type network to adapt to the growth of genomic sequences.
Smart Images

Figure CN119380809A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of bioinformatics, and in particular to a method, device, electronic device and medium for constructing a haplotype network. Background Art
[0002] With the rapid development of gene sequencing technology, the scale of genomic data has exploded, which has posed new challenges to the ability of existing haplotype network construction methods to handle large-scale genomic data. A certain virus has included more than 17 million genome sequences, and is growing at an average rate of 73,000 per week. Traditional haplotype network construction methods, such as MSN, MJN, TCS, RMST, etc., run slowly and cannot quickly build haplotype networks. For example, the MJN method implemented in the famous haplotype network construction software POPART takes more than 3 days to run for 1,000 genome sequences of a certain virus, which cannot meet the needs of processing large-scale data. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and medium for constructing a monomeric network, so as to solve the above-mentioned problems existing in the prior art and improve the efficiency of constructing a monomeric network.
[0004] In a first aspect, a method for constructing a haplotype network is provided, and the method may include:
[0005] Acquire initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data comprises a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; each historical haplotype comprises at least one historical genome sequence;
[0006] Combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes;
[0007] For any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then according to the positions of the historical haplotypes corresponding to the historical sire ancestor of the target historical haplotype and the historical haplotypes of the target historical haplotype in the historical haplotype array, respectively, determine the current haplotype index and the ancestor index of the current haplotype;
[0008] Determine a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestral index and a current mutation set of each current haplotype;
[0009] Based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
[0010] In a possible implementation, determining the initial haplotype network includes:
[0011] Determine mutation information of all historical genome sequences based on the reference genome sequence, process all historical genome sequences, and determine multiple historical haplotypes; wherein the reference genome sequence is set by selecting any one historical genome sequence from multiple historical genome sequences;
[0012] According to the number of mutations of each historical haplotype, the number of historical genome sequences and the earliest sampling time, multiple historical haplotypes are sorted to determine a historical haplotype array; the earliest sampling time is determined according to the sampling time of each historical genome sequence in the corresponding historical haplotype;
[0013] Determine the target historical haplotype corresponding to the historical paternal ancestor of other historical haplotypes except the historical haplotype where the reference genome sequence is located according to the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array;
[0014] According to each historical haplotype and the corresponding target historical haplotype, determining the side information between each historical haplotype;
[0015] Based on each historical haplotype, the corresponding target historical haplotype and the edge information between each historical haplotype, the initial haplotype network based on the minimum dendrogram is determined.
[0016] In a possible implementation, the preset rule includes:
[0017] According to the number of mutations of each historical haplotype, the number of historical genome sequences in each historical haplotype and the priority order of the earliest sampling time, each historical haplotype is sorted to determine the historical haplotype array.
[0018] In a possible implementation, determining the current haplotype index and the ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotype corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array respectively includes:
[0019] Determine the position value of the target historical haplotype in the historical haplotype array as the current haplotype index of the current haplotype;
[0020] And, the position value of the historical haplotype corresponding to the historical paternal ancestor of the target historical haplotype in the historical haplotype array is determined as the ancestral index of the current haplotype.
[0021] In a possible implementation, the method further includes:
[0022] If the current mutation set of the current haplotype does not match the historical mutation set of the historical haplotype, the current haplotype index and ancestral index of the current haplotype are determined according to the configured index rule; wherein the index rule is that the current haplotype index is the number of historical haplotypes; and the ancestral index of the current haplotype is -1.
[0023] In a possible implementation, before determining the target current haplotype corresponding to the target paternal ancestor of the current haplotype, the method further includes:
[0024] Determines the starting haplotype for ancestry search in the current haplotype array.
[0025] In a possible implementation, determining a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestor index and a current mutation set of each current haplotype includes:
[0026] According to the arrangement order of each current haplotype in the current haplotype array, the search is performed in sequence with the starting haplotype as the starting point, and the target current haplotype corresponding to the target paternal ancestor of the current haplotype is determined according to the configured ancestor judgment strategy; wherein the ancestor judgment strategy is determined based on the size of the ancestor index of the current haplotype and the haplotype index of the searched current haplotype and the relationship between the current mutation sets corresponding to the current haplotype and the searched current haplotype respectively.
[0027] In a second aspect, a device for constructing a monomeric network is provided, and the device may include:
[0028] An acquisition unit, used for acquiring initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data comprises a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; wherein each historical haplotype comprises at least one historical genome sequence;
[0029] A combining unit, used for combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes;
[0030] A matching unit, for determining, for any current haplotype, a current haplotype index and an ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotypes corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array, respectively, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype;
[0031] A determination unit, for determining a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestral index and a current mutation set of each current haplotype;
[0032] And, based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
[0033] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0034] Memory, used to store computer programs;
[0035] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.
[0036] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0037] The present application provides a method for constructing a haplotype network, the method comprising: obtaining initial data of a plurality of newly added genome sequences and a determined initial haplotype network; combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes; for any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then according to the positions of the target historical haplotype and the historical haplotype corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array, respectively, determining the current haplotype index and the ancestor index of the current haplotype; according to the current haplotype index, the ancestor index and the current mutation set of each current haplotype, determining the target current haplotype corresponding to the target ancestor of the current haplotype; based on each current haplotype, the target current haplotype corresponding to the target ancestor of the corresponding current haplotype and the side information between each current haplotype, determining the target haplotype network based on the minimum tree diagram. The existing haplotype network construction method is still slow in terms of running speed, because the existing method only considers the static situation, that is, constructing a haplotype network for a given genome data set. However, when the number of genome sequences continues to increase, the haplotype network needs to be updated regularly based on the newly added genome sequences. In this case, the static method can only build the haplotype network from scratch, and cannot make full use of the evolutionary relationship between the previously inferred historical haplotypes, resulting in a long operation time and difficulty in updating the existing haplotype network in a timely manner. The present application updates the existing haplotype network by utilizing the evolutionary relationship between the previously inferred historical haplotypes, thereby improving the operation efficiency of the haplotype network while ensuring the operation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A system architecture diagram of a method for constructing a monomeric network provided in an embodiment of the present application;
[0040] Figure 2 A schematic diagram of a process for constructing a monomer type network provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the process flow of the ancestor determination strategy provided in the embodiment of the present application;
[0042] Figure 4A schematic diagram of the structure of a monomer network construction device provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] For ease of understanding, the terms involved in the embodiments of the present application are explained below:
[0046] Haplotype network, also known as haplotype network, is a method to analyze the evolutionary relationship between genome sequences within biological populations or species. This method is usually applied to genetic data with less recombination, such as mitochondrial genes, chloroplast genes, viral genes and male-specific regions of mammalian Y chromosomes, and is an important tool for studying the origin of humans, virus transmission paths and other issues.
[0047] Haplotype: An important concept in genetics, it refers to a specific combination of genes or DNA markers that are tightly linked (i.e. located on the same chromosome and not easily separated).
[0048] A method for constructing a monomer type network provided in the embodiment of the present application can be applied in Figure 1 In the system architecture shown in Figure 1As shown, the system may include: a server and a terminal. The server may be a physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal may be a user equipment (UE) such as a mobile phone, smart phone, laptop, digital broadcast receiver, personal digital assistant (PDA), tablet computer (PAD), handheld device, vehicle-mounted device, wearable device, computing device or other processing device connected to a wireless modem, mobile station (MS), mobile terminal, etc. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0049] A terminal, used to obtain a plurality of newly added genome sequences and initial data of the determined initial haplotype network, and send the plurality of newly added genome sequences and the initial data to a server respectively;
[0050] The server is used to receive multiple newly added genome sequences and initial data to execute a method for constructing a haplotype network provided in the present application.
[0051] With the rapid development of gene sequencing technology, the scale of genomic data has exploded, which has posed new challenges to the ability of existing haplotype network construction methods to handle large-scale genomic data. A certain virus has included more than 17 million genome sequences, and is growing at an average rate of 73,000 per week. Traditional haplotype network construction methods, such as MSN, MJN, TCS, RMST, etc., run slowly and cannot quickly build haplotype networks. For example, the MJN method implemented in the famous haplotype network construction software POPART takes more than 3 days to run for 1,000 genome sequences of a certain virus, which cannot meet the needs of processing large-scale data.
[0052] Therefore, the present application provides a method for constructing a haplotype network to solve the above-mentioned problems existing in the prior art, and can improve the efficiency of constructing a haplotype network while ensuring the accuracy of the haplotype network.
[0053] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0054] Figure 2 A schematic diagram of a method for constructing a monomer type network provided in an embodiment of the present application. Figure 2 As shown, the method may include:
[0055] Step S210, obtaining a plurality of newly added genome sequences, the newly added sampling time of each newly added genome sequence, and initial data of the determined initial haplotype network.
[0056] The initial data includes a historical haplotype array composed of multiple historical haplotypes sorted according to preset rules and a historical mutation set corresponding to each historical haplotype; each historical haplotype includes at least one historical genome sequence.
[0057] Before executing step S210, the process of determining the initial haplotype network may specifically include:
[0058] S201: Obtain available genome sequence data (multiple historical genome sequences) and corresponding metadata of a certain taxonomic group; metadata can be understood as attribute data of historical genome sequences, for example: sampling time of historical genome sequences.
[0059] Specifically, the obtained multiple historical genome sequences are recorded as s0,…,s n-1 , where n is the number of historical genome sequences, and multiple historical genome sequences constitute the historical genome sequence sample set S = {s0,…,s n-1}; Determine any one of the multiple historical genome sequences as the reference genome sequence, for example: n-1 is the reference genome sequence; the sampling time of the i-th historical genome sequence is recorded as t(s i ); usually the historical genome sequence with an earlier sampling time is determined as the reference genome sequence.
[0060] S202: Based on mutation information in multiple historical genome sequences determined by the reference genome sequence, the historical genome sequences are combined to determine multiple historical haplotypes.
[0061] Specifically, taking the reference genome sequence as the standard, the mutation information of each historical genome sequence in the historical genome sequence sample set S is extracted to obtain the i-th historical genome sequence s i The corresponding historical mutation set M(s i). Among them, extracting mutation information can be understood as: since the coding of the genome sequence is relatively long, for the biological research process, it is only necessary to study the coding part that is different from the reference genome sequence to reduce the corresponding amount of calculation and improve the calculation efficiency. Therefore, only the coding that is different from the reference genome sequence is extracted. The extraction process includes but is not limited to the steps of preprocessing, alignment, variation detection and annotation of each historical genome sequence. It should be noted that the reference genome sequence can also determine its mutation information through the reference genome sequence, thereby determining the haplotype to which it belongs. In fact, the mutation set corresponding to the reference genome sequence is an empty set, that is, no mutation occurs.
[0062] Afterwards, the historical genome sequences corresponding to the same historical mutation set are merged to obtain at least one historical haplotype, recorded as m historical haplotypes h0,…,h m-1 ; The m historical haplotypes satisfy that the historical mutation sets corresponding to the historical genome sequences in each haplotype are the same, and the historical mutation sets corresponding to the historical genome sequences in different haplotypes are different.
[0063] S203: Sort the multiple historical haplotypes according to the number of mutations of each historical haplotype, the number of historical genome sequences and the earliest sampling time, and determine a historical haplotype array.
[0064] Specifically, let S i represents the i-th historical haplotype h i The corresponding set of historical genome sequences, t(s j ) represents the sampling time of the jth historical genome sequence, using the formula Calculate the earliest sampling time of any historical haplotype, that is, the minimum sampling time of all historical genome sequences in the historical haplotype.
[0065] Using formula M i =M(s j ), Based on the historical mutation set of the historical genome sequence, the historical mutation set corresponding to each historical haplotype is calculated, where M i represents the i-th historical haplotype h i The corresponding historical mutation set is used to determine the number of mutations. The number of mutations in the historical haplotype can be understood as the number of bases that have mutated in the historical genome sequence of the historical haplotype compared with the reference genome sequence. For example, when the reference genome sequence is AAAAA and the historical genome sequences of a historical haplotype are TAGAC, the corresponding historical mutation set is M = {A1T, A3G, A5C}, and the number of mutations can be further determined to be 3; the mutation set of the reference genome is an empty set, which can be formally described as Its mutation count is 0.
[0066] Using formula z i =|S i | Calculate the i-th historical haplotype h i The number of historical genome sequences in the historical genome sequence.
[0067] In summary, according to the priority, the number of mutations |M i | and the number of historical genome sequences z i Sort in descending order, then sort by the earliest sampling time t i Sort in ascending order to obtain an array of historical haplotypes consisting of multiple sorted historical haplotypes, still recorded as h0,…,h m-1 The above process is the preset rule.
[0068] It should be noted that the subscripts such as the historical mutation set and the earliest sampling time of each historical haplotype are also adjusted accordingly.
[0069] S204: Determine the target historical haplotype corresponding to the historical paternal ancestor of the other historical haplotypes except the historical haplotype where the reference genome sequence is located according to the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array.
[0070] Specifically, for each other historical haplotype h i , according to the order of arrangement of each historical haplotype in the historical haplotype array, start searching from j = i + 1 until the smallest j is found that satisfies That is h i The subscript π of the target historical haplotype corresponding to the historical ancestor of i Satisfy the formula That is to obtain the target historical haplotype corresponding to the historical paternal ancestor of other historical haplotypes except the historical haplotype where the reference genome sequence is located.
[0071] S205: According to each historical haplotype and the corresponding target historical haplotype, the edge information between each historical haplotype is determined, and an initial haplotype network based on a minimum tree diagram is further finally determined.
[0072] Specifically, the following is denoted by π i The target historical haplotype is taken as the starting point, and the historical haplotype h i As the end point, according to the connection rule from ancestors to descendants, all historical haplotypes h i The target historical haplotype corresponding to its historical ancestor is connected. The length of the edge (edge information) is defined as the historical haplotype h i With their historical ancestors The number of mutations between the historical haplotypes h i The number of mutations in the mutation set and its historical ancestor The difference in the number of mutations in the mutation set is calculated by the following formula: Finally, the initial haplotype network based on the minimum dendrogram was obtained.
[0073] It can be understood that the initial haplotype network based on the minimum dendrogram can be regarded as a dendrogram, in which the nodes are composed of all historical haplotypes h0,…,h m-1 The edge direction in the tree diagram needs to be inferred through the mutation set of the haplotype, the earliest sampling time, and the number of historical genome sequences; the edge set of the initial haplotype network is
[0074] During the evolution process, due to chromosome breakage, replication errors, etc., some genes may replicate one or more copies in the genome, or different species may directly exchange genetic material to obtain each other's genome sequences, etc., to form new sequences under natural conditions; or new sequences may be formed under laboratory conditions in some special demand scenarios; in short, a newly sequenced genome sequence refers to a newly sequenced genome sequence (whose mutation set may be the same as the mutation set of a historical genome sequence, or it may be different from the mutation set of any historical genome sequence), which can be spontaneously generated in nature or artificially created. In other words, obtaining multiple newly sequenced genome sequences (s n ,…,s n′-1 ), these newly added genome sequences often carry important biological functions and are of great significance in promoting scientific and technological progress.
[0075] Step S220: Combine each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes, and sort the plurality of current haplotypes to obtain a current haplotype array.
[0076] Specifically, S221, multiple newly added genome sequences (s n ,…,s n′-1 ) is combined with multiple historical genome sequences to obtain the current genome set S′=S∪{s n ,…,s n′-1}={s0,s1,…,s n′-1}.
[0077] S222: Based on the reference genome sequence and the mutation information of each newly added genome sequence and each historical genome sequence in the current genome set S′, each newly added genome sequence is combined with each historical genome sequence to determine multiple current haplotypes. The specific combination process is the same as step S202.
[0078] S223. Sort the multiple current haplotypes according to a preset rule to obtain a current haplotype array.
[0079] The specific sorting process is the same as step S203, that is, according to the number of mutations of each current haplotype, the number of current genome sequences and the earliest newly added sampling time, multiple current haplotypes are sorted to determine the current haplotype array h′0,…,h′ m′-1 , m′ represents the number of current haplotypes.
[0080] The earliest newly added sampling time is the minimum value of the newly added sampling time and / or sampling time corresponding to each newly added genome sequence and / or historical genome sequence in each current haplotype.
[0081] Step S230: Match each current haplotype with each historical haplotype, and determine the current haplotype index of the current haplotype and the ancestor index of the current haplotype according to the matching result.
[0082] Specifically, S231, for any current haplotype, matching the current mutation set of the current haplotype with the historical mutation sets of each historical haplotype:
[0083] In some embodiments, the matching process may include i Build a hash table as key and retrieve M′ j With M i The corresponding relationship. i is the historical mutation set, M′ j The current mutation set.
[0084] A. If the current mutation set of the current haplotype successfully matches the historical mutation set of the target historical haplotype, the current haplotype index and the ancestor index of the current haplotype are determined according to the positions of the historical haplotypes corresponding to the target historical haplotype and the historical parent ancestor of the target historical haplotype in the historical haplotype array respectively.
[0085] The process of determining the current haplotype index and ancestry index may include:
[0086] The position value of the target historical haplotype in the historical haplotype array is determined as the current haplotype index of the current haplotype; it should be noted that the current haplotype index and ancestral index mentioned in this application are both a numerical value.
[0087] And, the position value of the historical haplotype corresponding to the historical paternal ancestor of the target historical haplotype in the historical haplotype array is determined as the ancestral index of the current haplotype.
[0088] B. If the current mutation set of the current haplotype fails to match the historical mutation sets of all historical haplotypes, the current haplotype index of the current haplotype and the ancestral index of the current haplotype are determined according to the configured index rule;
[0089] Among them, the index rule is: the current haplotype index is the number of historical haplotypes m (or any number greater than m); the ancestral index of the current haplotype is -1 (or any number smaller than -1).
[0090] The above current haplotype index hap_ind i The determination process of is described by the following formula:
[0091]
[0092] The above ancestor index anc_ind i The determination process of is described by the following formula:
[0093]
[0094] This method proposes the concepts and calculation formulas of the current haplotype index and ancestral index, which are used to extract information from the initial haplotype network and provide a data basis for the subsequent incremental and rapid construction of the target haplotype network.
[0095] Step S240: for any current haplotype, determine the target current haplotype corresponding to the target paternal ancestor of the current haplotype according to the current haplotype index, the ancestral index and the current mutation set of each current haplotype.
[0096] Before executing step S240, the method may further include:
[0097] Determines the starting haplotype for ancestry search in the current haplotype array.
[0098] Specifically, in order to reduce the amount of computation required to determine the inclusion relationship, considering |M′ j |<|M′ i |Yes The necessary condition for |M′ is that integer comparison consumes less computing time than judging set inclusion relations. Therefore, the starting point for ancestor search for the i-th current haplotype can be the one that satisfies |M′ j |<|M′ i |The minimum j of the condition, specifically the following formula can be applied:
[0099] start_ind i =min{j||M′ j |<|M′ i |}.
[0100] The position value of the starting haplotype of the ancestral search is calculated to determine the starting haplotype in the current haplotype array.
[0101] This method proposes a calculation formula for the starting point of ancestral inference, narrows the range of possible ancestors, reduces the number of haplotype ancestral inferences, and thus further speeds up the construction of the target haplotype network.
[0102] Step S240 may specifically include: searching in sequence according to the arrangement order of each current haplotype in the current haplotype array, starting from the starting haplotype, to determine the target current haplotype corresponding to the target paternal ancestor; that is, for any current haplotype, it may be convenient to set h i ′, from j = start_ind i ,start_ind i +1,…,m′-1 determine the current haplotype h in turn j Is 'h i 'Target parent ancestor, until the first target parent ancestor appears.
[0103] Ancestor judgment strategies include: ancestor index anc_ind for the current haplotype i And the haplotype index hap_ind of the current haplotype searched j The size of the target ancestor is used to determine the target current haplotype corresponding to the target paternal ancestor. Figure 3 As shown:
[0104] A. If anc_ind i >hap_ind j , it indicates that in the process of constructing the initial haplotype network, the historical haplotype Historical mutation sets and historical haplotypes The historical mutation set has been judged for inclusion, and the historical haplotype The historical mutation set is not included in the historical haplotype The historical mutation set, so the current haplotype h′ j The mutation set is not included in the current haplotype h′ i The mutation set, that is, h′ j Not h′ i The target current haplotype corresponding to the target paternal ancestor. In this case, the inclusion relationship judgment is avoided, thereby speeding up the ancestor inference.
[0105] B. If anc_ind i =hap_ind j , indicating that the historical haplotype The historical mutation set is included in the historical haplotype The historical mutation set, so the current haplotype h j The mutation set of ′ is included in the current haplotype h i The mutation set of i, thus h j ′ is h i The target current haplotype corresponding to the target paternal ancestor of i. In this case, the inclusion relationship judgment is also avoided, thereby speeding up the ancestor inference.
[0106] C. If anc_ind i <hap_ind j , then determine the current haplotype h′ searched from the starting haplotype j The current mutation set M′ j Is it the current haplotype h'? i The current mutation set M′ i A proper subset of; if so, it means Then h′ j is h′ i The target current haplotype corresponding to the target paternal ancestor; otherwise, h′ j Not h′ i The target current haplotype corresponding to the target paternal ancestor.
[0107] Similarly, if h′ j Not h′ i The target current haplotype corresponding to the target paternal ancestor of h′ j+1 As the new h′ j , determine the new h′ j Is it h′ i The target current haplotype corresponding to the target paternal ancestor of the target is found until a paternal ancestor is found; if h j ′ is h i ′’s target ancestor’s target current haplotype, then for h i 'The task of searching for ancestors has been completed.
[0108] This method proposes a process for incrementally inferring haplotype ancestors. By comparing the current haplotype index with the ancestral index, the inclusion relationship judgment between sets is converted into a size comparison between integers, which speeds up the haplotype ancestry inference speed and thus reduces the time required for haplotype network construction.
[0109] Step S250, determining the edge information between each current haplotype according to each current haplotype and the target current haplotype corresponding to the target ancestor of the current haplotype, and further determining the target haplotype network based on the minimum dendrogram.
[0110] Specifically, the target current haplotype h corresponding to the target paternal ancestor j' is the starting point, the current haplotype h i ' is the end point, and according to the connection rule from ancestors to descendants, all current haplotypes are connected to the target current haplotypes corresponding to their target paternal ancestors. And according to the method described in S205, the side information (number of mutations) between the current haplotype and the target current haplotype of its target paternal ancestor is calculated. Finally, the target haplotype network based on the minimum tree diagram is obtained.
[0111] It should be noted that when additional sequences are acquired in the future, the target haplotype network is used as the initial haplotype network for future incremental construction of haplotype networks, and the process returns to step S210 to construct a new target haplotype network, and a series of haplotype networks are incrementally constructed in this way.
[0112] In summary, the present application utilizes the inclusion relationship between the haplotype mutation sets contained in the initial haplotype network to reduce the amount of computation for inferring ancestors in the target haplotype network, thereby speeding up the construction of the target haplotype network and filling the gap in the incremental calculation method of the haplotype network.
[0113] The present application provides a method for constructing a haplotype network, the method comprising: obtaining initial data of a plurality of newly added genome sequences and a determined initial haplotype network; combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes; for any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then according to the position of the target historical haplotype in the historical haplotype array and the historical haplotype corresponding to the historical sire and ancestor of the target historical haplotype, determine the current haplotype index and the ancestor index of the current haplotype; according to the current haplotype index, the ancestor index and the current mutation set of each current haplotype, determine the target current haplotype corresponding to the target sire and ancestor of the current haplotype; based on each current haplotype, the target current haplotype corresponding to the target sire and ancestor corresponding to each current haplotype and the side information between each current haplotype, determine the target haplotype network based on the minimum tree diagram. The existing haplotype network construction method is still slow in terms of running speed, because the existing method only considers the static situation, that is, constructs a haplotype network for a given genome data set. However, when the number of genome sequences continues to increase, the haplotype network needs to be updated regularly based on the newly added genome sequences. In this case, the static method can only build the haplotype network from scratch, and cannot make full use of the evolutionary relationship between the previously inferred historical haplotypes, resulting in a long operation time and difficulty in updating the existing haplotype network in a timely manner. The present application updates the existing haplotype network by utilizing the evolutionary relationship between the previously inferred historical haplotypes, thereby improving the operation efficiency of the haplotype network while ensuring the operation accuracy.
[0114] Corresponding to the above method, the present application embodiment also provides a device for constructing a monomer type network, such as Figure 4 As shown, the device comprises:
[0115] The acquisition unit 410 is used to acquire initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data includes a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; wherein each historical haplotype includes at least one historical genome sequence;
[0116] A combining unit 420 is used to combine each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes;
[0117] A matching unit 430 is used for determining, for any current haplotype, a current haplotype index and an ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotypes corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype;
[0118] A determination unit 440 is used to determine a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestor index and a current mutation set of each current haplotype;
[0119] And, based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
[0120] The functions of each functional unit of a monomeric network construction device provided in the above-mentioned embodiment of the present application can be realized through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in a monomeric network construction device provided in the embodiment of the present application are not repeated here.
[0121] The present application also provides an electronic device, such as Figure 5 As shown, it includes a processor 510 , a communication interface 520 , a memory 530 and a communication bus 540 , wherein the processor 510 , the communication interface 520 , and the memory 530 communicate with each other via the communication bus 540 .
[0122] Memory 530, for storing computer programs;
[0123] The processor 510 is used to execute the program stored in the memory 530 to implement the following steps:
[0124] Acquire initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data comprises a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; each historical haplotype comprises at least one historical genome sequence;
[0125] Combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes;
[0126] For any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then according to the positions of the historical haplotypes corresponding to the historical sire ancestor of the target historical haplotype and the historical haplotypes of the target historical haplotype in the historical haplotype array, respectively, determine the current haplotype index and the ancestor index of the current haplotype;
[0127] Determine a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestral index and a current mutation set of each current haplotype;
[0128] Based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
[0129] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0130] The communication interface is used for communication between the above electronic device and other devices.
[0131] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0132] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0133] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 2 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.
[0134] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes a method for constructing a monomer type network described in any one of the above embodiments.
[0135] In another embodiment provided by the present application, a computer program product comprising instructions is also provided, and when the computer is run on the computer, the computer executes the method for constructing a haplotype network described in any one of the above embodiments.
[0136] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0140] Unless otherwise defined, the technical terms or scientific terms used in this application should be understood by people with ordinary skills in the field to which the present invention belongs. "First", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect", "couple" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0141] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application embodiments are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application embodiments.
[0142] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application are within the scope of the embodiments in the present application and their equivalents, the embodiments in the present application are also intended to include these modifications and variations.
Claims
1. A method for constructing a haplotype network, characterized in that: The method comprises: Acquire initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data comprises a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; each historical haplotype comprises at least one historical genome sequence; Combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes; For any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then according to the positions of the historical haplotypes corresponding to the historical sire ancestor of the target historical haplotype and the historical haplotypes of the target historical haplotype in the historical haplotype array, respectively, determine the current haplotype index and the ancestor index of the current haplotype; Determine a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestral index and a current mutation set of each current haplotype; Based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
2. The method according to claim 1, characterized in that The determination of the initial haplotype network comprises: Determine mutation information of all historical genome sequences based on the reference genome sequence, process all historical genome sequences, and determine multiple historical haplotypes; wherein the reference genome sequence is set by selecting any one historical genome sequence from multiple historical genome sequences; According to the number of mutations of each historical haplotype, the number of historical genome sequences and the earliest sampling time, multiple historical haplotypes are sorted to determine a historical haplotype array; the earliest sampling time is determined according to the sampling time of each historical genome sequence in the corresponding historical haplotype; Determine the target historical haplotype corresponding to the historical paternal ancestor of other historical haplotypes except the historical haplotype where the reference genome sequence is located according to the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array; According to each historical haplotype and the corresponding target historical haplotype, determining the side information between each historical haplotype; Based on each historical haplotype, the corresponding target historical haplotype and the edge information between each historical haplotype, the initial haplotype network based on the minimum dendrogram is determined.
3. The method according to claim 2, characterized in that The preset rules include: According to the number of mutations of each historical haplotype, the number of historical genome sequences in each historical haplotype and the priority order of the earliest sampling time, each historical haplotype is sorted to determine the historical haplotype array.
4. The method according to claim 3, characterized in that Determining the current haplotype index and the ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotype corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array, respectively, includes: Determine the position value of the target historical haplotype in the historical haplotype array as the current haplotype index of the current haplotype; And, the position value of the historical haplotype corresponding to the historical paternal ancestor of the target historical haplotype in the historical haplotype array is determined as the ancestral index of the current haplotype.
5. The method according to claim 4, characterized in that The method further comprises: If the current mutation set of the current haplotype does not match the historical mutation set of the historical haplotype, the current haplotype index and ancestral index of the current haplotype are determined according to the configured index rule; wherein the index rule is that the current haplotype index is the number of historical haplotypes; and the ancestral index of the current haplotype is -1.
6. The method according to claim 5, characterized in that Before determining the target current haplotype corresponding to the target paternal ancestor of the current haplotype, the method further comprises: Determines the starting haplotype for ancestry search in the current haplotype array.
7. The method according to claim 6, characterized in that Determining a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to the current haplotype index, the ancestor index and the current mutation set of each current haplotype, comprising: According to the arrangement order of each current haplotype in the current haplotype array, the search is performed in sequence with the starting haplotype as the starting point, and the target current haplotype corresponding to the target paternal ancestor of the current haplotype is determined according to the configured ancestor judgment strategy; wherein the ancestor judgment strategy is determined based on the size of the ancestor index of the current haplotype and the haplotype index of the searched current haplotype and the relationship between the current mutation sets corresponding to the current haplotype and the searched current haplotype respectively.
8. A device for constructing a monomeric network, characterized in that: The device comprises: An acquisition unit, used for acquiring initial data of a plurality of newly added genome sequences and a determined initial haplotype network; wherein the initial data comprises a historical haplotype array composed of a plurality of historical haplotypes sorted according to a preset rule and a historical mutation set corresponding to each historical haplotype; wherein each historical haplotype comprises at least one historical genome sequence; A combining unit, used for combining each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes; A matching unit, for determining, for any current haplotype, a current haplotype index and an ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotypes corresponding to the historical ancestor of the target historical haplotype in the historical haplotype array, respectively, if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype; A determination unit, for determining a target current haplotype corresponding to a target paternal ancestor of the current haplotype according to a current haplotype index, an ancestral index and a current mutation set of each current haplotype; And, based on each current haplotype, the target current haplotype corresponding to the target sire ancestor corresponding to each current haplotype, and the edge information between each current haplotype, a target haplotype network based on a minimum dendrogram is determined.
9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Qualitative and quantitative detection method for paddy microorganisms
CN105603082A
Cross-modal target state detection method and device, intelligent device and medium
CN117392396A
Learning device and method
KR1020070103695A