A haploid modeling method based on pan-genome genetic information
By dividing the pan-genome data into core sequence segments and windows, parallel modeling, and combining hash mapping and Mersenne rotation algorithms, the problem of low haploid modeling efficiency in existing technologies is solved, and efficient and accurate haploid modeling is achieved.
Patent Information
- Application Number
- CN202411982659.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing haploid modeling methods have low modeling efficiency due to the huge amount of pan-genome data and complex connection methods.
By dividing the pan-genome data into core sequence segments and non-core sequence segments, and performing parallel modeling based on the core window, using hash mapping to count the frequency, using linear reference haploids as indexes, combining the Mersenne twister algorithm and depth-first search strategy, efficient haploid modeling is performed.
The efficiency of haploid modeling is improved, the accuracy and stability of modeling are ensured, and high-precision haploid topological structure reconstruction is achieved.
Smart Images

Figure CN119785884B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of genetic engineering technology, and in particular to a haploid modeling method based on pan-genome genetic information. Background Art
[0002] Haploidy is of great significance in human genome research, primarily by simplifying genome analysis, improving data accuracy, and advancing genetic research. Because haploid genomes contain only one set of chromosomes, they avoid the interference of allelic differences found in diploids, facilitate accurate genome sequence assembly, and reveal the combinations of alleles on chromosomes, known as haplotypes, thereby better understanding the relationship between genetic variation and complex diseases. Furthermore, the haploid background simplifies the study of gene expression regulation and epigenetics, facilitating the analysis of gene function. In particular, gene manipulation in haploid cells is more efficient in gene editing and cell engineering. Furthermore, studies of the Y chromosome and mitochondrial DNA using haploid genomes can reconstruct human genetic transmission patterns and shed light on human evolution and migration history. Therefore, haploid genomes play an irreplaceable role in precision medicine, genetics, genomics, and human evolution research.
[0003] Haploid modeling can effectively increase the amount of haploid data, facilitate the construction of high-precision genetic maps, and be used to train and evaluate the performance of machine learning algorithms in biological data mining. However, existing haploid modeling methods suffer from low efficiency due to the large amount of pan-genomic data, complex internal connections, and numerous loops and circles. Summary of the Invention
[0004] The purpose of the present invention is to provide a haploid modeling method based on pan-genome genetic information to address the problem of low efficiency of existing haploid modeling.
[0005] The technical solution adopted by the present invention to solve the above technical problems is:
[0006] A haploid modeling method based on pan-genome genetic information comprises the following steps:
[0007] Step 1: Obtain pan-genome data and divide the sequence segments in the pan-genome data into core sequence segments and non-core sequence segments;
[0008] Step 2: Divide the core window based on the divided core sequence segments and non-core sequence segments;
[0009] Step 3: Use the linear reference haploid as an index, and use the core sequence segment and core window as a skeleton to perform haploid modeling in parallel with the core window.
[0010] Furthermore, the specific steps of step one are:
[0011] Obtain pan-genome data and perform statistics on the frequency of sequence occurrence in the pan-genome data. The sequence segments that all haploids in the pan-genome data have are core sequence segments, and the rest are non-core sequence segments.
[0012] Furthermore, the specific steps of step one are:
[0013] Step 11: Obtain pan-genome data and obtain reverse complementary sequence segments of sequence segments in the pan-genome data;
[0014] Step 1 and 2: Add the reverse complementary sequences of all sequence segments in the pan-genome to the pan-genome in the same way as their original forward connections;
[0015] Step 13: Perform frequency statistics on the sequence segments in the pan-genome. If the number of occurrences of a sequence segment is the same as the total number of haploids in the pan-genome, then the sequence segment is considered the core sequence segment of the pan-genome, and the rest are non-core sequence segments.
[0016] Furthermore, in steps 1 and 3, frequency statistics of sequence segments in the pan-genome are performed through hash mapping.
[0017] Furthermore, the frequency statistics of sequence segments in the pan-genome using hash mapping are expressed as:
[0018]
[0019] Among them, H(t i ) is the haploid identification set, H is the hash map storage, t i is the number of the i-th sequence segment, s j is the jth haploid number, N is the total number of samples, and T is the core sequence segment set.
[0020] Furthermore, the specific steps of step 2 are:
[0021] Step 21: Treat each sequence segment as an independent individual, use the linear reference haploid GRCh38 as the index, and divide the sequence window into every 5,000 sequence segments of the linear reference haploid GRCh38;
[0022] Step 22: For the same sequence window, obtain the core sequence segments closest to the two endpoints of the sequence window respectively. The window formed by the two core sequence segments is the core window.
[0023] Furthermore, the sequence window is represented as:
[0024]
[0025] Among them, G i is the i-th sequence window, E i is the end point of the i-th sequence window, x i is the i-th sequence segment in the reference genome, L is the total number of haploid sequence segments constituting the linear reference, W is the number of set sequence segments, t j is the jth core sequence segment, p j is the jth core sequence segment, C i is the i-th core window, and k is the k-th window.
[0026] Furthermore, the specific steps of haploid modeling in step 3 are:
[0027] Step 31: Create a process pool, evenly distribute the core windows based on the pre-set number of processes and by mapping the window index to the process number. Each allocated core window is then transferred to the corresponding child process. The core window is then mapped from the page table to the physical memory through the process's unique virtual address space.
[0028] Step 32: When the end of the sequence segment has multiple parallel sequence segments, a strategy based on the Mersenne Twister algorithm to generate high-quality pseudo-random numbers is adopted. One of the multiple pan-sequence segments is selected as the haploid component according to the pseudo-random number, and the depth-first search strategy is used to continue to randomly search for the subsequent sequence segments in the depth until the end sequence segment of the linear reference sequence is searched. It is expressed as:
[0029]
[0030] Where M is the Mersenne rotation function, r is the generated random number, For sequence segment r i The set of parallel sequence segments, t end To terminate the depth-first search, t next is the received sequence segment, t ir is the sequence segment selected by random number, t current is the current sequence segment, length() indicates the length of the set, B() indicates searching for the set of all directly connected subsequence segments of the current sequence, and DFS() indicates that the depth-first strategy is always adopted for the current sequence segment during the search process;
[0031] During the haploid modeling process, a path storage stack and a sequence segment access storage stack are set. Each time a sequence segment is searched downstream and its position in the haploid topology is determined, the path information is pushed into the path storage stack, and the sequence segment is pushed into the sequence segment access storage stack. Then, a redundancy check is performed on each sequence segment found in the search, that is, whether the sequence segment exists in the sequence segment access storage stack. If so, the sequence segment that was pushed into the stack is popped out, and the sequence segment is marked as an unselectable sequence in the pan-genome, and a random selection is performed again. If not, the sequence segment is pushed into the sequence segment access storage stack and added to the path. After updating the path information and the path storage stack, the search continues.
[0032] The number of sequence segments of the linear reference haplotype GRCh38 between the core sequence segments was calculated and used as the calibration distance between the two core sequence segments. If the calibration distance exceeded the set sequence window spacing, the legal distance in the modeling process was set to infinity. Otherwise, the legal distance was set to the square of the calibration distance. The legal distance is expressed as:
[0033]
[0034] Among them, p i is the sequence segment searched during modeling, L ij is the legal distance;
[0035] If the calibrated distance between two core sequence segments exceeds the legal distance during modeling, the paths and accessed sequence segments between the two core sequence segments are deleted through the path storage stack and the sequence segment access storage stack, and the search is repeated back to the beginning of the two core sequence segments until all core windows are modeled. The topological structure of each process is obtained, and then the topological structures of the parallel processes are mapped and spliced to obtain a complete haploid topological representation. Finally, the complete haploid topological representation is concretized as a base sequence to form the expected haploid, completing the modeling.
[0036] The topology of each process is represented as:
[0037]
[0038] Among them, S p S is a stack for storing explored paths. v A stack for storing accessed sequence segments, T k is the haploid partial topology of the kth window, n is the total number of windows, T final For the final complete haploid topology, For p i to p j All the paths pushed into the stack between pi and pj, and x is all the sequence segments pushed into the stack between pi and pj.
[0039] Furthermore, the pan-genome data is obtained based on Minigraph-Cactus.
[0040] Furthermore, the set number of sequence segments W=5000.
[0041] The beneficial effects of the present invention are:
[0042] This application aims to ensure the existence of "essential genes" in the human genome as much as possible through the core sequence mechanism and the sliding window mechanism. This application divides the pan-genome into multiple core windows so that a single window becomes a relatively independent individual and then parallelizes them to support highly parallel modeling, thereby improving modeling efficiency while ensuring authentic modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is the overall flow chart of this application. DETAILED DESCRIPTION
[0044] It should be noted that, in the absence of conflict, the various embodiments disclosed in this application can be combined with each other.
[0045] Specific embodiment 1: This embodiment describes a haploid modeling method based on pan-genome genetic information. The method of this application mainly includes the following three steps:
[0046] 1. Sequence division and window division: Based on the probability of sequence occurrence and the sample traced, the sequences in the pan-genome are divided into core sequence segments and non-core sequence segments. The sequence windows are divided by the number of sequence segments, and then the core windows are divided based on the position of the core sequence.
[0047] 2. Using linear reference as index and window-parallel modeling: The pan-genome is segmented and parallelized according to the divided core windows, achieving efficient and orderly modeling.
[0048] 3. Sequence segment redundancy and distance determination limit the frequency of sequence occurrence and abnormal distances between sequence segments during the modeling process, and maintain the haploid length in a relatively stable state.
[0049] Based on Minigraph-Cactus, we obtain the pan-genome and perform statistics on the probability of sequence occurrence in the pan-genome. The sequences that all samples in the pan-genome have are the necessary (core) sequences.
[0050] Sequence partitioning and window partitioning
[0051] The reverse complementary sequences of all sequence segments in the pan-genome are added to the pan-genome according to their original forward connection mode. Then, for all haploid samples constituting the pan-genome, sequence segment frequency statistics based on hash mapping are adopted (frequency statistics of sequence segments in the pan-genome are performed using hash mapping). H is the hash mapping storage, ti is the i-th sequence segment label, sj is the j-th sample label, N is the total number of samples, T is the core sequence segment set, H(ti) is the sample identification set, and T is the screened core sequence segment set.
[0052]
[0053] If the number of occurrences of a sequence segment is the same as the total number of haploids in the sample, the sequence segment is recorded as the core sequence segment of the pan-genome, and the rest are marked as non-core sequence segments. This ensures that the core sequence segments will not be lost in subsequent simulations and maintains the relative stability of the genome haploid skeleton. After determining the core sequence, in order to fully segment the pan-genome, each sequence segment is first regarded as an independent individual, with the linear reference haploid GRCh38 (the most important sample, around which the pan-genome is constructed) as the index. Every 5,000 sequence segments of the linear reference haploid GRCh38 are a window, and the sequence window is divided as follows: i is the i-th sequence window, E i is the end point of the i-th sequence window, x i represents the i-th sequence segment in the reference genome, L is the total number of haploid sequence segments constituting the linear reference, W = 5000, t j represents the jth core sequence segment, p j are its coordinates. C i is the i-th core window.
[0054]
[0055] After the division is completed, each sequence window has a different number of core sequence segments. The core sequences closest to different endpoints of the same window are selected as the endpoints of the core window, thereby dividing the core window. Under the premise of ensuring relatively balanced window sizes, independence between windows is achieved.
[0056] Parallel simulation of linear referencing indexes
[0057] The linear reference haplotype GRCh38 covers all core windows of the pan-genome, so simulations can be performed regularly according to the order in which the core sequence segments are arranged in the linear reference. Therefore, a process pool is created. Based on the number of processes pre-specified by the user, a mapping method between window index and process number is used to evenly distribute the numerous core windows. Each segmented window set is then accurately transferred to the corresponding individual sub-process. Through the process's unique virtual address space, the page table is mapped to physical memory, thus implementing a memory isolation mechanism and allocating independent memory space to each sub-process. This avoids possible memory interference and data conflicts between different sub-processes, thereby maximizing the independence and stability of each sub-process's operation and enabling efficient parallel modeling.
[0058] The underlying modeling rules adopt a random strategy. When encountering a sequence segment with multiple parallel sequences at the end, a strategy based on the Mersenne twister algorithm to generate high-quality pseudo-random numbers is adopted to select one of the multiple pan-sequence segments as the haploid component. The depth-first search strategy continues to search downward randomly until the end sequence segment of the linear reference sequence is searched. M is the Mersenne twister function, r is the generated random number, is the sequence segment t i The set of parallel sequence segments, t end The core sequence segment for terminating the depth-first search
[0059]
[0060] Sequence segment redundancy determination and distance determination
[0061] During the random selection modeling process, a path storage stack and a sequence segment access storage stack are set up to record the segmented haploid topology currently being modeled and the sequence segments that have been accessed. Each time a sequence segment is searched downstream and its position in the haploid topology is determined, the path information is pushed into the path stack, and the received sequence segment is pushed into the access storage stack. Redundancy is determined for each searched sequence segment. If the sequence segment exists in the access storage stack, the previously pushed sequence segment is popped out and marked as an unselectable sequence in the pan-genome, and random selection of the pan-sequence segment is repeated. Otherwise, the sequence segment is pushed into the sequence segment access storage stack, added to the path, and the path information and path storage stack are updated. The search continues according to the above random strategy.
[0062] The number of linear reference haplotype GRCh38 sequence segments between the core sequence segments is calculated as the calibration distance between the two core sequence segments. If the calibration distance exceeds the sequence window spacing, the legal distance in the modeling process is set to infinity; if the calibration distance does not exceed the window spacing, the legal distance is set to the square of the calibration distance. iis the sequence segment searched during modeling, L ij Legal distance
[0063]
[0064] If the distance between two core paths exceeds the legal distance during modeling, the paths and sequence segments that have been pushed into the stack in this interval are deleted through the path storage stack and the sequence segment access storage stack, and the search is repeated to the beginning of this interval until the modeling of all windows is completed and the topological structure is obtained. The topology of the parallel processes is then mapped and spliced. According to the boundary conditions and connection rules between the topological structures constructed by different processes, it is ensured that each part can be seamlessly connected to form a complete haploid topological representation. Finally, the sequence segment topology is visualized as a base sequence to form the expected haploid and complete the modeling. Sp is the stack for storing explored paths, Sv is the stack for storing visited sequence segments, and T is the topological structure of the core sequence segment.
[0065]
[0066] The modeling method of the present application first extracts and analyzes the constituent samples of the pan-genome, performs sample backtracking and sequence occurrence probability statistics on all sequences in the pan-genome, and determines the necessity of the sequence existence; uses the linear reference haploid as an index, and uses the divided core sequence and core window as a skeleton to perform a parallel, end-to-end haploid modeling.
[0067] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solutions of the present invention and cannot be used to limit the scope of protection. Any minor changes made based on the claims and description of the present invention shall still fall within the scope of protection of the present invention.
Claims
1. A haploid modeling method based on pan-genomic genetic information, characterized in that The following steps are involved: Step 1: Obtain pan-genome data and divide the sequence segments in the pan-genome data into core sequence segments and non-core sequence segments; Step 2: Divide the core window based on the divided core sequence segments and non-core sequence segments; Step 3: Use the linear reference haploid as an index, and use the core sequence segment and core window as a skeleton to perform haploid modeling in parallel with the core window; The specific steps of step one are: Step 11: Obtain pan-genome data and obtain reverse complementary sequence segments of sequence segments in the pan-genome data; Step 1 and 2: Add the reverse complementary sequences of all sequence segments in the pan-genome to the pan-genome in the same way as their original forward connections; Step 13: Count the frequency of sequence segments in the pan-genome. If the number of occurrences of a sequence segment is the same as the total number of haploids in the pan-genome, then the sequence segment is considered a core sequence segment of the pan-genome, and the rest are non-core sequence segments. The specific steps of step 2 are: Step 21: Treat each sequence segment as an independent individual, use the linear reference haploid GRCh38 as the index, and divide the sequence window into every 5,000 sequence segments of the linear reference haploid GRCh38; Step 22: For the same sequence window, obtain the core sequence segments closest to the two endpoints of the sequence window. The window formed by the two core sequence segments is the core window. The specific steps of haploid modeling in step 3 are: Step 31: Create a process pool, evenly distribute the core windows based on the pre-set number of processes and by mapping the window index to the process number. Each allocated core window is then transferred to the corresponding child process. The core window is then mapped from the page table to the physical memory through the process's unique virtual address space. Step 32: When the end of the sequence segment has multiple parallel sequence segments, a strategy based on the Mersenne Twister algorithm to generate high-quality pseudo-random numbers is adopted. One of the multiple pan-sequence segments is selected as the haploid component according to the pseudo-random number, and the depth-first search strategy is used to continue to randomly search for the subsequent sequence segments in the depth until the end sequence segment of the linear reference sequence is searched. It is expressed as: Where M is the Mersenne rotation function, r is the generated random number, is the sequence segment t i The set of parallel sequence segments, t end To terminate the depth-first search, t next is the received sequence segment, t ir is the sequence segment selected by random number, t current is the current sequence segment, length() indicates the length of the set, B() indicates searching for the set of all directly connected subsequence segments of the current sequence, and DFS() indicates that the depth-first strategy is always adopted for the current sequence segment during the search process; During the haploid modeling process, a path storage stack and a sequence segment access storage stack are set. Each time a sequence segment is searched downstream and its position in the haploid topology is determined, the path information is pushed into the path storage stack, and the sequence segment is pushed into the sequence segment access storage stack. Then, a redundancy check is performed on each sequence segment found in the search, that is, whether the sequence segment exists in the sequence segment access storage stack. If so, the sequence segment that was pushed into the stack is popped out, and the sequence segment is marked as an unselectable sequence in the pan-genome, and a random selection is performed again. If not, the sequence segment is pushed into the sequence segment access storage stack and added to the path. After updating the path information and the path storage stack, the search continues. The number of sequence segments of the linear reference haplotype GRCh38 between the core sequence segments was calculated and used as the calibration distance between the two core sequence segments. If the calibration distance exceeded the set sequence window spacing, the legal distance in the modeling process was set to infinity. Otherwise, the legal distance was set to the square of the calibration distance. The legal distance is expressed as: Among them, p i is the sequence segment searched during modeling, p j is the jth core sequence segment, L ij is the legal distance; If the calibrated distance between two core sequence segments exceeds the legal distance during modeling, the paths and accessed sequence segments between the two core sequence segments are deleted through the path storage stack and the sequence segment access storage stack, and the search is repeated back to the beginning of the two core sequence segments until all core windows are modeled. The topological structure of each process is obtained, and then the topological structures of the parallel processes are mapped and spliced to obtain a complete haploid topological representation. Finally, the complete haploid topological representation is concretized as a base sequence to form the expected haploid, completing the modeling. The topology of each process is represented as: Among them, S p S is a stack for storing explored paths. v A stack for storing accessed sequence segments, T k is the haploid partial topology of the kth window, n is the total number of windows, T final For the final complete haploid topology, From pi to p j All the paths pushed into the stack between pi and pj, and x is all the sequence segments pushed into the stack between pi and pj.
2. A haploid modeling method based on pan-genomic genetic information according to claim 1, characterized in that The specific steps of step one are: Obtain pan-genome data and perform statistics on the frequency of sequence occurrence in the pan-genome data. The sequence segments that all haploids in the pan-genome data have are core sequence segments, and the rest are non-core sequence segments.
3. A haploid modeling method based on pan-genomic genetic information according to claim 2, characterized in that In the steps 1 and 3, frequency statistics of sequence segments in the pan-genome are performed through hash mapping.
4. A haploid modeling method based on pan-genome genetic information according to claim 3, characterized in that The frequency statistics of sequence segments in the pan-genome using hash mapping are expressed as: Among them, H(t i ) is the haploid identification set, H is the hash map storage, t i is the number of the i-th sequence segment, s j is the jth haploid number, N is the total number of samples, and T is the core sequence segment set.
5. A haploid modeling method based on pan-genome genetic information according to claim 4, characterized in that The sequence window is represented as: Among them, G i is the i-th sequence window, E i is the end point of the i-th sequence window, x i is the i-th sequence segment in the reference genome, L is the total number of haploid sequence segments constituting the linear reference, W is the number of set sequence segments, t j is the jth core sequence segment, p j is the jth core sequence segment, C i is the i-th core window, and k is the k-th window.
6. A haploid modeling method based on pan-genomic genetic information according to claim 1, characterized in that The pan-genome data were obtained based on Minigraph-Cactus.
Citation Information
Patent Citations
Method and system for calling variations in a sample polynucleotide sequence with respect to a reference polynucleotide sequence
CN102460155A
Method and equipment for representing and constructing group-oriented genome index
CN115662523A