Hi-c library sequencing potential prediction method, device, equipment and storage medium
By simulating sequencing depth and fragment deduplication statistics, combined with machine learning models, the complexity of Hi-C libraries is predicted, solving the problem of insufficient quantification of library complexity in existing technologies, and improving sequencing efficiency and resource utilization.
Patent Information
- Application Number
- CN202511233535.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-01
AI Technical Summary
Existing Hi-C sequencing data quality control methods lack systematic modeling and cannot effectively quantify library complexity, resulting in poor reproducibility of experimental results, waste of resources, and low efficiency.
By simulating different sequencing depths and combining fragment deduplication statistics, a library complexity variation curve was constructed, and machine learning was used to fit the prediction model parameters to predict the library complexity at the target sequencing depth.
It improves the accuracy of library complexity assessment and the reliability of experimental decisions, reduces resource consumption, and enhances sequencing efficiency and resource allocation efficiency.
Smart Images

Figure CN120727094B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of bioinformatics, and particularly relates to a Hi-C library sequencing potential prediction method, device, equipment and storage medium. BACKGROUND
[0002] With the deepening of genomics research, high-throughput sequencing technology has become an important means of studying biological genetic information. As a high-throughput sequencing method for studying the three-dimensional structure of chromatin, Hi-C (High-throughput chromosome conformation capture) technology can capture the spatial interaction information between DNA molecules in the whole genome, and is widely used in chromatin conformation analysis, gene regulation research, and epigenetics and other fields. Hi-C data not only has the characteristics of high-throughput and high complexity, but also puts forward higher requirements for the quality of library preparation and sequencing depth. Therefore, in the data production and analysis process, how to accurately evaluate the quality of the library has become one of the key factors affecting the repeatability of experimental results and the reliability of data.
[0003] In the existing experimental process, the quality control of Hi-C sequencing data mainly focuses on the preliminary verification of the library construction process. The experimenters usually rely on a small amount of library construction products or physical evaluation methods of fragment size to make preliminary library quality judgments. These methods are relatively simple in operation, but lack systematic modeling support for the quantitative relationship between sequencing depth and library complexity. In actual application, due to sample specificity, library construction batch fluctuations and experimental operation differences, the complexity of different experimental libraries is significantly different, which makes the traditional empirical judgment method unable to effectively guide the subsequent sequencing decision. In addition, some bioinformatics tools also try to evaluate the statistical characteristics of sequencing data, but mostly rely on linear extrapolation, lacking real modeling ability for complexity growth trend.
[0004] In the existing prediction methods, the Lander-Waterman model is a widely used library complexity estimation model. Based on the Poisson distribution assumption under ideal conditions, the model estimates the library complexity by using the relationship between sequencing coverage and unique sequence number. However, this model has significant limitations: first, the model only expresses the expected value of the sequencing result, and is not suitable for data sets with different quality levels or systematic errors. The actual sequencing result often deviates from the expected value of the model; second, the model has high requirements for sequencing quality, and is usually only suitable for samples with excellent library preparation results, and cannot widely cover sequencing libraries under ordinary experimental conditions. Therefore, the complexity prediction method relying on this model often cannot truly reflect the sequencing potential of the experimental sample.
[0005] Due to the lack of flexible and high-precision prediction means, after the library is built, it is often difficult for experimenters to judge whether the library needs to be expanded or additional sequencing. This not only may lead to waste of resources, but also will affect the output efficiency and analysis quality of sequencing data. In summary, the existing method still has problems such as poor adaptability, unfriendliness to low-quality libraries, lack of dynamic fitting mechanism, etc. in library complexity modeling, which is difficult to meet the demand for efficient and predictable quality control of actual scientific research or clinical data generation. SUMMARY
[0006] The purpose of the present application is to provide a Hi-C library sequencing potential prediction method, device, equipment and storage medium, which simulates different sequencing depths and combines deduplication statistics to construct a library complexity change curve, and uses machine learning to fit the prediction model parameters. The library complexity at the target sequencing depth can be predicted without additional sequencing, which improves the evaluation accuracy and assists in experimental decision-making.
[0007] In order to achieve the above purpose of the present application, the following technical scheme is adopted:
[0008] In a first aspect, the present application provides a Hi-C library sequencing potential prediction method, comprising:
[0009] Obtaining fragment pair data of a sequencing sample, and grouping the fragment pair data to simulate different observed sequencing depths to obtain a plurality of grouped data;
[0010] Performing fragment deduplication processing on each of the grouped data, and counting the number of valid fragments corresponding to each of the grouped data;
[0011] Combining the observed sequencing depth of each of the grouped data and the number of valid fragments corresponding thereto, coordinate data between the observed sequencing depth and the observed library complexity is constructed;
[0012] Inputting the coordinate data into a complexity prediction model, and using a machine learning algorithm to fit the model parameters to predict the predicted library complexity at a target sequencing depth.
[0013] In an optional embodiment, the obtaining fragment pair data of a sequencing sample, and grouping the fragment pair data to simulate different observed sequencing depths to obtain a plurality of grouped data, comprises:
[0014] Obtaining fragment pair data of a sequencing sample, and sorting the fragment pair data according to the starting position of the fragments to restore the original distribution order of the sequencing fragments;
[0015] Grouping and accumulating the sorted fragment pair data so that each group contains a fixed number of fragment pairs to obtain a plurality of grouped data for simulating different observed sequencing depths.
[0016] In an optional implementation, the group accumulation is performed in a parallel computing manner and is based on a preset accumulation unit and a preset number of groups.
[0017] In an optional implementation, the segment deduplication processing is performed on each of the group data respectively, and the number of valid segment pairs corresponding to each of the group data is counted, including:
[0018] extracting fields in the second column, the third column, the fifth column and the sixth column of the segment pair record as field combination information;
[0019] deduplicating the segment pair record based on the field combination information to identify and exclude duplicate segment pairs;
[0020] counting the number of segment pairs in each of the group data before the segment deduplication processing as a corresponding observed sequencing depth, and counting the number of segment pairs after the segment deduplication processing as a corresponding observed library complexity.
[0021] In an optional implementation, the expression of the complexity prediction model is:
[0022] ;
[0023] wherein x represents the sequencing depth, y represents the predicted library complexity, m represents the observed library complexity, and a represents a sample-specific index parameter fitted by a machine learning algorithm.
[0024] In an optional implementation, the machine learning algorithm includes at least one of random forest, support vector machine, Lasso and XGBoost.
[0025] In an optional implementation, after the coordinate data is input into the complexity prediction model and the model parameter is fitted by the machine learning algorithm to predict the predicted library complexity at the target sequencing depth, the method further includes:
[0026] comparing the predicted library complexity with a preset library complexity threshold to obtain a comparison result;
[0027] determining whether to continue library amplification or additional sequencing based on the comparison result.
[0028] In a second aspect, the present application provides a Hi-C library sequencing potential prediction device, including:
[0029] a grouping module configured to obtain segment pair data of a sequencing sample, group the segment pair data to simulate different observed sequencing depths, and obtain a plurality of group data;
[0030] A deduplication module is configured to perform fragment deduplication on each of the grouped data and count the number of valid fragments corresponding to each of the grouped data.
[0031] A coordinate module is configured to construct coordinate data between the observed sequencing depth and the observed library complexity based on the observed sequencing depth and the number of valid fragments corresponding to each of the grouped data.
[0032] A prediction module is configured to input the coordinate data into a complexity prediction model, fit model parameters by using a machine learning algorithm, and predict the predicted library complexity at a target sequencing depth.
[0033] In a third aspect, the present application provides a computer device, which comprises a processor and a memory, the memory stores a computer program, and the processor is configured to execute the computer program to implement the Hi-C library sequencing potential prediction method according to any one of the preceding embodiments.
[0034] In a fourth aspect, the present application provides a computer storage medium, which stores a computer program, and the computer program, when executed on a processor, implements the Hi-C library sequencing potential prediction method according to any one of the preceding embodiments.
[0035] The embodiments of the present application have the following beneficial effects:
[0036] The Hi-C library sequencing potential prediction method provided by the present application firstly simulates different observed sequencing depths by grouping the fragment pair data of the sequencing sample, so that data subsets at multiple sequencing depths can be constructed without actually performing high-cost and multiple additional sequencing. This simulation grouping strategy reduces the consumption of experimental resources while providing stable and controllable data input for the downstream prediction model.
[0037] By performing fragment deduplication on each of the grouped data and counting the number of valid fragments in each group, the method can identify information that truly reflects the independence of the library from the original fragment pairs, thereby effectively eliminating the interference caused by duplicate fragments and improving the accuracy of library complexity evaluation. This process constructs coordinate relationship data between the sequencing depth and the complexity based on the observed sequencing depth and the corresponding observed library complexity, avoiding the need for manual experience judgment or single-point static measurement, and making the library quality evaluation more objective and quantifiable.
[0038] The coordinate data is input into the complexity prediction model, and a machine learning algorithm is used to fit the model parameters, so that the prediction model can dynamically adjust the parameters according to the actual sample characteristics, and improve the adaptability to non-ideal libraries. Compared with the traditional prediction method based on empirical function or fixed formula, the method has stronger generalization ability and robustness, especially in the scene where the experimental conditions fluctuate greatly or the sample heterogeneity is strong, the prediction accuracy can still be kept high.
[0039] In summary, the method provides an automatic and data-driven library complexity prediction method without increasing the complexity of the experimental process, which can provide quantitative basis for whether to continue sequencing after the library preparation is completed, improve the overall sequencing efficiency and resource allocation efficiency, and has good practicability and popularization prospect. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope of protection of the present application. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0041] Figure 1 The structure schematic diagram of the hardware running environment related to the Hi-C library sequencing potential prediction method and the Hi-C library sequencing potential prediction method embodiment of the present application;
[0042] Figure 2 The flowchart of the Hi-C library sequencing potential prediction method and the Hi-C library sequencing potential prediction method embodiment 1 of the present application;
[0043] Figure 3 The flowchart of the step S100 in the Hi-C library sequencing potential prediction method and the Hi-C library sequencing potential prediction method embodiment 2 of the present application;
[0044] Figure 4 The flowchart of the step S200 in the Hi-C library sequencing potential prediction method and the Hi-C library sequencing potential prediction method embodiment 3 of the present application;
[0045] Figure 5 The fitting result comparison schematic diagram of the original Lander-Waterman model and the improved model (the model in this embodiment) in the Hi-C library sequencing potential prediction method and the Hi-C library sequencing potential prediction method embodiment 4 of the present application;
[0046] Figure 6Comparison between the results of the original Lander-Waterman model and the improved model (the model in the present embodiment) in predicting the specified depth in the Hi-C library sequencing potential prediction method of the present application;
[0047] Figure 7 Flowchart of the refinement of step S400 in the Hi-C library sequencing potential prediction method of the present application in Embodiment 5;
[0048] Figure 8 Main flowchart of the Hi-C library sequencing potential prediction method of the present application in the performance evaluation experiment of the Hi-C library sequencing potential prediction method of the present application;
[0049] Figure 9 Comparison between the running time of the conventional method (Method B) and the method of the present embodiment (Method A) in the performance evaluation experiment of the Hi-C library sequencing potential prediction method of the present application, wherein the blue color represents the running time of Picard and the orange-yellow color represents the running time of the present application;
[0050] Figure 10 Overall comparison between the prediction accuracy of the conventional method (Method B) and the method of the present embodiment (Method A) in the performance evaluation experiment of the Hi-C library sequencing potential prediction method of the present application;
[0051] Figure 11 Module connection diagram of the Hi-C library sequencing potential prediction device of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application.
[0053] The components of the embodiments of the present application generally described and shown in the accompanying drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0054] Hereinafter, the terms "include", "have", and their conjugates, used in the various embodiments of the present application, merely indicate the existence of certain features, numbers, steps, operations, elements, components, or combinations thereof, and do not exclude the possibilities of the existence or addition of one or more other features, numbers, steps, operations, elements, components, or combinations thereof.
[0055] Also, the terms "first", "second", "third", and the like are used only to distinguish descriptions, and are not to be understood as indicating or implying a relative importance.
[0056] Unless otherwise defined, all terms used herein (including technical terms and scientific terms) have the same meanings as those generally understood by those skilled in the art to which various embodiments of the present application belong. The terms, such as those defined in a generally used dictionary, are to be interpreted as having the same meanings as those in the context of relevant technology and will not be interpreted to have ideal or excessively formal meanings unless clearly defined in various embodiments of the present application.
[0057] Some embodiments of the present application will be described below in detail with reference to the accompanying drawings. The following embodiments and features of the embodiments can be combined with each other unless there is a conflict.
[0058] Some embodiments of the present application will be described below in detail with reference to the accompanying drawings. The following embodiments and features of the embodiments can be combined with each other unless there is a conflict.
[0059] As Figure 1 shown, is a structural schematic diagram of a hardware operating environment of a terminal related to an embodiment of the present application.
[0060] The Hi-C library sequencing potential prediction system according to the embodiments of the present application can be a PC, a smart phone, a tablet computer, a portable computer or a mobile terminal device. The Hi-C library sequencing potential prediction system can include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005 and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen, an input unit such as a keyboard, a remote controller, and the optional user interface 1003 can further include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a stable memory such as a disk memory. The memory 1005 can optionally be a storage device independent of the aforementioned processor 1001. Optionally, the Hi-C library sequencing potential prediction system can further include an RF (Radio Frequency, radio frequency) circuit, an audio circuit, a WI-FI module and the like. In addition, the Hi-C library sequencing potential prediction system can also be configured with a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor and other sensors, which will not be described here.
[0061] Those skilled in the art can understand that Figure 1 The Hi-C library sequencing potential prediction system shown in the above embodiments does not constitute a limitation thereon, and can include more or fewer components than shown, or combine certain components, or different component arrangements. For example, Figure 1 As shown, the memory 1005 as a computer readable storage medium can include an operating system, a data interface control program, a network connection program and a Hi-C library sequencing potential prediction program.
[0062] In summary, the method provided by the present application realizes the quantitative correlation between the observed sequencing depth and the library complexity by grouping the fragment pair data to simulate different observed sequencing depths and combining the fragment deduplication operation to obtain the corresponding effective fragment number. The coordinate data input complexity prediction model is constructed based on the relationship, and the model parameters are fitted through the machine learning algorithm, so that the prediction result can better adapt to the actual characteristics of different samples. The method can accurately predict the library complexity under the target sequencing depth without increasing the sequencing cost, provides a quantitative basis for experimental decision-making, and improves the sequencing efficiency and resource utilization.
[0063] Embodiment 1
[0064] With reference to Figure 2 The present embodiment provides a Hi-C library sequencing potential prediction method, comprising:
[0065] Step S100, obtaining fragment pair data of a sequencing sample, and grouping the fragment pair data to simulate different observation sequencing depths to obtain a plurality of grouped data.
[0066] This step is to process the original fragment pair data obtained from the Hi-C sequencing sample, and to construct a plurality of subsets representing different observation sequencing depths by artificially controlling the amount of data.
[0067] The above-mentioned fragment pair data refers to one-to-one paired read information obtained in Hi-C sequencing, representing the connection relationship between two interaction regions in chromatin, for example, a validPairs file. The original data is divided according to a certain grouping method, for example, each group contains a fixed number of fragment pairs. Thus, a plurality of subset data (i.e. "grouped data") is finally generated, each subset representing an observation sequencing depth.
[0068] Specifically, it can be accumulated by row, for example, 100,000 fragment pairs are added to each group; it can also be achieved by program to read and write sub-files in a loop.
[0069] The above-mentioned sequencing sample refers to the DNA sample material obtained after processing in the Hi-C experiment process, which can be used for library construction and sequencing. The processing includes: genomic DNA from cells, tissues or other sources; interaction DNA fragments after restriction enzyme cleavage, ligation, cross-linking reaction and purification; library preparation for high-throughput sequencing platform (such as Illumina).
[0070] Specifically, the pre-treatment according to the sequencing sample can use HiC-Pro software to process the sequencing file according to the reference genome of human or mouse, enzyme cutting fragment file and chromosome length file, and the obtained is the Bam file and validPairs file after sequence alignment of the sequencing file.
[0071] Step S200, respectively performing fragment deduplication processing on each of the grouped data, and counting the number of valid fragments corresponding to each of the grouped data.
[0072] The purpose of this step is to remove duplicate fragment pairs in each group of grouped data, and to count the number of valid fragments before and after deduplication.
[0073] In terms of specific processing content, "deduplication" means deleting duplicate fragment pairs; it is performed on each group separately and independently; the original number of fragments is still retained as a statistical value after deduplication.
[0074] Finally, two numbers corresponding to each group of data can be output: the total number of fragment pairs (i.e. observation sequencing depth) and the number of valid fragment pairs after deduplication (i.e. observation library complexity).
[0075] The field matching deduplication (e.g., using the start and end position combination of the fragment pair for uniqueness judgment) and deduplication by Python / Pandas, Shell tools, etc. can be performed; the deduplication can be based on a hash table to realize unique combination screening.
[0076] In step S300, the coordinate data between the observed sequencing depth and the observed library complexity is constructed in combination with the observed sequencing depth of each of the grouped data and the corresponding effective fragment number.
[0077] In this step, the sequencing depth (total number of fragments) and the library complexity (number after deduplication) corresponding to each group in the previous step are paired as coordinate points. The specific processing can be to convert each group of results into coordinate points (x, y), x is the observed sequencing depth, and y is the corresponding library complexity. Thus, a set of two-dimensional coordinate data is output, which can be used for subsequent fitting.
[0078] It can be specifically stored in array, table or data frame format; for example, [(100,000, 800,000), (200,000, 13.5 million), …].
[0079] In step S400, the coordinate data is input into the complexity prediction model, and the model parameters are fitted using a machine learning algorithm to predict the predicted library complexity at the target sequencing depth.
[0080] In this step, the constructed observation points are used to fit a mathematical model, and the model is used to extrapolate and predict at the target sequencing depth (x value). The fitting process is to train the model parameters (such as the theoretical maximum complexity m and the sample specificity index a) using the existing points, use the model to predict the complexity corresponding to a “target sequencing depth”, and thus predict the library complexity (y value) at the specified sequencing depth.
[0081] In addition, after step S400, it can also include generating a visualization report based on the predicted library complexity at the target sequencing depth. The generated visualization report can include but is not limited to: a. fitting curve graph (SVG format), b. parameter log file (TXT format), c. visual web report (HTML format), etc.
[0082] In summary, the present embodiment proposes a library sequencing potential prediction method based on in situ Hi-C sequencing sample data. After preprocessing the sample data and restoring its original sequencing distribution, the method simulates the accumulation process at different sequencing depths, and performs fragment deduplication and effective interaction fragment pair number statistics on the data groups corresponding to each depth, and then constructs the coordinate data between the sequencing depth and the library complexity, and uses a machine learning algorithm to fit the prediction model, thereby realizing the quantitative prediction of the library complexity at the target sequencing depth.
[0083] Embodiment 2
[0084] Referring to Figure 3 Based on the foregoing embodiments, the present embodiment provides a Hi-C library sequencing potential prediction method, and the step S100 comprises: obtaining fragment pair data of a sequencing sample, and grouping the fragment pair data to simulate different observed sequencing depths to obtain a plurality of grouped data, comprising:
[0085] The step S110 comprises: obtaining fragment pair data of a sequencing sample, and sorting the fragment pair data according to a fragment starting position to restore an original distribution order of sequencing fragments.
[0086] The purpose of the above step is to obtain fragment pair data from an existing Hi-C sequencing sample, and sort these data according to the starting position information of each fragment, so that the data order is restored to the order generated by the original sequencing as much as possible.
[0087] Specifically, the fragment pair data obtained in the sequencing analysis can be read, and the fields (such as the starting position) related to the genomic position of each pair of fragments can be extracted; and the sorting operation is performed according to these fields, thereby generating a sorted fragment pair file, in which the arrangement order of the fragment pairs is closer to the order of the fragments entering the sequencing instrument in the experiment sequencing.
[0088] For example, the sort command, pandas.sort_values() of Python, or the awk / sort tool of Linux can be used. The sorting key is the “starting position” (i.e., the 2nd column, the 3rd column, or similar fields of each record of the fragment pair).
[0089] The sorted data order can better reflect the real sequencing process, so that the subsequent “simulated grouping accumulation” is more reasonable, and it is beneficial to generate representative and hierarchical grouped data, and improve the accuracy of the simulated depth.
[0090] The sorting can be: sorting the validPairs file of the sequencing sample according to the first column to restore the original distribution state of the sequencing fragments; specifically, sorting according to the information recorded in the validPairs file according to the first column, thereby restoring the natural order of the captured fragments of the sequencing chip, which is used for subsequent computer simulation to perform the accumulation process of the sequencing fragments.
[0091] The step S120 comprises: performing grouping accumulation on the sorted fragment pair data, so that each group contains a fixed number of fragment pairs, to obtain a plurality of grouped data for simulating different observed sequencing depths.
[0092] The step is based on the sorting result and divides the entire sorted fragment pair data into groups, each containing an equal number of fragment pairs, to simulate data subsets sampled at different sequencing depths.
[0093] A fixed accumulation unit can be set, for example, every 100,000 rows as a group; the sorted file is divided into group 1, group 2, …, group n from front to back according to the unit; each group represents a "simulated sequencing depth" sampling result. Obtain multiple grouped data files or data blocks (such as group_1, group_2, group_3…), each group represents a gradually increasing observation sequencing depth.
[0094] Script grouping can be used, such as writing a new file every 100,000 rows, using array or loop logic to slice the sorted list; parallel processing can improve processing efficiency.
[0095] In some embodiments, the grouping accumulation is performed in parallel computing mode and based on a preset accumulation unit and grouping number.
[0096] The above "parallel computing mode" refers to dividing a computing task into multiple sub-tasks, which are executed simultaneously by multiple processing units (such as multiple CPU cores or multiple computers) to improve overall computing efficiency and reduce processing time.
[0097] In this step, during the "grouping accumulation of sorted fragment pair data", the parallel computing mode can divide the entire fragment pair data set into multiple sections or batches, simultaneously start multiple processing threads / processes, and perform accumulation grouping processing on each section respectively, thereby speeding up the overall grouping generation process of simulating different observation sequencing depths.
[0098] Among them, the processing methods that can be taken include but are not limited to: multi-thread or multi-process programming (such as Python's multiprocessing or Java's parallel stream); use parallel data processing framework (such as Spark, Hadoop, etc.); parallel execution based on command line tools (such as GNU Parallel, xargs, etc.); run concurrent task scheduling scripts on servers or clusters (such as SLURM, PBS, etc.).
[0099] For example, there is a sorted fragment pair file containing 10 million records: set every 100,000 rows as a group, a total of 100 groups need to be generated; the generation task of the 100 groups is evenly distributed to 10 threads, each thread handles 10 groups; each thread works simultaneously, which can greatly shorten the total time.
[0100] In this embodiment, the grouping accumulation is performed in parallel computing mode and is based on preset accumulation units and grouping quantity. Specifically, the parallel computing strategy can be used to perform segment processing on the sorted fragment pair data, divide the entire data set into multiple segments, and perform grouping operation by different computing threads or processes at the same time to improve processing efficiency.
[0101] In some embodiments, the accumulation unit can be set to, for example, every 1 million rows of reads, indicating that each group contains 1 million fragment pair records, and the grouping quantity can be dynamically adjusted according to the total amount of fragment pair data in the sequencing sample to ensure that the simulated grouping under different observed sequencing depths is covered.
[0102] The above method is a simulation sequencing process based on small sample data, which can gradually increase the number of sequencing effective interaction fragments in a quantitative accumulation manner (each time 1 million rows of reads are added), and form a certain number of accumulation grouping modes.
[0103] The embodiment provides a clear and implementable step combination for recovering the original distribution of fragment pairs from a sequencing sample and grouping in a fixed number to form data subsets that can represent different observed sequencing depths. This provides a controllable and structured data source for library complexity prediction, which is the basis of the pre-processing process of library modeling.
[0104] Embodiment 3
[0105] Reference Figure 4 Based on the foregoing embodiments, the embodiment provides a Hi-C library sequencing potential prediction method. In step S200, the fragment deduplication processing is performed on each grouping data, and the number of effective fragments corresponding to each grouping data is counted, including:
[0106] In step S210, the fields of the second column, the third column, the fifth column and the sixth column of the fragment pair record of each grouping data are extracted as field combination information.
[0107] In this step, for each grouping data formed by the simulated observed sequencing depth, the specific four-column information in each fragment pair record is extracted as a "combination identifier" for judging whether the fragment pair is unique.
[0108] The 2nd, 3rd, 5th and 6th columns of each record (for example, a row) are taken out; the four fields form a composite key (similar to a hash key) which is used for subsequent repetition judgment, so that a combination field set for each grouping data is obtained, which uniquely identifies each fragment pair.
[0109] It should be noted that in the Hi-C analysis, the validPairs file is usually a standard format representing the anchor positions of a pair of two fragments (i.e. two reads) in the genome. The typical field arrangement is as follows:
[0110] Table 1, typical field arrangement
[0111]
[0112] 2, 3, 5, 6 columns are respectively:
[0113] (1) chr1 (column 2): the chromosome where the first fragment is located;
[0114] (2) pos1 (column 3): the position of the first fragment on the chromosome;
[0115] (3) chr2 (column 5): the chromosome where the second fragment is located;
[0116] (4) pos2 (column 6): the position of the second fragment on the chromosome.
[0117] These columns together determine the spatial interaction position represented by the pair of fragments, that is, the necessary information for determining whether "the two fragments represent the same spatial interaction event".
[0118] The direction information (+ / -) is not a core criterion in actual library complexity statistics, because the direction is greatly affected by the library construction process; even if the directions are different, the same position is usually considered as the same fragment pair. Therefore, in order to avoid over-refinement and misjudgment of different directions as different fragments, the direction column is usually ignored, and only the position information is concerned.
[0119] In summary, the 2nd, 3rd, 5th and 6th columns (i.e. the chromosomes and starting positions of the first and second fragments) are selected in this embodiment to uniquely identify the spatial interaction position of a pair of fragments. By retaining only these key information, it can be avoided to miscount the direction change or redundant information as different fragments, so as to ensure that the deduplication processing is reasonable and does not miss the real duplicates. In addition, this selection method is consistent with the analysis logic of mainstream tools such as HiC-Pro and Juicer, which helps to improve the compatibility and accuracy of data processing.
[0120] Step S220, based on the field combination information, deduplicating the fragment pair records to identify and exclude duplicate fragment pairs.
[0121] This step removes the repeatedly appearing fragment pairs according to the field combination information formed in the previous step, and only keeps the unique records.
[0122] Specifically, the combination keys of each fragment pair are compared, and the repeated keys are removed; the deduplication is independently completed in each group, so that only unique fragment pair records are retained in the deduplicated grouped data, forming a more "pure" fragment set.
[0123] For example, a data table deduplication function, a database unique index, or a custom hash mapping structure can be used; in multiple languages, memory dictionaries, sets, and other data structures can be used.
[0124] Step S230, respectively, the number of fragment pairs in each of the grouped data before fragment deduplication processing is counted as the corresponding observed sequencing depth; and the number of fragment pairs after fragment deduplication processing is counted as the corresponding observed library complexity.
[0125] This step counts the number of fragments before and after deduplication, respectively, to represent the sequencing depth and library complexity represented by the simulated grouping.
[0126] Chicken legs can record two values for each group of data:
[0127] (1) The total number of original records = observed sequencing depth;
[0128] (2) The number of remaining records after deduplication = observed library complexity.
[0129] Each group forms an (x, y) data point: x = simulated observed sequencing depth; y = corresponding observed library complexity. Counting functions such as len(), count() can be used; and can be exported in CSV, coordinate list, etc. Form to prepare for subsequent modeling.
[0130] In some embodiments of the present application, the simulated sequencing accumulation process, grouping deduplication and statistical processing can specifically include the following steps:
[0131] First, the validPairs file generated by the sequencing sample is sorted by the first column to restore the original fragment distribution order; then, the sorted validPairs file is segmented and grouped according to the preset accumulation unit, for example, divided by every one million (1M) rows, two million (2M) rows, etc. Incremental accumulation method to divide, thereby simulating the fragment reading process under different observed sequencing depths. For each grouping data, extract the second column, third column, fifth column and sixth column fields of each fragment pair record as the field combination information for judging whether the fragment pair is repeated.
[0132] The deduplication processing based on the combined information can be implemented by software tools such as HiC-Pro. For each group, the total number of fragment pairs before deduplication and the number of fragment pairs after deduplication are recorded respectively, which are used to construct the coordinate relationship between the observed sequencing depth and the observed library complexity. The statistical process can be realized by simple counting operation, and finally a plurality of coordinate data points of sequencing depth and library complexity are formed as the input basis of the library complexity fitting model.
[0133] In summary, the specific steps of deduplication and statistics of fragment pair data are refined in this embodiment, the uniqueness of fragment pairs is identified and the duplicates are removed by extracting specific structure fields as combined identifiers, and the extraction method of sequencing depth and library complexity is determined, which provides a data basis for subsequent construction of sequencing depth and complexity relationship model. The processing flow can be realized by standard script tools, data processing library or parallel computing method, and has good universality and automation ability.
[0134] Embodiment 4
[0135] Based on the foregoing embodiments, the present embodiment provides a Hi-C library sequencing potential prediction method. In some embodiments of the present application, the complexity prediction model is used to fit and predict the library complexity under the target sequencing depth according to the relationship between the observed sequencing depth and the observed library complexity.
[0136] The model realizes the fitting and prediction of the information amount growth trend in the library by nonlinear modeling of the data statistical results before and after fragment deduplication.
[0137] Specifically, the model takes the number of effective fragments under different sequencing depths as input data to form a set of coordinate points of depth and complexity. By inputting the coordinate data into the complexity prediction model for fitting, the influence trend of the increase of sequencing depth on the improvement of library complexity under the current library specificity can be reflected.
[0138] The complexity prediction model is an improvement and extension of the classical Lander-Waterman model. By introducing adjustable exponential parameters and machine learning fitting mechanism, the applicability problem of the original model in processing non-ideal library is overcome.
[0139] It should be noted that although the complexity prediction model adopted in the present application has an exponential form similar to the traditional Lander-Waterman model in mathematical structure, the model has been substantially improved and expanded in terms of structural design and parameter introduction, aiming at the characteristics that the complexity of Hi-C experimental data is significantly affected by factors such as sample specificity, enzyme cutting preference, and PCR amplification efficiency. In particular, by introducing an exponential power parameter a and combining it with a machine learning algorithm for sample-specific fitting, the model can adapt to the complexity growth characteristics of different types of libraries, significantly improving the fitting accuracy and prediction ability of actual non-ideal experimental data. This improvement not only breaks through the limitation of the original model that it is only applicable under ideal conditions, but also requires training and optimization in combination with the data structure characteristics of specific fragment distribution and deduplication strategy, which belongs to structural modeling innovation for specific technical problems, and is not a simple adjustment or conventional replacement of existing known models.
[0140] The expression of the complexity prediction model is:
[0141] ;
[0142] Wherein, x represents the sequencing depth; y represents the predicted library complexity; m represents the observed library complexity (theoretical maximum upper limit), and a represents the sample-specific exponential parameter fitted by the machine learning algorithm.
[0143] In the model expression formula provided in the present embodiment, the parameter a embodied is a sequencing depth correction index, used to adjust the actual sequencing depth growth rate, and has sample specificity, i.e. different sequencing libraries should have different parameter values. By training and optimizing the parameters a and m, the model can more accurately fit the sequencing growth curve of different sample libraries.
[0144] As shown in Figure 5 , a comparison diagram of the fitting results of the original Lander-Waterman model (original formula) and the improved model (updated formula) used in the present embodiment is shown.
[0145] In this example, the data amount of the sample used is 20% of the actual sequencing depth. The fitting curve of the original Lander-Waterman model under this data amount differs greatly from the real data distribution, while the adjusted model in the present application can fit a curve that fits the real data distribution according to 20% of the data amount.
[0146] As shown in Figure 6 , a comparison diagram of the fitting results of the original Lander-Waterman model (original formula) and the improved model (updated formula) used in the present embodiment is shown.As shown, the results of the comparison between the prediction of the designated depth using the original Lander-Waterman model and the improved model in this embodiment are shown. In this embodiment, the amount of data used for the sample is the first 50 million reads of the sample, and the target to be predicted is the library complexity at 468.6 million, the true library complexity value of which is known but not input into the model. In terms of the deviation shown in the prediction results, the prediction deviation of the adjusted model in this embodiment is 7.2%, and the prediction deviation of the original Lander-Waterman model is 70.8%. The adjusted prediction results of the present application are much better than those of the original model.
[0147] In the present application, the experimenter can only fit the library complexity growth curve according to the previous data to determine the appropriate sequencing stage to stop adding sequencing. The amount of data input into the present application is not absolutely fixed, and the number of groups can be determined according to different sequencing experimental results, and then fitting and prediction are performed. Theoretically, the prediction target should not be too far from the amount of data input into the sample (such as using 20 million reads to predict the library complexity at 500 million).
[0148] In some embodiments, the machine learning algorithm comprises at least one of random forest, support vector machine, Lasso and XGBoost.
[0149] The model parameters are trained and fitted by machine learning algorithms. These algorithms have good generalization ability and can automatically adjust the exponential growth characteristics of the model according to the input data to adapt to the complexity changes of different types of library samples.
[0150] The above model can predict the number of effective fragments that can be obtained under the condition of target sequencing depth by inputting the observed data under the condition of limited sequencing depth, so as to evaluate the sequencing potential of the library and assist in decision-making whether to add sequencing or to optimize the library.
[0151] Embodiment 5
[0152] Reference Figure 7 Based on the foregoing embodiments, the present embodiment provides a Hi-C library sequencing potential prediction method, wherein the step S400 comprises:
[0153] Step S410, comparing the predicted library complexity with the preset library complexity threshold to obtain a comparison result.
[0154] In this step, the fitted model is used to input the preset target sequencing depth to calculate the corresponding predicted library complexity. The result prediction value y t is obtained, which represents the expected number of effective fragments (predicted library complexity) that can be obtained when the sample is sequenced to a depth of x t .
[0155] Then, it is evaluated whether the prediction result meets the experimental requirements. That is, a reasonable library complexity threshold y s (such as 100,000 effective fragments) is set, and the numerical comparison between y t and y s is performed.
[0156] Step S420, based on the comparison result, determine whether to continue library amplification or additional sequencing.
[0157] If y t ≥ y s , it is considered that the current library has additional sequencing value;
[0158] If y t <y s , it means that the additional sequencing improvement space is limited.
[0159] In this step, data-driven sequencing strategy suggestions are provided for experimenters to improve sequencing resource utilization efficiency. Specifically, according to the comparison result, the following operation path can be developed:
[0160] (1) Meet the threshold value → continue to add sequencing on the current library;
[0161] (2) Do not meet the threshold value → choose to stop sequencing, or perform amplification processing on the library to improve complexity.
[0162] The above decision logic can be integrated into the data analysis process script to realize automatic judgment and prompting.
[0163] Specifically, after obtaining the predicted library complexity at the target sequencing depth by using the machine learning algorithm to fit the complexity prediction model, the predicted value can be compared with the preset library complexity threshold to determine whether the current library has the potential for continued additional sequencing.
[0164] For example, a library complexity threshold (such as 100,000 effective fragment pairs) can be preset. If the predicted library complexity is higher than the threshold, it means that the library still has high data output potential and can continue to be sequenced; otherwise, it can choose to stop sequencing or rebuild the library, thereby avoiding resource waste. The comparison process can be realized through an automatic script and is suitable for dynamic decision support in high-throughput sequencing processes.
[0165] Through this subsequent analysis step, the method can not only predict the library performance at the target depth, but also assist the experimental personnel in formulating a more reasonable experimental strategy, improving the sequencing efficiency and cost performance, and has strong practical application value.
[0166] Performance investigation experiment:
[0167] In order to better illustrate the technical effect of the Hi-C library sequencing potential prediction method provided in the foregoing embodiments, the performance of the method provided in the foregoing embodiments is compared with that of the method in the conventional technology.
[0168] Experimental method:
[0169] 1. The method in the embodiments of the present application: the Hi-C library sequencing potential prediction method (method A, for details, refer to the flowchart in Figure 8 ), which comprises:
[0170] (1) obtaining fragment pair data of a sequencing sample, specifically, using the HiC-Pro software to process the original sequencing file to obtain a validPairs file;
[0171] (2) sorting the validPairs file according to the first column to restore the original distribution order of the sequencing fragments;
[0172] (3) based on the sorted fragment pair data, simulating sequencing grouping, and sequentially accumulating grouping according to a preset accumulation unit (such as 1 million rows) to obtain a plurality of grouping data simulating different observation sequencing depths;
[0173] (4) performing fragment deduplication processing on each grouping data, extracting the 2nd, 3rd, 5th and 6th column fields of each fragment pair as combination information, and removing duplicate fragment pair records;
[0174] (5) counting the number of fragment pairs before and after deduplication of each grouping, as the corresponding observation sequencing depth and observed library complexity;
[0175] (6) constructing coordinate data between the sequencing depth and the library complexity to form an input data set for fitting;
[0176] (7) inputting the coordinate data into the complexity prediction model, and fitting the model parameters using a machine learning algorithm (such as random forest, support vector machine, Lasso, XGBoost, etc.) to predict the predicted library complexity at the target sequencing depth.
[0177] 2. Comparative method: using the Picard method (method B). Specifically, it comprises:
[0178] (1) Using the EstimateLibraryComplexity command in Picard, analyze the sample at different sequencing depth stages (such as 10M, 20M, etc.), predict the library size and repeat rate at the target sequencing depth, and record the processing time;
[0179] (2) According to the target library size and repeat rate output by EstimateLibraryComplexity, calculate the predicted library complexity under the Picard method;
[0180] (3) According to the corresponding sequencing depth (such as 10M, 20M), sample the sample, and use the same method as the present application (such as sorting, deduplication) to obtain the real library complexity, which is used as a benchmark value.
[0181] 3. Evaluation method:
[0182] (1) Use the method in the embodiment of the present application to predict the library complexity, and also based on the same grouping data, predict the library complexity at different depths, and record the running time;
[0183] (2) Compare the three sets of library complexity data: Picard method predicted value, the present application method predicted value and the real value, and at the same time, count the running time of each method, to evaluate its prediction accuracy and efficiency.
[0184] 4. Experimental results:
[0185] As shown in Figure 9 , for the twelve sets of data used, the processing time statistics at five cumulative sequencing depth stages (10~50M), the method used in this experiment (Method A) can efficiently complete the parallel processing and prediction task.
[0186] As shown in Figure 10 , in this experiment (data sampling is the same as Figure 9 embodiment, one of the twelve sets of data), using the method (Method A) in the foregoing embodiment and the EstimateLibraryComplexity method (Method B) of Picard for prediction comparison, at 10 sequencing stages, the method (Method A) used in the embodiment of the present application is obviously superior to the method (Method B) of Picard.
[0187] It should be noted that the data file format processed by the method (Method A) in the embodiment of the present application is the validPairs file processed by the HiC-Pro software, and the text file containing two columns is obtained after the simulation sequencing process. After the file information is input into the machine learning calculation in the method of the present application, three files are generated:
[0188] A, the generated prediction pattern, including the distribution of sample data and fitting, is in svg format;
[0189] B, the generated prediction log file, including parameter information, and the library complexity result of the prediction target depth, is in txt text format.
[0190] C, the generated web page report according to a and b files, is in html file format.
[0191] Reference Figure 11 In the embodiments of the present application, a Hi-C library sequencing potential prediction device is provided, comprising:
[0192] The grouping module 10 is configured to obtain fragment pair data of a sequencing sample, and group the fragment pair data to simulate different observation sequencing depths, so as to obtain a plurality of grouped data.
[0193] The deduplication module 20 is configured to perform fragment deduplication processing on each of the grouped data, and count the number of valid fragments corresponding to each of the grouped data.
[0194] The coordinate module 30 is configured to combine the observation sequencing depth of each of the grouped data and the number of valid fragments corresponding thereto, to construct coordinate data between the observation sequencing depth and the observation library complexity.
[0195] The prediction module 40 is configured to input the coordinate data into a complexity prediction model, and use a machine learning algorithm to fit model parameters, so as to predict the predicted library complexity under a target sequencing depth.
[0196] It can be understood that the device of the embodiments corresponds to the Hi-C library sequencing potential prediction method of the above-mentioned embodiments, and the optional items in the above-mentioned embodiments are also applicable to the present embodiment, so they will not be described here.
[0197] In the embodiments of the present application, a computer device is provided, comprising a processor and a memory, the memory stores a computer program, and the processor is configured to execute the computer program to implement the Hi-C library sequencing potential prediction method of any one of the preceding embodiments.
[0198] In the embodiments of the present application, a computer storage medium is provided, which stores a computer program, and the computer program is executed on a processor to implement the Hi-C library sequencing potential prediction method according to any one of the preceding embodiments.
[0199] The computer storage medium can be a readable storage medium or a nonvolatile storage medium or a volatile storage medium. For example, the computer storage medium can include, but is not limited to, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
[0200] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are only schematic, for example, the flowcharts and structural diagrams in the drawings show the possible implementation architectures, functions and operations of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowcharts or structural diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that, in alternative implementation manners, the functions noted in the blocks can also occur in different orders from those noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can also be executed in reverse order, depending on the functions involved. It should also be noted that each block in the structural diagram and / or flowchart, and the combination of blocks in the structural diagram and / or flowchart, can be implemented by a dedicated hardware-based system for executing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0201] In addition, the functional modules or units in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0202] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.
[0203] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.
Claims
1. A Hi-C library sequencing potential prediction method, characterized in that, The method comprises the following steps: obtaining fragment pair data of a sequencing sample, and grouping the fragment pair data to simulate different observed sequencing depths to obtain a plurality of grouped data, comprising: obtaining fragment pair data of a sequencing sample, and sorting the fragment pair data according to the starting position of the fragments to restore the original distribution order of the sequencing fragments; performing grouped accumulation on the sorted fragment pair data, so that a fixed number of fragment pairs are contained in each group, to obtain a plurality of grouped data for simulating different observed sequencing depths; wherein the grouped accumulation is performed in a parallel computing manner and is executed based on a preset accumulation unit and a group number; performing fragment deduplication processing on each of the grouped data respectively, and counting the number of valid fragments corresponding to each of the grouped data, comprising: extracting the fields of the second column, the third column, the fifth column and the sixth column of the fragment pair record as field combination information for each of the grouped data; based on the field combination information, performing deduplication on the fragment pair record to identify and exclude duplicate fragment pairs; counting the number of fragment pairs in each of the grouped data before fragment deduplication processing as the corresponding observed sequencing depth; and counting the number of fragment pairs after fragment deduplication processing as the corresponding observed library complexity; combining the observed sequencing depth of each of the grouped data and the corresponding number of valid fragments to construct coordinate data between the observed sequencing depth and the observed library complexity; inputting the coordinate data into a complexity prediction model, fitting model parameters by using a machine learning algorithm to predict a predicted library complexity at a target sequencing depth; wherein the expression of the complexity prediction model is: ; wherein x represents the sequencing depth; y represents the predicted library complexity; m represents the observed library complexity, and a represents a sample-specific index parameter fitted by the machine learning algorithm.
2. The Hi-C library sequencing potential prediction method of claim 1, wherein, The machine learning algorithm comprises at least one of random forest, support vector machine, Lasso and XGBoost.
3. The Hi-C library sequencing potential prediction method of claim 1, wherein, After the coordinate data is input into the complexity prediction model and the model parameters are fitted by using the machine learning algorithm to predict the predicted library complexity at the target sequencing depth, the method further comprises: comparing the predicted library complexity with a preset library complexity threshold to obtain a comparison result; determining whether to continue library amplification or additional sequencing based on the comparison result.
4. A Hi-C library sequencing potentiality prediction apparatus characterized by comprising: The method comprises the following steps: a grouping module is configured to obtain fragment pair data of a sequencing sample, and group the fragment pair data to simulate different observed sequencing depths to obtain a plurality of grouped data, comprising: obtaining fragment pair data of a sequencing sample, and sorting the fragment pair data according to the starting position of the fragments to restore the original distribution order of the sequencing fragments; performing grouped accumulation on the sorted fragment pair data, so that a fixed number of fragment pairs are contained in each group, to obtain a plurality of grouped data for simulating different observed sequencing depths; wherein the grouped accumulation is performed in a parallel computing manner and is executed based on a preset accumulation unit and a group number; The deduplication module is configured to perform fragment deduplication on each of the grouped data respectively, and count the number of valid fragments corresponding to each of the grouped data, including: extracting the fields of the second column, the third column, the fifth column and the sixth column of the fragment pair record as field combination information for each of the grouped data; performing deduplication on the fragment pair record based on the field combination information to identify and exclude duplicate fragment pairs; counting the number of fragment pairs in each of the grouped data before fragment deduplication as the corresponding observed sequencing depth; and counting the number of fragment pairs after fragment deduplication as the corresponding observed library complexity; The coordinate module is configured to construct coordinate data between the observed sequencing depth and the observed library complexity by combining the observed sequencing depth of each of the grouped data and the corresponding number of valid fragments; The prediction module is configured to input the coordinate data into a complexity prediction model, fit model parameters by using a machine learning algorithm, and predict the predicted library complexity at a target sequencing depth; wherein the expression of the complexity prediction model is: ; wherein x represents the sequencing depth; y represents the predicted library complexity; m represents the observed library complexity, and a represents a sample-specific index parameter fitted by the machine learning algorithm.
5. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores a computer program, and the processor is configured to execute the computer program to implement the Hi-C library sequencing potential prediction method according to any one of claims 1-3.
6. A computer storage medium, characterized in that The computer program is stored in the memory, and when the computer program is executed on the processor, the Hi-C library sequencing potential prediction method according to any one of claims 1-3 is implemented.
Citation Information
Patent Citations
LP-WGS and DNA methylation-based lung cancer early screening model construction method and electronic equipment
CN117275585A
Experiment and machine-learning techniques to identify and generate high affinity binders
WO2022251473A1