A method for analyzing the mixing ratio of two mixed DNA using SLSQP

By using the SLSQP analysis method, combined with PCR amplification and electrophoresis separation, the mixing ratio is optimized, which solves the accuracy and complexity problems of multi-donor mixed DNA samples and achieves efficient and automated genotype combination screening and result reliability.

CN119832990BActive Publication Date: 2025-09-16THE FIRST RES INST OF MIN OF PUBLIC SECURITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411876840.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-09-16
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

Existing genotyping analysis methods cannot accurately process mixed DNA samples from multiple donors, especially complex samples with multiple alleles. They are easily affected by human factors and lack repeatability. Traditional optimization methods may be affected by local minima and cannot ensure the global optimal solution.

Method used

The SLSQP method was used to analyze the mixing ratio of the two-mix DNA. DNA fragment information was obtained through PCR amplification and electrophoresis separation. Genotyping analysis software was used to generate a map. Combined with data preprocessing and objective function optimization, the sequential quadratic programming algorithm was used to optimize the mixing ratio and automatically calculate the ratio of each donor.

Benefits of technology

It achieves accurate ratio estimation in multi-genotype and multi-donor situations, reduces human errors, improves the repeatability and credibility of the results, and is suitable for efficient genotype combination screening of complex samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005197116350000061
    Figure BDA0005197116350000061
  • Figure BDA0005197116350000081
    Figure BDA0005197116350000081
  • Figure BDA0005197116350000101
    Figure BDA0005197116350000101
Patent Text Reader

Abstract

The present invention discloses a method for analyzing the mixing ratio of two mixed DNAs using SLSQP, including: data preparation, data preprocessing, genotype combination generation, genotype frequency after mixing, definition of objective function and optimization process. By introducing an optimization method for minimizing the objective function, the present invention can accurately estimate the ratio of each donor in complex situations with multiple genotypes and multiple donors without relying on manual interpretation or traditional comparison methods. In addition, the present invention ensures the efficiency of calculation and reduces the impact of invalid combinations on the analysis results by creating all possible genotype combinations and screening for combinations that meet the conditions. The present invention is not only applicable to simple two-allele samples, but can also effectively process complex samples containing multiple alleles, and has a wider range of applicability. Through automated calculation and optimization, the present invention avoids the errors that may be caused by manual operation in traditional methods, and improves the repeatability and credibility of the results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of biological detection technology, and in particular to a method for analyzing the mixing ratio of two mixed DNAs by utilizing SLSQP. Background Art

[0002] Mixed DNA samples are a mixture of DNA samples from multiple donors and are commonly used in forensic identification and genetic analysis. The mixing ratio, which refers to the proportion of genotype combinations between different individuals or genotypes, is often a parameter in optimization processes, indicating the contribution of different genotypes to the final mixed distribution and is an important analytical objective for mixed DNA samples.

[0003] The current common genotyping method, such as by qualitative comparison (such as PCR or electrophoresis analysis), is usually performed based on manual interpretation results, and cannot accurately process multiple donor mixed samples. It relies on manual experience and may produce errors. In addition, the existing technology is often only analyzed for simple two-allele combinations, and cannot effectively deal with complex samples with multiple alleles. This will lead to the fact that in practical applications, especially in the fields of forensic medicine and genetics, the ratio of multiple donors cannot be accurately calculated. Moreover, traditional optimization methods may be affected by local minima, cannot ensure global optimal solutions, or require a large amount of computing resources. Further, in traditional DNA sample analysis, often rely on manual intervention and estimation, such as judging the combination and frequency of genotypes by empirical rules. This method is easily affected by human factors and lacks repeatability. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the present invention aims to provide a method for analyzing the mixing ratio of two mixed DNAs using SLSQP.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A method for analyzing the mixing ratio of two mixed DNAs using SLSQP comprises the following steps:

[0007] S1. Data preparation:

