A method and device for constructing a monolithic network, electronic equipment and medium
By acquiring new genome sequences and initial data, and utilizing the evolutionary relationships of historical haplotypes, an incremental haplotype network is constructed, which solves the problem of slow speed in existing methods and achieves efficient haplotype network updates.
Patent Information
- Application Number
- CN202411406825.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Existing haplotype network construction methods are slow when processing large-scale genomic data, and cannot quickly construct haplotype networks, thus failing to meet the needs of large-scale data.
By acquiring data from multiple newly added genome sequences and the initial haplotype network, and utilizing the evolutionary relationships between historical haplotypes, the index and ancestral index of the current haplotype are determined. The target haplotype network is then constructed based on a minimal dendrogram, and the haplotype network is updated incrementally.
While ensuring computational accuracy, it improves the construction efficiency of monolithic networks, reduces computation time, and enables timely updates to monolithic networks.
Smart Images

Figure CN119380809B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of bioinformatics, and more specifically, to a method, apparatus, electronic device, and medium for constructing a monomorphic network. Background Technology
[0002] With the rapid development of gene sequencing technology, the scale of genomic data is exploding, posing new challenges to the ability of existing haplotype network construction methods to handle large-scale genomic data. A certain virus has already collected over 17 million genome sequences, and is growing at an average rate of 73,000 sequences per week. Traditional haplotype network construction methods, such as MSN, MJN, TCS, and RMST, are slow and cannot quickly construct haplotype networks. For example, the MJN method implemented in the well-known haplotype network construction software POPART takes more than 3 days to construct a haplotype network from 1000 genome sequences of a certain virus, which cannot meet the needs of processing large-scale data. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, electronic device and medium for constructing a monolithic network, so as to solve the above-mentioned problems existing in the prior art and improve the efficiency of constructing a monolithic network.
[0004] Firstly, a method for constructing a monolithic network is provided, which may include:
[0005] The initial data for obtaining multiple newly added genome sequences and a determined initial haplotype network includes an array of historical haplotypes sorted according to a preset rule and a set of historical mutations corresponding to each historical haplotype; each historical haplotype includes at least one historical genome sequence.
[0006] By combining each newly added genome sequence and / or each historical genome sequence, multiple current haplotypes can be identified;
[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 the current haplotype index and ancestor index of the current haplotype are determined according to the positions of the target historical haplotype and the historical haplotypes corresponding to the historical parents and ancestors of the target historical haplotype in the historical haplotype array, respectively.
[0008] Based on the current haplotype index, ancestor index and current mutation set of each current haplotype, determine the target current haplotype corresponding to the target parent ancestor of the current haplotype;
[0009] Based on each current monomer type, the target current monomer type corresponding to the target parent ancestor of each current monomer type, and the edge information between each current monomer type, a target monomer type network based on a minimum tree graph is determined.
[0010] In one possible implementation, determining the initial monolithic network includes:
[0011] Based on the reference genome sequence, mutation information of all historical genome sequences is determined, and all historical genome sequences are processed to identify multiple historical haplotypes; wherein, the reference genome sequence is set by selecting any one of the multiple historical genome sequences;
[0012] Based on the number of mutations, the number of historical genome sequences, and the earliest sampling time of each historical haplotype, multiple historical haplotypes are sorted to determine a historical haplotype array; the earliest sampling time is determined based on the sampling time of each historical genome sequence in the corresponding historical haplotype.
[0013] Based on the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array, the target historical haplotypes corresponding to the historical ancestors of other historical haplotypes besides the historical haplotype where the reference genome sequence is located are determined.
[0014] Based on each historical unit type and the corresponding target historical unit type, determine the edge information between each historical unit type;
[0015] Based on each historical unit type, the corresponding target historical unit type, and the edge information between each historical unit type, the initial unit type network based on the minimum tree graph is determined.
[0016] In one possible implementation, the preset rules include:
[0017] The historical haplotypes are sorted according to the number of mutations in each historical haplotype, the number of historical genome sequences in each historical haplotype, and the priority order of the earliest sampling time to determine the historical haplotype array.
[0018] In one possible implementation, the current monomer index and the ancestor index of the current monomer are determined based on the positions of the target historical monomer type and the historical monomer type corresponding to the historical ancestor of the target historical monomer type in the historical monomer type array, respectively, including:
[0019] The position value of the target historical monomer type in the historical monomer type array is determined as the current monomer type index of the current monomer type;
[0020] Furthermore, the position value of the historical monomer corresponding to the historical parent ancestor of the target historical monomer in the historical monomer array is determined as the ancestor index of the current monomer.
[0021] In one 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, then the current haplotype index and ancestor index of the current haplotype are determined according to the configured index rules; wherein, the index rule is that the current haplotype index is the number of historical haplotypes; and the ancestor index of the current haplotype is -1.
[0023] In one possible implementation, before determining the target current haplotype corresponding to the target parent ancestor of the current haplotype, the method further includes:
[0024] Determine the starting singleton for ancestor search in the current singleton array.
[0025] In one possible implementation, the target current haplotype corresponding to the target parent ancestor of the current haplotype is determined based on the current haplotype index, ancestor index, and current mutation set of each current haplotype, including:
[0026] According to the arrangement order of each current haplotype in the current haplotype array, the search is performed sequentially starting from the initial haplotype, and the target current haplotype corresponding to the target parent ancestor of the current haplotype is determined according to the configured ancestor determination strategy; wherein, the ancestor determination strategy is determined based on the magnitude 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] Secondly, a device for constructing a monolithic network is provided, the device including:
[0028] An acquisition unit is used to acquire initial data of multiple newly added genome sequences and a determined initial haplotype network; wherein, the initial data includes a historical haplotype array composed of multiple 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;
[0029] Combination unit, used to combine newly added genome sequences and / or historical genome sequences to determine multiple current haplotypes;
[0030] The matching unit is used to determine the current haplotype index and ancestor index of the current haplotype for any current haplotype if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, based on the positions of the target historical haplotype and the historical haplotypes corresponding to the historical parents and ancestors of the target historical haplotype in the historical haplotype array, respectively.
[0031] The determining unit is used to determine the target current haplotype corresponding to the target parent ancestor of the current haplotype based on the current haplotype index, ancestor index and current mutation set of each current haplotype.
[0032] Furthermore, based on each current monomer type, the target current monomer type corresponding to the target parent ancestor of each current monomer type, and the edge information between each current monomer type, a target monomer type network based on a minimum tree graph is determined.
[0033] Thirdly, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0034] Memory, used to store computer programs;
[0035] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0036] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0037] This application provides a method for constructing a haplotype network. The method includes: acquiring multiple newly added genome sequences and initial data for a determined initial haplotype network; combining each newly added genome sequence and / or each historical genome sequence to determine multiple current haplotypes; for any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of a target historical haplotype, determining the current haplotype index and ancestor index of the current haplotype based on the positions of the target historical haplotype and its corresponding historical ancestor in the historical haplotype array; determining the target current haplotype corresponding to the target ancestor of the current haplotype based on the current haplotype index, ancestor index, and the current mutation set of each current haplotype; and determining the target haplotype network based on a minimum tree graph based on each current haplotype, the target current haplotype corresponding to the target ancestor of each current haplotype, and the edge information between each current haplotype. Existing haplotype network construction methods are still relatively slow in terms of running speed because they only consider the static case, i.e., constructing a haplotype network for a given genome dataset. However, as genome sequences continue to increase, haplotype networks need to be updated periodically based on the new genome sequences. In this case, static methods can only construct haplotype networks from scratch, failing to fully utilize previously inferred evolutionary relationships between historical haplotypes. This results in excessively long computation times and makes it difficult to update existing haplotype networks in a timely manner. This application, however, utilizes previously inferred evolutionary relationships between historical haplotypes to update existing haplotype networks, improving computational efficiency while maintaining computational accuracy. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A system architecture diagram for a method of constructing a monolithic network provided in an embodiment of this application;
[0040] Figure 2 A flowchart illustrating a method for constructing a monolithic network as provided in an embodiment of this application;
[0041] Figure 3 A flowchart illustrating the ancestor determination strategy provided in an embodiment of this application;
[0042] Figure 4A schematic diagram of a device for constructing a monolithic network provided in an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0045] For ease of understanding, the terms used in the embodiments of this application are explained below:
[0046] Haplotype networks, also known as haplotype networks, are methods for analyzing evolutionary relationships between genomic sequences within a biological population or species. This method is typically applied to genetic data where recombination is less likely to occur, such as mitochondrial genes, chloroplast genes, viral genes, and male-specific regions of the mammalian Y chromosome. It is an important tool for studying human origins, viral transmission pathways, and other related issues.
[0047] Haplotype: An important concept in genetics, it refers to a specific combination of genes or DNA markers that are closely linked (i.e. located on the same chromosome and not easily separated).
[0048] The method for constructing a monolithic network provided in this application embodiment can be applied to... Figure 1 In the system architecture shown, such as Figure 1As shown, the system may include a server and a terminal. The server can be a physical server, a server cluster consisting of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal may be a user equipment (UE) such as a mobile phone, smartphone, laptop, digital radio receiver, personal digital assistant (PDA), tablet computer (PAD), handheld device, in-vehicle device, wearable device, computing device, or other processing device connected to a wireless modem, mobile station (MS), mobile terminal, etc. The terminal and server can be directly or indirectly connected via wired or wireless communication methods, which is not limited herein.
[0049] The terminal is used to acquire multiple new genome sequences and initial data of the determined initial haplotype network, and send the multiple new genome sequences and initial data to the server respectively;
[0050] A server is used to receive multiple new genome sequences and initial data to execute a method for constructing a monomorphic network provided in this application.
[0051] With the rapid development of gene sequencing technology, the scale of genomic data is exploding, posing new challenges to the ability of existing haplotype network construction methods to handle large-scale genomic data. A certain virus has already collected over 17 million genome sequences, and is growing at an average rate of 73,000 sequences per week. Traditional haplotype network construction methods, such as MSN, MJN, TCS, and RMST, are slow and cannot quickly construct haplotype networks. For example, the MJN method implemented in the well-known haplotype network construction software POPART takes more than 3 days to construct a haplotype network from 1000 genome sequences of a certain virus, which cannot meet the needs of processing large-scale data.
[0052] Therefore, this application provides a method for constructing a monolithic network to solve the above-mentioned problems in the prior art, which can improve the efficiency of constructing a monolithic network while ensuring the accuracy of the monolithic network.
[0053] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0054] Figure 2 This is a flowchart illustrating a method for constructing a monolithic network, as provided in an embodiment of this application. Figure 2 As shown, the method may include:
[0055] Step S210: Obtain multiple newly added genome sequences, the new sampling time of each newly added genome sequence, and the initial data of the determined initial haplotype network.
[0056] The initial data includes an array of historical haplotypes composed of multiple historical haplotypes sorted according to preset rules and a set of historical mutations corresponding to each historical haplotype; each historical haplotype includes at least one historical genome sequence.
[0057] Before performing step S210, the process of determining the initial monolithic network may specifically include:
[0058] S201: Obtain available genome sequence data (multiple historical genome sequences) and corresponding metadata for a certain taxonomic group; metadata can be understood as attribute data of historical genome sequences, such as the sampling time of historical genome sequences.
[0059] Specifically, the multiple historical genome sequences obtained are denoted 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}; Any historical genome sequence from multiple historical genome sequences can be designated as a reference genome sequence, for example: let s n-1 The reference genome sequence is used; the sampling time of the i-th historical genome sequence is denoted as t(s). i Historical genome sequences sampled earlier are typically used as reference genome sequences.
[0060] S202: Based on mutation information in multiple historical genome sequences determined from the reference genome sequence, the historical genome sequences are combined to determine multiple historical haplotypes.
[0061] Specifically, using the reference genome sequence as a standard, mutation information is extracted from each historical genome sequence in the historical genome sequence sample set S, thereby obtaining the i-th historical genome sequence s. i The corresponding historical mutation set M(s) iThe extraction of mutation information can be understood as follows: due to the long coding length of genome sequences, for biological research, it is only necessary to study the coding portions that differ from the reference genome sequence to reduce the corresponding computational load and improve computational efficiency. Therefore, only the coding portions that differ from the reference genome sequence are extracted. The extraction process includes, but is not limited to, preprocessing, alignment, variant detection, and annotation of each historical genome sequence. It should be noted that the mutation information of the reference genome sequence can also be determined, thereby identifying its haplotype. In fact, the mutation set corresponding to the reference genome sequence is an empty set, meaning no mutations have occurred.
[0062] Then, the historical genome sequences corresponding to the same set of historical mutations are merged to obtain at least one historical haplotype, denoted as m historical haplotypes h0,…,h m-1 The m historical haplotypes satisfy the condition that the historical mutation set corresponding to the historical genome sequence in each haplotype is the same, while the historical mutation set corresponding to the historical genome sequence in different haplotypes is different.
[0063] S203: Based on the number of mutations in each historical haplotype, the number of historical genome sequences, and the earliest sampling time, sort multiple historical haplotypes to determine the historical haplotype array.
[0064] Specifically, let S i Represents the i-th historical singleton type h i The corresponding set of historical genome sequences, t(s j ) represents the sampling time of the j-th historical genome sequence, using the formula Calculate the earliest sampling time for any historical haplotype, which is the minimum sampling time of all historical genome sequences within the historical haplotype.
[0065] Using formula M i =M(s) j ), From the historical mutation set of the historical genome sequence, calculate the historical mutation set corresponding to each historical haplotype, where M i Represents the i-th historical singleton type h i The corresponding historical mutation set is used to determine the number of mutations. The number of mutations in a historical haplotype can be understood as the number of bases mutated in the historical genome sequence compared to the reference genome sequence. For example, when the reference genome sequence is AAAAA and the historical genome sequences of a certain 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, the priority is the number of mutations | M i |and the number of historical genome sequences z i Sort in descending order, then sort by earliest sampling time t i Sort in ascending order to obtain a sorted array of historical singleton types, still denoted as h0,…,h m-1 The above process follows preset rules.
[0068] It should be noted that the indices of the historical mutation set and the earliest sampling time for each historical monomer type have also been adjusted accordingly.
[0069] S204: Based on the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array, determine the target historical haplotype corresponding to the historical ancestor of other historical haplotypes besides the historical haplotype where the reference genome sequence is located.
[0070] Specifically, for each other historical singleton h i Following the order of the historical singleton types in the array, the search begins from j = i + 1 and continues until the smallest j that satisfies the condition is found. That is, h i The subscript π of the target historical monotype corresponding to the historical father and ancestors. i Satisfy the formula In other words, it obtains the target historical haplotype corresponding to the historical ancestor of other historical haplotypes besides the historical haplotype where the reference genome sequence is located.
[0071] S205: Based on each historical unit type and the corresponding target historical unit type, determine the edge information between each historical unit type, and further determine the initial unit type network based on the minimum tree graph.
[0072] Specifically, the subscript is π i Starting with the target historical monotype, historical monotype h i As the endpoint, following the connection rule from ancestor to descendant, all historical singleton types h are... i Connect the target historical singleton type corresponding to its historical parent and ancestor. The length of the edge (edge information) is defined as h of the historical singleton type. i With their historical fathers and ancestors The number of mutations between, i.e., the historical haplotype h i The number of mutations in the mutation set is related to its historical parents and ancestors. The difference in the number of mutations in the mutation set is calculated using the following formula: The final result is an initial monolithic network based on a minimum tree diagram.
[0073] Understandably, the initial monomorphic network based on the minimum tree graph can be viewed as a tree graph, where the nodes are all historical monomorphs h0,…,h m-1 The composition of the tree diagram, including the edges pointing to each haplotype, needs to be inferred from the haplotype mutation set, the earliest sampling time, and the number of historical genome sequences; the initial haplotype network edge set is...
[0074] During evolution, due to chromosome breakage, duplication errors, and other reasons, certain genes may duplicate one or more times in the genome, or different species may acquire each other's genome sequences through direct exchange of genetic material, forming new sequences under natural conditions; or under laboratory conditions in specific scenarios. In short, newly generated genome sequences refer to newly sequenced genome sequences (whose mutation set may be the same as or different from the mutation set of any historical genome sequence). These sequences can arise spontaneously in nature or be artificially created. That is, obtaining multiple newly generated genome sequences (s...) n ,…,s n′-1 After this, these newly added genome sequences often carry important biological functions and are of great significance for promoting scientific and technological progress.
[0075] Step S220: Combine each newly added genome sequence and / or each historical genome sequence to determine multiple current haplotypes, and sort the multiple current haplotypes to obtain a current haplotype array.
[0076] Specifically, S221, multiple newly added genome sequences (s n ,…,s n′-1 The genome set S′=S∪{s} is obtained by combining it with multiple historical genome sequences. 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′, combine each newly added genome sequence and each historical genome sequence to determine multiple current haplotypes. The specific combination process is the same as step S202.
[0078] S223. Sort multiple current singleton types according to preset rules to obtain an array of current singleton types.
[0079] The specific sorting process is the same as step S203, which is to sort multiple current haplotypes according to the number of mutations in each current haplotype, the number of current genome sequences, and the earliest sampling time of new additions, and determine the current haplotype array h′0,…,h′ m′-1 , m′ represents the current number of monomer types.
[0080] Among them, the earliest newly added sampling time is the minimum of the newly added sampling time and / or sampling time corresponding to each newly added genomic sequence and / or historical genomic sequence in each current haplotype.
[0081] Step S230: Match each current haplotype with each historical haplotype, and determine the current haplotype index and the ancestor index of the current haplotype based on the matching results.
[0082] Specifically, S231, for any current haplotype, match the current mutation set of the current haplotype with the historical mutation sets of each historical haplotype:
[0083] In some embodiments, the matching process can M i Construct a hash table using M′ as the key and retrieve M′ j With M i The correspondence. M i Let M′ be the set of historical mutations. j This represents the current set of mutations.
[0084] A. If the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, then 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 historical parents and ancestors of the target historical haplotype in the historical haplotype array.
[0085] The process of determining the current haplotype index and ancestor index may include:
[0086] The position value of the target historical monomer type in the historical monomer type array is determined as the current monomer type index of the current monomer type; it should be noted that the current monomer type index and the ancestor index mentioned in this application are both a single value.
[0087] Additionally, the position value of the historical monomer corresponding to the historical parent ancestor of the target historical monomer in the historical monomer array is determined as the ancestor index of the current monomer.
[0088] B. If the current mutation set of the current haplotype fails to match the historical mutation sets of all historical haplotypes, then the current haplotype index and the ancestor index of the current haplotype are determined according to the configured index rules.
[0089] The exponent rules are as follows: the current haplotype exponent is the number of historical haplotypes m (or any number greater than m); the ancestor exponent of the current haplotype is -1 (or any number less than -1).
[0090] The above current monomer type index hap_ind i The process of determining is illustrated by the following formula:
[0091]
[0092] The ancestor index anc_ind mentioned above i The process of determining is illustrated by the following formula:
[0093]
[0094] This approach introduces the concepts and calculation formulas of the current haplotype index and the ancestor index, which are used to extract information from the initial haplotype network and provide a data foundation 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 parent ancestor of the current haplotype based on the current haplotype index, ancestor index and current mutation set of each current haplotype.
[0096] Before performing step S240, the method may further include:
[0097] Determine the starting singleton for ancestor search in the current singleton array.
[0098] Specifically, in order to reduce the computational complexity of determining inclusion relationships, considering |M′ j |<|M′ i |Yes A necessary condition is met, and comparing integers takes less computation time than determining set inclusion relationships. Therefore, the starting point for ancestor search of the i-th current singleton can be one that satisfies |M′. j |<|M′ i The minimum j given the condition can be obtained by applying the following formula:
[0099] start_ind i =min{j||M′ j |<|M′ i |}.
[0100] Calculate the position value of the starting singleton in the ancestor search to determine the starting singleton in the current singleton array.
[0101] This approach proposes a formula for calculating the starting point of ancestor inference, which narrows down the range of possible ancestors and reduces the number of times ancestor inference is performed on monomorphic networks, thereby further accelerating the construction of the target monomorphic network.
[0102] Step S240 may specifically include: searching sequentially from the starting singleton type, according to the order of the current singleton types in the current singleton type array, to determine the target current singleton type corresponding to the target parent ancestor; that is, for any current singleton type, let's say h. i ', from j = start_ind i ,start_ind i +1,…,m′-1 sequentially determine the current monomer type h j Is it h? i The target parent ancestor is determined until the first target parent ancestor appears.
[0103] Ancestor determination strategies include: determining the ancestor index anc_ind of the current singleton type. i and the haplotype index hap_ind of the current haplotype found j The size is used to determine the target's current singleton type corresponding to the target's parent and ancestor, combined with... Figure 3 As shown:
[0104] A. If anc_ind i >hap_ind j This indicates that during the initial construction of the monolithic network, the historical monolithic... Historical mutation sets and historical haplotypes The historical mutation set has been subjected to inclusion relationship judgment, and the historical haplotype The set of historical mutations is not included in the historical haplotype. The historical mutation set, therefore the current haplotype h′ j The mutation set is not included in the current haplotype h′ i The mutation set, i.e., h′ j Not h′ i The target's current singleton type corresponds to the target's parent ancestor. In this case, inclusion relationship checks are avoided, thus speeding up ancestor inference.
[0105] B. If anc_ind i =hap_ind j This indicates the historical haplotype. The set of historical mutations is contained in historical haplotypes The historical mutation set, therefore the current haplotype h j The mutation set of ′ is contained in the current haplotype h i The mutation set of i, thus h j ′ is h i The target current singleton type corresponds to the parent ancestor of i. In this case, the inclusion relationship judgment is also avoided, thus speeding up the ancestor inference.
[0106] C. If anc_ind i <hap_ind j Then determine the current monomer type h′ found from the initial monomer type search. j The current mutation set M′ j Is it the current singleton type h′? i The current mutation set M′ i If it is a proper subset, then it indicates that... Then h′ j It is h′ i The target's current singleton type corresponds to the target's parent / ancestor; otherwise, h′ j Not h′ i The target's parent and ancestor correspond to the target's current single-type.
[0107] And so on, if h′ j Not h′ i If the target's parent ancestor corresponds to the target's current singleton type, then h′ will be... j+1 As the new h′ j Determine the new h′ j Is it h′? i The target's current singleton type corresponds to the target's parent ancestor, until a parent ancestor is found; if h j ′ is h i If the target's parent ancestor corresponds to the target's current singleton type, then for h... i The search for ancestors has been completed.
[0108] This approach proposes an incremental process for inferring the ancestors of singletons. By comparing the current singleton index with the ancestor index, the determination of the inclusion relationship between sets is transformed into a comparison of the size of integers, which speeds up the inference of singleton ancestors and reduces the time required to build singleton networks.
[0109] Step S250: Based on each current singleton type and the target current singleton type corresponding to the target parent ancestor of each current singleton type, determine the edge information between each current singleton type, and further determine the target singleton type network based on the minimum tree graph.
[0110] Specifically, the target's current singleton type h corresponds to the target's parent and ancestor. jStarting from ′, the current singleton type h i Using ' as the endpoint, following the connection rule from ancestor to descendant, connect all current haplotypes to their corresponding target current haplotypes from their target parent ancestors. Then, calculate the edge information (mutation count) between the current haplotype and its target current haplotype from its target parent ancestors, as described in S205. Finally, obtain the target haplotype network based on a minimum tree graph.
[0111] It should be noted that when a new sequence is obtained in the future, the target monomorphic network is used as the initial monomorphic network when building the monomorphic network incrementally in the future, and the process returns to step S210 to build a new target monomorphic network. This process is repeated to incrementally build a series of monomorphic networks.
[0112] In summary, this application utilizes the inclusion relationship between the set of haplotype mutations contained in the initial haplotype network to reduce the computational amount of ancestor inference in the target haplotype network, thereby accelerating the construction speed of the target haplotype network and filling the gap in incremental computation methods for haplotype networks.
[0113] This application provides a method for constructing a haplotype network. The method includes: acquiring multiple newly added genome sequences and initial data for a determined initial haplotype network; combining each newly added genome sequence and / or each historical genome sequence to determine multiple current haplotypes; for any current haplotype, if the current mutation set of the current haplotype matches the historical mutation set of a target historical haplotype, then determining the current haplotype index and the ancestor index of the current haplotype based on the position of the target historical haplotype in the historical haplotype array and the historical haplotypes corresponding to the historical ancestors of the target historical haplotype; determining the target current haplotype corresponding to the target ancestor of the current haplotype based on the current haplotype index, the ancestor index, and the current mutation set of each current haplotype; and determining a target haplotype network based on a minimum tree graph based on each current haplotype, the target current haplotypes corresponding to the target ancestors of each current haplotype, and the edge information between each current haplotype. Existing haplotype network construction methods are still relatively slow in terms of running speed because they only consider the static case, i.e., constructing a haplotype network for a given genome dataset. However, as genome sequences continue to increase, haplotype networks need to be updated periodically based on the new genome sequences. In this case, static methods can only construct haplotype networks from scratch, failing to fully utilize previously inferred evolutionary relationships between historical haplotypes. This results in excessively long computation times and makes it difficult to update existing haplotype networks in a timely manner. This application, however, utilizes previously inferred evolutionary relationships between historical haplotypes to update existing haplotype networks, improving computational efficiency while maintaining computational accuracy.
[0114] Corresponding to the above method, embodiments of this application also provide a device for constructing a monolithic network, such as... Figure 4 As shown, the device includes:
[0115] The acquisition unit 410 is used to acquire initial data of multiple newly added genome sequences and a determined initial haplotype network; wherein, the initial data includes a historical haplotype array composed of multiple 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] Combination unit 420 is used to combine each newly added genome sequence and / or each historical genome sequence to determine multiple current haplotypes;
[0117] Matching unit 430 is used to determine the current haplotype index and ancestor index of the current haplotype for any current haplotype if the current mutation set of the current haplotype matches the historical mutation set of the target historical haplotype, based on the positions of the target historical haplotype and the historical haplotypes corresponding to the historical parents and ancestors of the target historical haplotype in the historical haplotype array respectively.
[0118] The determining unit 440 is used to determine the target current haplotype corresponding to the target parent ancestor of the current haplotype based on the current haplotype index, ancestor index and current mutation set of each current haplotype.
[0119] Furthermore, based on each current monomer type, the target current monomer type corresponding to the target parent ancestor of each current monomer type, and the edge information between each current monomer type, a target monomer type network based on a minimum tree graph is determined.
[0120] The functions of each functional unit in the monolithic network construction apparatus provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the monolithic network construction apparatus provided in the embodiments of this application will not be repeated here.
[0121] This 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 through the communication bus 540.
[0122] Memory 530 is used to store computer programs;
[0123] When the processor 510 executes the program stored in the memory 530, it performs the following steps:
[0124] The initial data for obtaining multiple newly added genome sequences and a determined initial haplotype network includes an array of historical haplotypes sorted according to a preset rule and a set of historical mutations corresponding to each historical haplotype; each historical haplotype includes at least one historical genome sequence.
[0125] By combining each newly added genome sequence and / or each historical genome sequence, multiple current haplotypes can be identified;
[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 the current haplotype index and ancestor index of the current haplotype are determined according to the positions of the target historical haplotype and the historical haplotypes corresponding to the historical parents and ancestors of the target historical haplotype in the historical haplotype array, respectively.
[0127] Based on the current haplotype index, ancestor index and current mutation set of each current haplotype, determine the target current haplotype corresponding to the target parent ancestor of the current haplotype;
[0128] Based on each current monomer type, the target current monomer type corresponding to the target parent ancestor of each current monomer type, and the edge information between each current monomer type, a target monomer type network based on a minimum tree graph 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. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0130] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0131] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0132] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0133] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.
[0134] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform a method for constructing a monolithic network as described in any of the above embodiments.
[0135] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute a method for constructing a monolithic network as described in any of the above embodiments.
[0136] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of computer program products 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] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0140] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected," "coupled," or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0141] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the embodiments in this application are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments in this application.
[0142] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the embodiments of this application and their equivalents, then these modifications and variations are also intended to be included in the embodiments of this application.
Claims
1. A method of constructing a monolithic network, characterized by, The method comprises: obtaining initial data of a plurality of new genomic 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 genomic sequence; combining each new genomic sequence and / or each historical genomic 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 a target historical haplotype, determining the current haplotype index and ancestor index of the current haplotype according to the positions of the target historical haplotype and the historical haplotype corresponding to the historical parent ancestor of the target historical haplotype in the historical haplotype array; determining the target current haplotype corresponding to the target parent ancestor of the current haplotype according to the current haplotype index, the ancestor index of the current haplotype, and the current mutation set of each current haplotype; determining a target haplotype network based on a minimum tree graph based on each current haplotype, the target current haplotype corresponding to the corresponding target parent ancestor of each current haplotype, and the edge information between each current haplotype; The determination of the initial haplotype network comprises: determining the mutation information of all historical genomic sequences based on a reference genomic sequence, processing all historical genomic sequences, and determining a plurality of historical haplotypes; wherein the reference genomic sequence is set by selecting any historical genomic sequence from a plurality of historical genomic sequences; sorting a plurality of historical haplotypes according to the number of mutations of each historical haplotype, the number of historical genomic sequences, and the earliest sampling time to determine a historical haplotype array; the earliest sampling time is determined according to the sampling time of each historical genomic sequence in the corresponding historical haplotype; determining the target historical haplotype corresponding to the historical parent ancestor of each historical haplotype except the historical haplotype in which the reference genomic 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; determining the edge information between each historical haplotype according to each historical haplotype and the corresponding target historical haplotype; determining the initial haplotype network based on a minimum tree graph based on each historical haplotype, the corresponding target historical haplotype, and the edge information between each historical haplotype.
2. The method of claim 1, wherein, The preset rule comprises: sorting each historical haplotype according to the priority order of the number of mutations of each historical haplotype, the number of historical genomic sequences in each historical haplotype, and the earliest sampling time to determine the historical haplotype array.
3. The method of claim 2, wherein, 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 parent ancestor of the target historical haplotype in the historical haplotype array, comprises: determining the position value of the target historical haplotype in the historical haplotype array as the current haplotype index of the current haplotype; and a position value of a historical haplotype corresponding to a historical parent ancestor of the target historical haplotype in the historical haplotype array is determined as an ancestor index of the current haplotype.
4. The method of claim 3, wherein, The method further comprises: if the current mutation set of the current haplotype does not match the historical mutation set of the historical haplotype, determining a current haplotype index and an ancestor index of the current haplotype according to a configured index rule; wherein the index rule is that the current haplotype index is the number of historical haplotypes; and the ancestor index of the current haplotype is -1.
5. The method of claim 4, wherein, Before determining the target current haplotype corresponding to the target parent ancestor of the current haplotype, the method further comprises: determining a starting haplotype for ancestor searching in the current haplotype array.
6. The method of claim 5, wherein, According to the current haplotype index, the ancestor index of the current haplotype, and the current mutation set of each current haplotype, the target current haplotype corresponding to the target parent ancestor of the current haplotype is determined, comprising: according to the arrangement order of each current haplotype in the current haplotype array, starting from the starting haplotype, sequentially searching, and determining the target current haplotype corresponding to the target parent ancestor of the current haplotype according to a configured ancestor judgment strategy; wherein the ancestor judgment strategy is determined according to 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 set corresponding to the current haplotype and the current mutation set corresponding to the searched current haplotype.
7. A device for constructing a monolithic network, characterized by The device comprises: an acquisition unit configured to acquire initial data of a plurality of newly added genome sequences and an 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 combination unit configured to combine each newly added genome sequence and / or each historical genome sequence to determine a plurality of current haplotypes; a matching unit configured to, for any current haplotype, if a current mutation set of the current haplotype matches a historical mutation set of a target historical haplotype, determine a current haplotype index and an ancestor index of the current haplotype according to positions of the target historical haplotype and a historical haplotype corresponding to a historical parent ancestor of the target historical haplotype in the historical haplotype array; a determination unit configured to determine a target current haplotype corresponding to a target parent ancestor of the current haplotype according to the current haplotype index, the ancestor index of the current haplotype, and the current mutation set of each current haplotype; and determine a target haplotype network based on a minimum tree graph based on each current haplotype, a target current haplotype corresponding to a corresponding target parent ancestor of each current haplotype, and edge information between each current haplotype. The determination of the initial haplotype network comprises: determining mutation information of all historical genome sequences based on a reference genome sequence, processing all historical genome sequences, and determining a plurality of historical haplotypes; wherein the reference genome sequence is any historical genome sequence selected from a plurality of historical genome sequences. According to the number of mutations of each historical haplotype, the number of historical genome sequences, and the earliest sampling time, a plurality of 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; According to the historical mutation set of each historical haplotype and the position of each historical haplotype in the historical haplotype array, a target historical haplotype corresponding to the historical parent ancestor of the historical haplotype other than the historical haplotype in which the reference genome sequence is located is determined; According to each historical haplotype and the corresponding target historical haplotype, edge information between each historical haplotype is determined; 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 tree graph is determined.
8. An electronic device, comprising: The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store a computer program; The processor is used to execute the program stored on the memory to implement the method steps of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps of any one of claims 1-6.
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