[0008] After obtaining a mixed DNA sample, PCR amplification is first performed to amplify the target gene region or genetic marker to ensure that sufficient DNA fragments are obtained for analysis. The amplified PCR products are separated by a genetic analyzer, and DNA fragments of different sizes are distinguished by electrophoresis and their fluorescent markers are detected to obtain DNA fragment size and fluorescence intensity information. Based on the DNA fragment size and fluorescence intensity information, a map is further generated and genotype analysis is performed to obtain the allele and peak height information for each site.

[0009] S2. Data preprocessing:

[0010] First, read the data in the CSV file and extract all the alleles and their corresponding observed peak heights for each row of data; then, normalize the observed peak height of each allele in each locus to the relative peak height;

[0011] S3. Genotype combination generation:

[0012] For each locus, the genotype combination containing all alleles of the corresponding locus is selected from all possible genotype combinations of the two individuals as the effective genotype combination of the corresponding locus;

[0013] S4. Calculate the allele frequency of each individual in each valid genotype combination:

[0014] For each valid genotype combination at each locus, the allele frequency matrix of each individual is calculated. The allele frequency matrix of an individual contains the frequencies of all alleles at the corresponding locus appearing in the genotype of the individual.

[0015] S5. Define the objective function:

[0016] For each valid genotype combination at each locus, the objective function receives the mixing ratios mix1 and mix2 of the two individuals and the allele frequency matrices of the two individuals, calculates the peak height of the alleles after mixing for each valid genotype combination, and returns the error value between the peak height of the alleles after mixing for each valid genotype combination and the relative peak height calculated based on the observed peak height in step S2;

[0017] In a valid genotype combination, let the mixing ratio of donor 1 be mix1, its allele frequency matrix be W, and the mixing ratio of donor 2 be mix2, its allele frequency matrix be M. Then, in this valid genotype combination, the allele peak height matrix after mixing donors 1 and 2 is:

[0018] S=mix1×W+mix2×M

[0019] Each element of the mixed allele peak height matrix S is the mixed allele peak height of each allele at the corresponding site in the corresponding effective genotype combination;

[0020] S6. Optimization process:

[0021] For each site, use the minimization optimization function to optimize the objective function based on the initial mixing ratio guess and constraints, and return the optimal mixing ratio best_mix for each site;

[0022] S7. Output result analysis:

[0023] For each site, the optimization results obtained in step S6 are arranged from small to large according to the corresponding objective function values, and the optimal genotype combination and its mixing ratio are selected.

[0024] Furthermore, in step S2, the observed peak height of each allele in a site is divided by the total observed peak height of all alleles in the site to obtain the relative peak height of each allele in the site.

[0025] Furthermore, in step S5, the mean square error is used to represent the error between the peak height of the mixed alleles and the relative peak height:

[0026] MSE(mix1, mix2)=Σ(f mixed,i -f obs,i ) 2

[0027] Where, mix1 is the mixing ratio of donor 1, mix2 is the mixing ratio of donor 2; f mixed,i is the allele peak height after mixing of the i-th allele, f obs,i is the relative peak height of the ith allele.

[0028] Furthermore, in step S6, a sequential quadratic programming algorithm is used to solve the constrained optimization problem, and the optimal mixing ratio is returned through multiple iterations, and the gradient norm and the number of iterations in the optimization process are calculated.

[0029] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0030] The present invention also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the above method is implemented.

[0031] The beneficial effects of the present invention are:

[0032] 1. The present invention uses an optimization algorithm to estimate the mixing ratio. By introducing an optimization method that minimizes the objective function, the ratio of each donor can be accurately estimated in complex situations with multiple genotypes and multiple donors, without relying on manual interpretation or traditional alignment methods.

[0033] 2. The present invention can achieve efficient genotype combination screening. By creating all possible genotype combinations and screening for combinations that meet the conditions, the efficiency of the calculation is ensured and the impact of invalid combinations on the analysis results is reduced.

[0034] 3. Applicability of the present invention to multiple alleles: This method is not only applicable to simple biallelic samples, but can also effectively process complex samples containing multiple alleles, thus having a wider range of applicability.

[0035] 4. The present invention avoids the errors that may be caused by manual operation in traditional methods through automated calculation and optimization, and improves the repeatability and credibility of the results.

[0036] In summary, this invention provides an innovative solution based on an optimization algorithm to analyze the mixing ratio of mixed DNA samples, addressing the inaccuracy, inefficiency, and inability of traditional methods to handle multiple allele combinations in complex samples. Compared to existing technologies, this invention offers greater accuracy and automated processing capabilities, enabling more reliable analysis of complex samples in fields such as forensics and genetics. DETAILED DESCRIPTION

[0037] The present invention will be further described below. It should be noted that this embodiment is based on the technical solution and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to this embodiment.

[0038] Example 1

[0039] This embodiment provides a method for analyzing the mixing ratio of two mixed DNAs using SLSQP, comprising the following steps:

[0040] S1. Data preparation:

[0041] After obtaining the mixed DNA sample, PCR amplification is first performed to amplify the target gene region or genetic marker to ensure that enough DNA fragments are obtained for analysis. The amplified PCR products are separated by a genetic analyzer (such as a capillary electrophoresis system), and DNA fragments of different sizes are distinguished by electrophoresis and their fluorescent markers are detected, thereby generating an FSA file containing DNA fragment size and fluorescence intensity information. These FSA files are then imported into the genotyping analysis software GeneMapper for further data analysis and processing, generating a map and performing genotyping analysis. GeneMapper interprets the electrophoretic map of the DNA fragments, exports allele and observed peak height information, and saves it as a CSV file. The data in each row of the CSV file includes the sample name, site name, allele name, and the observed peak height of each allele, as shown in Table 1:

[0042] Table 1 Allele peak height

[0043]

[0044] S2. Data reading and preprocessing:

[0045] First, read the data in the CSV file, and extract all its alleles and their corresponding observation peak heights for each row of data (i.e., each site). For possible null values ​​(such as missing genotypes or observation peak heights), a filtering strategy is adopted to process. Then, the observation peak height of each allele in each site is standardized to a relative peak height. Specifically, the observation peak height of each allele in a site is divided by the total observation peak height of all alleles in the site, to obtain the relative peak height of each allele in the site. In the present embodiment, it can be expressed as:

[0046] A'=H1 / (H1+H2+H3+H4)

[0047] B'=H2 / (H1+H2+H3+H4)

[0048] C'=H3 / (H1+H2+H3+H4)

[0049] D'=H4 / (H1+H2+H3+H4)

[0050] Among them, A', B', C', and D' are the relative peak heights of each allele in site 1, and H1, H2, H3, and H4 are the observed peak heights of each allele.

[0051] A corresponding dictionary of alleles and their relative peak heights is further generated.

[0052] S3. Generate valid genotype combinations:

[0053] For each locus, the genotype combination that contains all the alleles of the corresponding locus is selected from all possible genotype combinations of the two individuals as the valid genotype combination of the corresponding locus. Because each individual has two alleles at a certain locus, and each allele is a gene selected from a given allele set, the genotype combination of the two individuals can be generated through a Cartesian product. Next, in order to meet the condition of "containing all alleles" (the alleles that appear must be provided by the donor of the mixed DNA sample), the four alleles in each pair of genotype combinations are checked to see if they cover all the alleles in the corresponding locus. Specifically, the genotypes of the two individuals are merged into a set, and it is checked whether this set is equal to the allele set of the entire locus. Only when the merged set contains all the given alleles is the genotype combination considered valid. In this way, the genotype combination that meets the conditions can be screened out from all possible genotype combinations.

[0054] For example, for site 1 in Table 1, assuming that the genotype of donor 1 is (g1, g2) and the genotype of donor 2 is (g3, g4), then the genotype combination of donor 1 and donor 2 is {g1, g2, g3, g4}. Only the genotype combination that satisfies {g1, g2, g3, g4} = {A, B, C, D} will be selected.

[0055] S4. Calculate the allele frequency of each individual in each valid genotype combination:

[0056] For each valid genotype combination at each locus, the allele frequency matrix of each individual is calculated. The allele frequency matrix of an individual contains the frequencies of all alleles at the corresponding loci in the genotype of the individual.

[0057] As in this embodiment, it is known that site 1 has four alleles A, B, C, and D. The allele frequency matrix of each individual is expressed as [f1, f2, f3, f4], where f1, f2, f3, and f4 are the frequencies of occurrence of the known alleles A, B, C, and D in the individual's genotype, respectively.

[0058] Assuming that in a valid genotype combination, the genotype of donor 1 is (A, C) and the genotype of donor 2 is (B, D), the calculated allele frequencies of donor 1 and donor 2 are shown in Table 2.

[0059] Table 2 Allele frequencies

[0060]

[0061] For the valid gene combination (AC, BD), the allele frequency matrix of donor 1 is [0.5, 0, 0.5, 0], and the allele frequency matrix of donor 2 is [0, 0.5, 0, 0.5].

[0062] S5. Define the objective function:

[0063] For each valid genotype combination at each locus, the objective function receives the mixing ratios mix1 and mix2 of the two individuals and the allele frequency matrices of the two individuals. It calculates the peak heights [a, b, c, d] of the alleles after mixing for each valid genotype combination and returns the error between the peak heights of the alleles after mixing for each valid genotype combination and the relative peak heights calculated from the observed peak heights in step S2. By minimizing this error, the optimal mixing ratio can be obtained.

[0064] Assume that the mixing ratio of donor 1 is mix1 and the mixing ratio of donor 2 is mix2. For the valid genotype combination (AC, BD), the allele peak height matrix after mixing donor 1 and donor 2 is:

[0065] [a,b,c,d]=mix1×[0.5,0,0.5,0]+mix2×[0,0.5,0,0.5]

[0066] Each element of the mixed allele peak height matrix is ​​the mixed allele peak height of each allele at site 1 in the valid genotype combination (AC, BD).

[0067] In this embodiment, mean square error is used to represent the error value between the allele peak height and the relative peak height after mixing.

[0068] MSE(mix1, mix2)=Σ(f mixed,i -f obs,i ) 2

[0069] Where, mix1 is the mixing ratio of donor 1, and mix2 is the mixing ratio of donor 2. mixed,i is the allele peak height after mixing of the i-th allele, f obs,i is the relative peak height of the i-th allele. In this embodiment, f obs,i That is A', B', C', D', and f mixed,i That is a,b,c,d.

[0070] S6. Optimization process:

[0071] For each site, a minimization optimization function is used to optimize the objective function based on an initial guess (e.g., p = [0.5, 0.5]) and constraints (e.g., 0 ≤ p ≤ 1). This example uses a sequential quadratic programming algorithm to solve the constrained optimization problem. After multiple iterations, the optimal mixing ratio best_mix is ​​returned, and information such as the gradient norm and number of iterations during the optimization process is calculated.

[0072] S7. Output result analysis:

[0073] For each locus, the optimization results are sorted from smallest to largest according to the objective function value (i.e., the error to be minimized), and the optimal genotype combination and its mixing ratio are selected. In addition, the mixing ratio of each genotype combination is sorted to ensure that the genotype combinations and mixing ratios are arranged in descending order.

[0074] Example 2

[0075] This embodiment provides an application example of the method described in Embodiment 1.

[0076] S1. Data preparation:

[0077] After obtaining a mixed DNA sample named 19.1 (made by mixing standard 9947A and standard 9948 in a 19:1 ratio), PCR amplification is first performed to amplify the target gene region or genetic marker to ensure sufficient DNA fragments for analysis. The amplified PCR products are separated using a genetic analyzer (such as a capillary electrophoresis system). The instrument uses electrophoresis to distinguish DNA fragments of different sizes and detects their fluorescent markers, generating FSA files containing fragment size and fluorescence intensity information. These FSA files are then imported into the genotyping analysis software GeneMapper for further data analysis, generation of maps, and genotyping. GeneMapper interprets the electropherogram of the DNA fragments, exports allele and peak height information, and saves it as a CSV file. Table 3 shows the basic information of each allele in sample 19.1.

[0078] Table 3 Basic information of alleles in sample files

[0079]

[0080]

[0081] S2. Data reading and preprocessing:

[0082] Because multiple loci had more than two alleles, the sample was initially determined to be a 2-way mixed sample. The data from the CSV file was read and all alleles and their corresponding observed peak heights were extracted for each row. A filtering strategy was used to address potential null values ​​(such as missing genotypes or peak heights). The peak heights for each allele were then normalized to relative peak heights. The results are shown in Table 4.

[0083] Table 4 Relative peak heights of alleles at the locus

[0084]

[0085]

[0086] The calculation method for each relative peak height is to calculate the sum of the peak heights of all alleles at the site, divide the peak height of a certain allele by the sum of the peak heights, and obtain the relative peak height of a certain allele.

[0087] S3. Genotype combination generation:

[0088] Valid genotype combinations containing all alleles were screened out. In this embodiment, valid genotype combinations of alleles at the locus are shown in Table 5.

[0089] Table 5 Effective gene combinations of alleles at loci

[0090]

[0091]

[0092] S4. Genotype frequency after mixing:

[0093] For each locus, there are three alleles, named A, B, and C. Calculate the allele frequency matrix of each individual in each valid genotype combination at each locus.

[0094] For example, if the genotype of donor 1 is (A, C) and the genotype of donor 2 is (B, B), then:

[0095] The allele frequency matrix of donor 1 is: freq(A,B,C)1=(1 / 2,0,1 / 2)

[0096] The allele frequency matrix of donor 2 is: freq(A,B,C)2=(0,1,0).

[0097] S5. Objective function definition:

[0098] The objective function takes the mixing ratios mix1 and mix2 and the allele frequency matrix for each individual in the valid genotype combination. It calculates the peak heights of the alleles after mixing [a, b, c, d] for the valid genotype combination and returns the error between the peak heights of the alleles after mixing and the relative peak heights [A', B', C', D'] calculated from the observed peak heights. Minimizing this error yields the optimal mixing ratio. The error between the relative peak heights and the peak heights after mixing is expressed as the mean squared error, calculated as:

[0099] MSE(mix1, mix2)=Σ(f mixed,i -f obs,i ) 2

[0100] Wherein, mix1 refers to the mixing ratio of donor 1, and mix2 refers to the mixing ratio of donor 2. mixed,i refers to the allele peak height after mixing of the i-th allele, f obs,i Refers to the relative peak height of the i-th allele.

[0101] S6. Optimization process:

[0102] Use the minimization optimization function to optimize the objective function based on the initial guess (such as the mixing ratio p = [0.5, 0.5]) and the constraints (such as 0 ≤ p ≤ 1). Here, the sequential quadratic programming algorithm is used to solve the constrained optimization problem. After multiple iterations, the optimal mixing ratio best_mix is ​​returned, and information such as the gradient norm and number of iterations during the optimization process is calculated.

[0103] Table 6 shows the results of various genotype combinations obtained by SLSQP optimization for each site. For example, at site D8S1179, for donor 1 with a genotype of (13, 13) and donor 2 with a genotype of (12, 13), the optimal mixing ratio is (0.78, 0.22). At this time, the objective function has the minimum value of 5.54737E-17. This result was obtained after four iterations, and the gradient norm is 8.09784E-12.

[0104] Table 6 SLSQP optimization results

[0105]

[0106]

[0107]

[0108]

[0109]

[0110] S7. Output result analysis:

[0111] The optimization results are sorted from smallest to largest according to the objective function value (i.e., the error to be minimized). The row with the smallest objective function value at each locus is used as the optimal mixing ratio, and its genotype combination is obtained. In addition, the mixing ratio of each genotype combination is sorted to ensure that the genotype combinations and mixing ratios are arranged in descending order.

[0112] Table 7 Optimal split genotypes and optimal mixing ratios at each site

[0113]

[0114]

[0115] As is known, the present embodiment is obtained by mixing standard 9947A and standard 9948 in a ratio of 19:1. The difference between the analysis results and the actual sample typing and mixing ratio is shown in Table 8.

[0116] Table 8 Comparison of genotypes of standard products with calculated genotypes

[0117]

[0118]

[0119] The mixing ratio for donor 1 was 0.85, and for donor 2 it was 0.15. The splitting results were accurate except for loci CSF1PO and TH01. The mixing ratio error was approximately 10%. While the method in this example exhibited some error in the calculated mixing ratio at extreme mixing ratios, it was generally able to accurately split alleles at all loci.

[0120] Those skilled in the art can make various corresponding changes and modifications based on the above technical solutions and concepts, and all of these changes and modifications should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for analyzing the mixing ratio of two mixed DNA using SLSQP, characterized in that: The steps include: S1. Data preparation: After obtaining a mixed DNA sample, PCR amplification is first performed to amplify the target gene region or genetic marker to ensure that sufficient DNA fragments are obtained for analysis. The amplified PCR products are separated by a genetic analyzer, and DNA fragments of different sizes are distinguished by electrophoresis and their fluorescent markers are detected to obtain DNA fragment size and fluorescence intensity information. Based on the DNA fragment size and fluorescence intensity information, a map is further generated and genotype analysis is performed to obtain the allele and peak height information for each site. S2. Data preprocessing: First, read the data in the CSV file and extract all the alleles and their corresponding observed peak heights for each row of data; then, normalize the observed peak height of each allele in each locus to the relative peak height; S3. Genotype combination generation: For each locus, the genotype combination containing all alleles of the corresponding locus is selected from all possible genotype combinations of the two individuals as the effective genotype combination of the corresponding locus; S4. Calculate the allele frequency of each individual in each valid genotype combination: For each valid genotype combination at each locus, the allele frequency matrix of each individual is calculated. The allele frequency matrix of an individual contains the frequencies of all alleles at the corresponding locus appearing in the genotype of the individual. S5. Define the objective function: For each valid genotype combination at each locus, the objective function objective receives the mixing ratios mix1 and mix2 of the two individuals and the allele frequency matrices of the two individuals, calculates the peak height of the mixed alleles for each valid genotype combination, and returns the error between the peak height of the mixed alleles for each valid genotype combination and the relative peak height calculated from the observed peak height in step S2; In a valid genotype combination, let the mixing ratio of donor 1 be mix1, its allele frequency matrix be W, and the mixing ratio of donor 2 be mix2, its allele frequency matrix be M. Then, in this valid genotype combination, the allele peak height matrix after mixing donors 1 and 2 is: S=mix1×W+mix2×M Each element of the mixed allele peak height matrix S is the mixed allele peak height of each allele at the corresponding site in the corresponding effective genotype combination; S6. Optimization process: For each site, use the minimization optimization function to optimize the objective function based on the initial mixing ratio guess and constraints, and return the optimal mixing ratio best_mix for each site; S7. Output result analysis: For each site, the optimization results obtained in step S6 are arranged from small to large according to the corresponding objective function values, and the optimal genotype combination and its mixing ratio are selected.

2. The method according to claim 1, characterized in that In step S2, the observed peak height of each allele in a site is divided by the total observed peak height of all alleles in the site to obtain the relative peak height of each allele in the site.

3. The method according to claim 1, characterized in that In step S5, the mean square error is used to represent the error between the peak height of the mixed alleles and the relative peak height: MSE(mix1,mix2)=Σ(f mixed,i -f obs,i ) 2 Where, mix1 is the mixing ratio of donor 1, mix2 is the mixing ratio of donor 2; f mixed,i is the allele peak height after mixing of the i-th allele, f obs,i is the relative peak height of the ith allele.

4. The method according to claim 1, wherein In step S6, a sequential quadratic programming algorithm is used to solve the constrained optimization problem, and the optimal mixing ratio is returned through multiple iterations. The gradient norm and the number of iterations in the optimization process are calculated.

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

6. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Rapid genotyping analysis and the device thereof

    CN101553577A

  • Methylation pattern analysis of tissues in DNA mixture

    CN106795562A