A SNP genotype filling quality evaluation method, device and storage medium
By using site matching and allele direction coordination, combined with GP threshold screening, a confusion matrix is constructed, and multidimensional hierarchical evaluation indicators are calculated. This solves the problems of the singularity and imperfection of existing genotype filling quality assessment technologies, and realizes high-precision, multi-dimensional filling quality assessment and result quality control.
Patent Information
- Application Number
- CN202611640402.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-27
AI Technical Summary
Existing genotype filling quality assessment technologies suffer from limitations such as single evaluation dimensions, insufficient standardization of locus alignment, and imperfect quantitative evaluation systems. These limitations make it difficult to systematically and accurately quantify the differences in filling performance corresponding to different filling software, reference haplotype clusters, sequencing depths, data downsampling schemes, and GP filtering thresholds. This hinders the optimization of filling strategies, standardization of experimental parameters, and precise quality control of filling results.
By obtaining real genotypes and imputed genotype files, site matching and allele direction coordination are performed to construct a confusion matrix. Combined with GP threshold screening status, multidimensional hierarchical evaluation indicators are calculated, including imputed accuracy, genotype retention rate, and classification accuracy, and an HTML evaluation report is generated.
It enables a comprehensive assessment of SNP genotype filling quality, improving the accuracy and comprehensiveness of the evaluation. It can identify the screening of incorrect and correct genotypes, provide multi-faceted evaluation of filling results, and reduce the impact of low-quality filling on downstream analysis.
Smart Images

Figure CN123182782A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of bioinformatics and genomics, and in particular to a method, apparatus and storage medium for assessing the quality of SNP genotype filling. Background Technology
[0002] Genotype imputation is a core bioinformatics method that uses reference haplotype maps and population genetic information to statistically infer and complete ungenerated, missing, or low-confidence genotype loci in SNP chips and sequencing data. It is now widely used in SNP chip genotyping, simplified genome sequencing, low-depth whole-genome sequencing, and population genomics research. By imputing genotypes, the density of genomic markers can be effectively increased while controlling experimental costs, resulting in high-density SNP genotype datasets across the entire genome. This provides a crucial data foundation for genome-wide association studies, genomic selection breeding, population genetic structure analysis, genetic diversity assessment, and germplasm resource evolution analysis, making it a key supporting technology in current genomics and genetic breeding research.
[0003] However, the reliability of genotype imputation results is influenced by multiple factors, including the size of the reference haplotype cluster, the genetic matching degree between the reference and target populations, input marker density, sample sequencing depth, minor allele frequency at the locus, genotype homozygosity and heterozygosity, local linkage disequilibrium in the genome, locus heterozygosity, and subsequent quality screening thresholds. Differences in these variables directly lead to significant fluctuations in imputation accuracy under different experimental protocols and parameter configurations. Therefore, practical research not only needs to evaluate the overall accuracy of imputation results but also urgently requires quantifying locus retention under different GP threshold screening strategies, analyzing the distribution patterns of imputation errors for different genotypes and locus characteristics, and locating local regions in the genome with low imputation reliability, thereby achieving refined quality control and optimal parameter selection for imputation results.
[0004] Current mainstream genotyping software typically outputs genotyping quality metrics such as Rsq, INFO, DR2, and GP to characterize the uncertainty of individual locus imputation results and assist researchers in filtering low-confidence variants and genotypes. These metrics are calculated based on the imputation model's dose values, posterior probabilities, and internal model parameters, requiring no high-confidence true genotypes as a validation benchmark, making them suitable for preliminary quality control of large-scale samples without true data. However, these metrics are essentially model-inherent predictive scores. They typically do not directly utilize high-confidence genotypes of the target sample for external control, resulting in inherent biases between their predicted results and actual imputation errors. They cannot replace empirical validation based on high-confidence true genotypes and are therefore unable to accurately and objectively reflect the true reliability of the imputation results.
[0005] Currently, some research tools and analytical workflows can achieve preliminary quality control and parameter optimization of infill quality. For example, they can calculate quality statistics based on infill dose or posterior probability, estimate infill error rate by masking known genotypes before infilling, and use machine learning methods to calibrate and fit the software's native quality score. However, existing publicly available technical solutions still have significant systematic deficiencies and cannot meet the needs for high-precision, multi-dimensional, and quantifiable infill quality assessment.
[0006] In summary, existing genotype filling quality assessment technologies generally suffer from shortcomings such as single evaluation dimensions, insufficient standardization of locus alignment, imperfect quantitative evaluation systems, and non-standard result output. These shortcomings make it difficult to systematically and accurately quantify the differences in filling performance corresponding to different filling software, reference haplotype clusters, sequencing depths, data downsampling schemes, and GP filtering thresholds, thus hindering the optimization of filling strategies, standardization of experimental parameters, and precise quality control of filling results. Summary of the Invention
[0007] In view of this, the purpose of this application is to provide a method, apparatus and storage medium for assessing the quality of SNP genotype filling, in order to solve the above problems.
[0008] To solve the above-mentioned technical problems, this application adopts the following technical solution: Firstly, this application provides a method for assessing the quality of SNP genotype imputation. The method includes: Step S1: Obtaining the real genotype file and the imputed genotype file of the target sample to be assessed. The real genotype file contains the GT field from the high-confidence genotype results, and the imputed genotype file contains the GT field and the genotype probability (GP) field. Step S2: Performing site matching and allele direction coordination on the SNP sites in the real genotype file and the imputed genotype file, and uniformly converting the real genotype and the imputed genotype into genotype codes under the same coding system for comparison to obtain the genotype imputation correctness status of the SNP sites. Step S3: Based on the GP field in the imputed genotype file, determining the GP filtering status of the SNP sites according to a preset GP threshold. Step S4: Constructing a confusion matrix based on the genotype imputation correctness status and GP filtering status of each SNP site, and assessing the SNP genotype imputation quality based on the confusion matrix.
[0009] Furthermore, the real genotype file and the filled genotype file are in VCF or VCF.GZ format.
[0010] Further, step S2 includes: Step S21: Parsing the real genotype file and the filled genotype file to obtain the variation record information of each SNP locus. The variation record information includes the chromosome name field, chromosome physical coordinate position field, REF allele field, ALT allele field, FORMAT field, and sample genotype field; Step S22: Comparing the variation record information corresponding to each SNP locus with the preset candidate locus conditions to screen and obtain a candidate SNP locus set; Step S23: Using the chromosome name and genomic physical location as the matching benchmark, matching each point in the candidate SNP locus set with the real genotype file and the filled genotype file to determine the corresponding points in the real genotype file and the filled genotype file. Corresponding SNP locus pairs; Step S24: For the SNP locus pairs, compare the REF alleles and ALT alleles of the variant sites in the real genotype file and the filled genotype file to determine whether the allele types of the REF and ALT alleles are consistent or interchangeable; if they are interchangeable, then based on the allele direction of the real genotype file, perform allele direction conversion on the genotype codes of the variant sites in the filled genotype file; Step S25: Convert the real genotype and the filled genotype into numerical codes and compare them to obtain the genotype filling correctness status of the SNP locus. The genotype filling correctness status includes the filling correct status and the filling incorrect status.
[0011] Furthermore, step S3 also includes: step S31: parsing the filled genotype file to obtain the GP field corresponding to each SNP site; step S32: comparing the GP field with the preset GP threshold to determine the GP filtering status of the SNP site, the GP filtering status including retention status and screening status.
[0012] Furthermore, step S4 includes: step S41: combining the genotype filling correctness status and GP filtering status to construct a confusion matrix; step S42: calculating the evaluation index of SNP genotype filling quality based on the confusion matrix, and evaluating the SNP genotype filling quality based on the evaluation index.
[0013] Furthermore, the confusion matrix includes GP reaching the threshold and the filled genotype is correct, GP reaching the threshold but the filled genotype is incorrect, GP not reaching the threshold but the filled genotype is actually correct, and GP not reaching the threshold and the filled genotype is incorrect.
[0014] Further, in step S421: based on the confusion matrix, calculate the imputation precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, and false detection rate; in step S422: based on the genotype correlation coefficient, imputation precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, false detection rate, and comprehensive imputation score, evaluate the SNP genotype imputation quality from the perspectives of imputation consistency, correct genotype retention ability, incorrect genotype screening ability, and overall balance performance.
[0015] Furthermore, the SNP genotype filling quality assessment method also includes: Step S5: Obtaining the locus annotation information and analysis parameters of the target sample to be assessed, and performing multidimensional stratified evaluation of the target sample to be assessed based on the locus annotation information and analysis parameters; the multidimensional stratified evaluation includes at least one of the following: Genotype stratified evaluation, MAF stratified evaluation, sHet stratified evaluation, GP threshold sensitivity evaluation, and wHet interval evaluation.
[0016] Secondly, this application provides an SNP genotype filling quality assessment device, comprising: an acquisition module, a conversion module, a determination module, and an assessment module. The acquisition module acquires the true genotype file and the filled genotype file of the target sample to be assessed. The true genotype file contains the GT field from the high-confidence genotype results, and the filled genotype file contains the GT field and the genotype probability (GP) field. The conversion module performs site matching and allele direction coordination on the SNP sites in the true genotype file and the filled genotype file, and converts the true genotype and the filled genotype into genotype codes under the same coding system for comparison, obtaining the genotype filling correctness status of the SNP sites. The determination module determines the GP filtering status of the SNP sites based on the GP field in the filled genotype file and according to a preset GP threshold. The assessment module constructs a confusion matrix based on the genotype filling correctness status and GP filtering status of each SNP site, and assesses the SNP genotype filling quality based on the confusion matrix.
[0017] Thirdly, this application provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the above-described SNP genotype filling quality assessment method.
[0018] As can be seen from the above technical solutions, the advantages and positive effects of the SNP genotype filling quality assessment method, device, and storage medium proposed in this application are as follows: 1. This invention, by directly comparing the real genotype and the filled genotype, can obtain the genotype filling correctness status and GP filtering status of each SNP site in samples with valid genotypes, construct a two-dimensional confusion matrix, and comprehensively evaluate the filling quality of SNP sites, avoiding the one-sided judgment caused by simply relying on the internal quality score of the filling software.
[0019] 2. The present invention sets up SNP site matching and REF / ALT allele direction coordination steps, which can effectively avoid false genotype errors caused by inconsistent allele directions and improve the accuracy of comparing the true genotype VCF with the filled genotype VCF.
[0020] 3. This invention combines the GP threshold screening status with the filling correctness judgment result to construct a 2×2 confusion matrix based on two judgment dimensions: "retention / removal" and "correct / incorrect". This matrix can simultaneously identify two types of problems: incorrect genotypes being retained and correct genotypes being removed, thereby providing a more comprehensive evaluation of the actual effect of GP threshold screening.
[0021] 4. This invention simultaneously calculates multiple indicators such as genotype correlation coefficient (COR), filling accuracy (IP), genotype retention rate (GKR), classification accuracy (CA), true positive rate (TPR), true negative rate (TNR), false positive rate (FPR), false negative rate (FNR), false detection rate (FDR), and comprehensive filling score (CIS), enabling users to evaluate the filling results from multiple perspectives, including filling accuracy, site retention rate, GP threshold screening effect, and overall performance.
[0022] 5. This invention uses multidimensional hierarchical analysis such as Genotype, MAF, sHet, GPscan, and wHet to discover low-quality site categories, genotype categories, or local genomic regions that may be masked by overall indicators, which helps to reduce the impact of low-quality filler genotypes on downstream analysis.
[0023] 6. This invention can automatically generate self-contained HTML evaluation reports, enabling complex fill quality evaluation results to be displayed in a centralized manner in the form of indicator summaries, statistical tables, visual graphics, and 2×2 confusion matrices, thereby improving the efficiency of result interpretation, the convenience of saving, and the verifiability of the results.
[0024] 7. This invention is applicable to genotype filling software comparison, reference haplotype panel selection, sequencing depth assessment, downsampling verification, and GP threshold optimization. It can also be used for filling quality control in aquatic, livestock, plant, human genetics, and non-model species population genome studies. Attached Figure Description
[0025] The above description of this application and the following detailed embodiments will be better understood when read in conjunction with the accompanying drawings. It should be noted that the drawings are merely examples of the claimed technical solutions.
[0026] Figure 1 This is a flowchart of the SNP genotype filling quality assessment method of this application; Figure 2 This is an overall framework diagram of the SNP genotype filling quality assessment method of this application; Figure 3 This is a flowchart of the construction of the confusion matrix based on the genotype filling correctness status and GP filtering status in this application; Figure 4 This is a multi-dimensional hierarchical evaluation framework diagram for this application; Figure 5 This is a diagram showing the overall evaluation results of this application; Figure 6 This is a diagram showing the results of the Genotype hierarchical evaluation of this application; Figure 7 This is a diagram showing the output of the two-dimensional confusion matrix for the MAF stratified evaluation of this application; Figure 8 This is a visualization of the MAF stratified evaluation index of this application as a function of the MAF interval (where, Figure 8 a is a visualization of the IP as it varies with the MAF range. Figure 8 b is a GKR visualization of the variation with the MAF interval. Figure 8 c is a visualization of CA as it varies with the MAF interval. Figure 8 d is a visualization of TPR varying with the MAF interval. Figure 8 e is a visualization of COR as it varies with the MAF interval. Figure 8 f is a CIS visualization of the variation with the MAF interval. Figure 9 This is a graph showing the sHet stratification evaluation results of this application; Figure 10 This is a graph showing the output results of the genotype probability (GP) threshold sensitivity analysis index of this application; Figure 11 This is a diagram showing the output results of the confusion matrix under different GP thresholds in this application; Figure 12 This is a visualization of the relationship between the GP threshold change and the fill quality index in this application (where, Figure 12 'a' is a visualization of the IP that varies with GPth. Figure 12 b is a GKR visualization of GPth. Figure 12 c is a visualization of CA as a function of GPth. Figure 12 d is a visualization of TPR as a function of GPth. Figure 12 e is a COR visualization of the change in GPth. Figure 12 f is a CIS visualization of the changes in GPth. Figure 13 This is a graph showing the evaluation results of the window heterozygosity (wHet) interval of this application. Detailed Implementation
[0027] The detailed features and advantages of this application are described below in the specific embodiments. The content of this description is sufficient to enable any person skilled in the art to understand the technical content of this application and implement it accordingly. Based on the specification, claims and drawings disclosed in this specification, a person skilled in the art can easily understand the related objectives and advantages of this application.
[0028] The invention will now be described with reference to the accompanying drawings, in which similar reference numerals denote similar elements. While specific structures and arrangements are discussed, it should be understood that this is done merely for illustrative purposes. Those skilled in the art will recognize that other structures and arrangements can be used without departing from the spirit and scope of the invention. It will be apparent to those skilled in the art that the invention can also be used in a variety of other applications.
[0029] In this specification and claims, several terms will be used, and unless otherwise indicated, these terms will be defined to have the following meanings: The singular forms “a” and “the” include their corresponding plural forms. “At least one” means one or more, and “more” means two or more. “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be expressed as: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0030] All figures used to represent component amounts, properties (e.g., molecular weight), reaction conditions, etc., should be considered to be modified in all cases by the terms "within the unavoidable margin of error" or "about". Therefore, the numerical values set forth herein are approximate and may vary depending on the desired properties sought to be obtained by the present invention. The principle of equivalents, which is applied to a minimum and not intended to limit the scope of the claims, should be applied, for example, each value should be interpreted at least according to the specified significant digits and by applying conventional rounding techniques.
[0031] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0032] In the description of this embodiment, it should be noted that the terms "upper", "lower", "inner", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product is usually placed during use. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0033] Unless otherwise indicated, the following abbreviations have the following meanings, and any other abbreviations used herein but not defined have their generally accepted standard meanings: All other terms used herein that are specifically defined herein shall have the general meaning understood by one of ordinary skill in the art, in particular meaning that, upon reading the claims, specification and drawings of this patent, one can directly and without doubt determine how the technical solution of this patent can be implemented.
[0034] Even if there are incomplete descriptions, omissions, or ambiguities in the grammar, words, punctuation, graphics, symbols, etc. of the claims, specification, and drawings of this patent, a person skilled in the art can still arrive at the only correct understanding by reading the claims, specification, and drawings as a whole without extensive reasoning or experimentation, and effectively exclude various incorrect interpretations that are not aimed at achieving the purpose of this patent.
[0035] Those skilled in the art would first choose to read the claims, specification, and drawings of this patent to reasonably interpret the terms; secondly, they would choose to refer to the relevant definitions in other documents published by the applicant before the filing date to reasonably interpret the terms; thirdly, they would choose the references cited in this patent to reasonably interpret the terms; and finally, they would choose to combine the technical dictionaries, technical manuals, reference books, textbooks, national or industry technical standards, etc., commonly used by those skilled in the art to reasonably interpret the terms.
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0037] Please refer to Figure 1 and Figure 2 This application provides a method for assessing the quality of SNP genotype filling, the specific steps of which are as follows: Step S1: Obtain the true genotype file and the filled genotype file of the target sample to be evaluated.
[0038] The true genotype file refers to the high-confidence genotype results used for evaluation benchmarks. It is usually obtained from high-depth whole-genome resequencing data through a reliable genotyping process, or it can be obtained from other high-accuracy genotyping methods. It contains the GT field from the high-confidence genotype results, and the filled genotype file contains the GT field and the genotype probability GP field.
[0039] The real genotype file is used as a validation benchmark for evaluating genotype filling results. It contains real genotype information obtained through high-confidence testing or validation, and is used to reflect the actual genotype of the target sample to be evaluated at each SNP locus.
[0040] The filled genotype file is used as the object to be evaluated. It contains the filled genotype results inferred by the genotype filling method based on reference haplotype information or population genetic information, as well as the genotype confidence information corresponding to the filled results.
[0041] In one implementation, both the real genotype file and the imputed genotype file are in VCF or VCF.GZ format. The real genotype file contains at least a GT (Genotype) field, and the imputed genotype file contains at least a GT field and a GP (Genotype Probability) field to indicate the imputation confidence level. The GP field represents the posterior probability corresponding to different candidate genotypes during the imputation process. For biallelic SNP loci, this typically includes probabilities corresponding to three genotypes: 0 / 0, 0 / 1, and 1 / 1. The maximum probability of each candidate genotype in the GP field is defined as the GP value used for threshold screening, hereinafter referred to as the GP value.
[0042] The real genotype file and the filled genotype file correspond to the same target sample. The accuracy of the genotype filling results is evaluated by comparing the real genotype and the filled genotype at each site.
[0043] In one implementation, both low-depth and high-depth sequencing data are obtained simultaneously for the same target sample. The low-depth sequencing data undergoes variant detection, genotype likelihood estimation, and genotype imputation software processing to obtain an imputed genotype VCF file; the high-depth sequencing data undergoes rigorous variant detection and quality screening to obtain a high-confidence true genotype VCF file. Subsequently, the imputed genotype VCF file and the true genotype VCF file are input into this application for matching comparison and quality assessment.
[0044] This implementation method is suitable for evaluating the impact of different genotype filling software, reference haplotype panels, sequencing depth, and GP threshold settings on filling quality.
[0045] In another implementation, the user first obtains high-depth sequencing data of the target sample and uses the high-confidence genotypes generated therefrom as the source of the real genotypes; then, the high-depth sequencing data is downsampled to simulate different sequencing depths or different input data qualities; subsequently, the downsampled data is filled with genotypes to obtain the corresponding filled genotype VCF files; finally, the filled genotype VCF files obtained by downsampling and filling are compared with the real genotype VCF files generated from the original high-depth data in this application.
[0046] This implementation can be used to evaluate the filling quality at different sequencing depths, determine the minimum acceptable sequencing depth, a suitable reference haplotype panel, and an appropriate GP threshold setting.
[0047] Step S2: Perform site matching and allele direction coordination on the SNP sites in the real genotype file and the filled genotype file, and convert the real genotype and the filled genotype into genotype codes under the same coding system for comparison to obtain the genotype filling correctness status of the SNP sites.
[0048] Step S2 includes: Step S21: Parse the real genotype file and the filled genotype file to obtain the variation record information of each SNP locus. The variation record information includes the chromosome name field, chromosome physical coordinate position field, REF allele field, ALT allele field, FORMAT field and sample genotype field.
[0049] Read the real genotype VCF file and the imputed genotype VCF file, and parse the sample information, chromosome name, chromosome physical coordinates, reference allele (REF), alternative allele (ALT), FORMAT field, and sample genotype field; further parse the GP field from the imputed genotype file. Filter out biallelic SNP loci that can be compared in both files, and record missing, multi-allele, non-SNP, anomalously formatted, or incomparable loci.
[0050] Read the actual genotype file and the filled genotype file, and parse the site information and genotype information in the VCF format. Specifically, for each VCF record, parse the following fields: (1) Sample Information Field. Used to obtain the genotype data of the target sample. In a single-sample VCF file, this field corresponds to the sample information following the FORMAT field. For example: #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample01 chr1 10001 . AG . . . GT:GP 0 / 1:0.01,0.98,0.01 Wherein: Sample01 represents the target sample to be evaluated; the GT field represents the sample genotype; and the GP field represents the probability information corresponding to the genotype.
[0051] (2) Locus Location Field. Parse the chromosome name (CHROM) and physical location (POS) to record the location coordinates of each candidate variant site. For example, "CHROM = chr1 POS = 10001" means that the candidate SNP is located at the 10001st base position on chromosome 1.
[0052] (3) Allele field. Parse the REF and ALT fields to record the reference allele and alternative allele information for each candidate locus.
[0053] (4) FORMAT field and sample genotype field. Parse the FORMAT field to determine the type of genotype information contained in the sample data. For example, "FORMAT = GT:GP" means that the sample record contains GT and GP information.
[0054] Step S22: Compare the variant record information corresponding to each SNP site with the preset candidate site conditions to obtain a set of candidate SNP sites.
[0055] After completing the field parsing, the system first performs basic screening on the input sites, retaining only candidate sites that meet the following conditions: the site belongs to a biallelic SNP and has valid ground truth (GT) information.
[0056] Loci that do not meet the requirements are classified and recorded, including: non-SNP loci, multiple allele loci, GT deletion loci, GP deletion loci, and morphologically abnormal loci.
[0057] After the above steps, a set of candidate SNP sites will be obtained for subsequent matching and comparison.
[0058] Step S23: Using chromosome name and genomic physical location as the matching benchmark, match each point in the candidate SNP locus set with the corresponding points in the real genotype file and the filled genotype file to determine the corresponding SNP locus pairs in the real genotype file and the filled genotype file.
[0059] Based on the candidate SNP locus set obtained in the previous step, locus indexes can be created in both the real genotype file and the filled genotype file, and the corresponding variant loci in the two files can be determined according to chromosome name and physical location: ;
[0060] Where CHROM represents the chromosome identifier of the SNP site, POS represents the genomic position of the SNP site on the corresponding chromosome; the subscript truth represents the site information in the actual genotype file, and the subscript imputed represents the site information in the imputed genotype file; (CHROM,POS) represents the unique location information of the SNP site determined by both the chromosome name and the physical position.
[0061] The formula states that when two loci in the real genotype file and the filled genotype file have the same chromosome name and physical location, they are considered to be the same candidate SNP locus and proceed to the subsequent allele consistency judgment.
[0062] Step S24: For SNP locus pairs, compare the REF alleles and ALT alleles of the variant sites in the real genotype file and the filled genotype file to determine whether the allele types of the REF and ALT alleles are consistent or interchangeable.
[0063] For successfully matched locus pairs, the REF and ALT allele information is further compared. When the REF and ALT directions are consistent in both files, the original genotype encoding is preserved.
[0064] If the REF allele and the ALT allele belong to the REF / ALT interchange, then the allele direction is converted for the genotype code of the variant site in the genotype file based on the allele direction of the real genotype file.
[0065] Specifically, when the REF and ALT directions in the real genotype file and the filled genotype file are opposite, but they represent the same biallelic SNP, the locus is determined to be a locus with inconsistent allele directions but which can be unified through encoding conversion, and the filling genotype encoding is converted accordingly: ; in, This represents the original genotype numerical code after allele orientation determination in the genotype file; This indicates the numeric code of the filled genotype after the allele direction conversion is completed.
[0066] When the REF and ALT orders in the real genotype file and the filled genotype file are reversed, this formula is used to convert the allele coding direction so that it is consistent with the coding direction of the real genotype.
[0067] For example: True genotype: "REF=A ALT=G GT=0", Filler genotype: "REF=G ALT=A GT=2", After direction transformation: "GT'=2-2=0". The genotypes in the two files are re-established to have a consistent correspondence.
[0068] If the REF allele and the ALT allele are allele incompatible, the SNP site will be excluded from the subsequent evaluation.
[0069] Step S25: Convert the true genotype and the filled genotype into numerical codes and compare them to obtain the genotype filling correctness status of the SNP locus.
[0070] The true genotype and the filled genotype are uniformly converted into 0, 1, and 2 codes.
[0071] In this context, 0 indicates homozygous reference allele, 1 indicates heterozygous, and 2 indicates homozygous alternative allele. Loci that cannot be resolved, are deleted, have uncoordinated orientations, or do not meet the requirements for biallelic SNPs are excluded from the corresponding evaluation set.
[0072] After this step, the true genotype and the filled genotype form a site-by-site comparable dataset under the same coding system.
[0073] In the numerical coding, 0 indicates that both alleles are reference alleles (REF / REF), 1 indicates a heterozygous genotype (REF / ALT), and 2 indicates that both alleles are alternative alleles (ALT / ALT).
[0074] Genotype filling correctness status includes filling correct status and filling incorrect status. When the filling genotype code after allele direction coordination is consistent with the true genotype code, the site is recorded as filling correct status; when the two are inconsistent, the site is recorded as filling incorrect status.
[0075] Sites that cannot achieve consistent matching through allele direction coordination, such as REF / ALT incompatibility, inconsistent allele numbers, or inconsistent site types, are excluded and not included in subsequent filling performance evaluation.
[0076] Through the above steps, a reliable one-to-one correspondence between the true genotype and the filler genotype is established, reducing erroneous comparisons caused by differences in locus location or inconsistencies in allele direction, and improving the accuracy of subsequent correctness determination, confusion matrix construction, and evaluation index calculation.
[0077] Step S3: Based on the GP field in the populated genotype file, determine the GP filtering status of the SNP site according to the preset GP threshold; Step S3 further includes: Step S31: Parse the filled genotype file to obtain the GP field corresponding to each SNP site.
[0078] Step S32: Compare the GP field with the preset GP threshold to determine the GP filtering status of the SNP site.
[0079] For diallelic SNP sites, the GP field contains probability values corresponding to three genotypes: the probability values for the reference allele homozygous state (0 / 0), the heterozygous state (0 / 1), and the alternative allele homozygous state (1 / 1).
[0080] The GP filtering state includes a retention state and a screening state, and two binary decision states are assigned to each site simultaneously.
[0081] By comparing the probability values corresponding to the three genotypes, the genotype corresponding to the maximum probability is determined as the predicted filling genotype of the SNP locus, and the maximum probability value is used as the genotype probability value GP for GP threshold screening.
[0082] When the maximum probability value corresponding to the predicted genotype at a given locus is greater than or equal to the user-defined threshold GPth, the locus is marked as reserved.
[0083] When the GP value is lower than GPth, the site is marked as being screened out.
[0084] The genotype probability information corresponding to each locus is parsed from the imputed genotype file, and the imputed genotype is marked as either retained or rejected based on the user-defined GP threshold (GPth). Both types of loci are included in the confusion matrix statistics, with retained loci further used to calculate the genotype correlation coefficient. Specifically, for a matched SNP locus, the record in the imputed genotype file can be represented as follows: CHROM POS REF ALT FORMAT Sample01 chr1 10001 AG GT:GP 0 / 1:0.001,0.98,0.019 The GT field represents the genotype inferred by the imputation software; the GP field contains the probability values corresponding to the three candidate genotypes for this SNP locus, representing the probabilities of genotypes 0 / 0, 0 / 1, and 1 / 1, respectively. For example, if the GP field for this locus is 0.001, 0.98, and 0.019, with the 0 / 1 genotype having the highest probability (0.98), then the predicted imputation genotype is determined to be 0 / 1, and 0.98 is used as the genotype probability value for this locus for GP threshold screening. When the user sets GPth = 0.90, the following judgment is performed: If GP ≥ GPth, for example, 0.98 ≥ 0.90, the filling result of this locus is considered to have high confidence and is marked as "retained".
[0085] If GP < GPth, for example, 0.65 < 0.90, the filling result of this locus is considered to have insufficient confidence and is marked as "filtered".
[0086] After the above steps, each SNP locus obtains the screening status of the GP threshold in Table 1.
[0087] Table 1: Screening status table of GP threshold.
[0088] ;
[0089] Step S4: Construct a confusion matrix according to the genotype filling correctness status and GP filtering status of each SNP locus, and evaluate the SNP genotype filling quality based on the confusion matrix and combining the real genotype codes and filling genotype codes of the retained loci.
[0090] Wherein, Step S4 includes: Step S41: Combine the genotype filling correctness status and the GP filtering status to construct a confusion matrix.
[0091] Compare the uniformly coded filled genotypes with the corresponding real genotypes locus by locus.
[0092] When the filled genotype code is consistent with the real genotype code, the genotype filling correctness status of this locus is determined as filling correct; when the two are inconsistent, the genotype filling correctness status of this locus is determined as filling error. Thus, each locus is determined as filling correct or filling error, and simultaneously has the GP filtering status of retained or filtered.
[0093] The genotype filling correctness status is combined with the GP filtering status previously determined through the GP threshold to construct a confusion matrix. Compared with methods only based on a single evaluation dimension, the present application realizes a comprehensive evaluation of the screening effect of filling results by combining the genotype filling correctness status and the GP filtering status.
[0094] Moreover, the idea of combining the two is that the inventors discovered the defects of the current evaluation methods in practice, and then made unique improvements to the evaluation method, and this inventive idea is not easy to conceive.
[0095] The confusion matrix includes cases where the GP reaches the threshold and the filled genotype is correct, the GP reaches the threshold but the filled genotype is wrong, the GP does not reach the threshold but the filled genotype is actually correct, and the GP does not reach the threshold and the filled genotype is wrong.
[0096] Step S42: Evaluate the quality of SNP genotype filling based on the confusion matrix and in combination with the true genotype codes and filling genotype codes of the retained loci.
[0097] like Figure 3 As shown, after completing the GP threshold screening status determination and filling correctness determination, the system simultaneously assigns two independent binary labels to each comparable SNP site: (1) GP threshold filtering status Based on the user-defined GP threshold (GPth): when GP ≥ GPth, the site is marked as "retained", corresponding to a positive prediction of the GP screening strategy; when GP < GPth, the site is marked as "filtered", corresponding to a negative prediction of the GP screening strategy.
[0098] (2) Fill in the GT correctness state By comparing the filled genotype code after allele direction coordination with the true genotype code: if they match, they are marked as "correct"; if they do not match, they are marked as "incorrect".
[0099] As shown in Tables 2 and 3, for a specific locus, a confusion matrix based on "GP filtering status" and "true genotype consistency" is constructed by combining the two binary classification results mentioned above.
[0100] Table 2: Information on a specific SNP site.
[0101] ;
[0102] Table 3: Confusion Matrix.
[0103] ;
[0104] Among them, TP (True Positive): GP reaches the threshold and the filled genotype is correct; FP (False Positive): GP reaches the threshold but the genotype is incorrectly filled; FN (False Negative): The GP did not reach the threshold, but the filled genotype was actually correct; TN (True Negative): GP did not reach the threshold and the filled genotype was incorrect.
[0105] The matrix described above allows for the simultaneous evaluation of the effectiveness of the GP screening strategy in retaining correct genotypes and removing incorrect genotypes.
[0106] Step S42 includes: Step S421: Based on the confusion matrix, calculate the filling precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, and false discovery rate.
[0107] Genotype correlation coefficients are calculated based on the true genotype codes and filled genotype codes corresponding to SNP sites whose GP filtering status is retained. A comprehensive filling score is calculated based on the genotype correlation coefficients, filling accuracy, genotype retention rate, classification accuracy, and true positive rate.
[0108] N_tested: The total number of comparable SNPs included in the evaluation.
[0109] N_tested = TP + FP + FN + TN.
[0110] N_retained: The number of SNPs retained after GP threshold filtering. N_retained = TP + FP.
[0111] N_correct: The number of SNPs whose genotypes match the true genotypes. N_correct = TP + FN.
[0112] Genotype correlation (COR) represents the Pearson correlation coefficient calculated using the true genotype and the filler genotype at a reserved locus. It is used to evaluate the degree of consistency between the true genotype and the filler genotype at the reserved locus.
[0113] Imputation precision (IP) represents the proportion of the correct genotypes retained.
[0114] IP = TP / (TP + FP).
[0115] Genotype keep rate (GKR) represents the proportion of sites retained after GP threshold screening.
[0116] GKR = (TP + FP) / N_tested.
[0117] Classification accuracy (CA) represents the degree of consistency between the GP threshold screening status and the filling correctness judgment result.
[0118] CA = (TP + TN) / N_tested.
[0119] The true positive rate (TPR) represents the proportion of correctly filled genotypes that are retained.
[0120] TPR = TP / (TP + FN).
[0121] The true negative rate (TNR) represents the proportion of erroneous genotypes that are screened out.
[0122] TNR = TN / (TN + FP).
[0123] The false positive rate (FPR) represents the proportion of incorrectly filled genotypes that are still retained.
[0124] FPR = FP / (FP + TN).
[0125] The false negative rate (FNR) represents the proportion of correctly filled genotypes that are screened out.
[0126] FNR = FN / (TP + FN).
[0127] The false discovery rate (FDR) represents the proportion of false genotypes retained.
[0128] FDR = FP / (TP + FP).
[0129] Composite Imputation Score (CIS): CIS is the harmonic mean of COR, IP, GKR, CA, and TPR on a scale of 0 to 1. It is used to comprehensively balance imputation consistency, retention accuracy, site retention rate, GP threshold screening effect, and correct genotype retention capacity.
[0130] ;
[0131] In cases where the true genotype vector in a group has no variance, such as a group where all loci are heterozygous, COR cannot be calculated. Therefore, COR and CIS calculated based on COR can be marked as unavailable.
[0132] If any component indicator cannot be calculated, CIS is marked as unavailable; if all component indicators are valid, but any participant value is 0, CIS is set to 0.
[0133] Step S422: Based on the genotype correlation coefficient, filling accuracy, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, false detection rate, and comprehensive filling score, evaluate the SNP genotype filling quality from the aspects of filling consistency, correct genotype retention ability, incorrect genotype screening ability, and overall balance performance.
[0134] Step S5: Obtain the site annotation information and analysis parameters of the target sample to be evaluated, and perform multidimensional stratified evaluation of the target sample to be evaluated based on the site annotation information and analysis parameters.
[0135] like Figure 4 As shown, based on the overall evaluation, a multidimensional stratified assessment is performed according to user selection. This multidimensional stratified assessment includes: genotypic stratification analysis by true genotype category to compare the filling performance of homozygous and heterozygous genotypes; MAF stratification analysis based on the MAF annotation file to evaluate the filling quality in different allele frequency intervals; sHet stratification analysis based on the sHet annotation file to evaluate the filling quality in heterozygous intervals at different loci; GP threshold sensitivity analysis based on the --GPscan parameter to compare changes in various indicators under different GP thresholds; and wHet interval analysis based on window or interval parameters to evaluate local filling performance in different genomic intervals or sliding windows.
[0136] Multidimensional hierarchical evaluation includes at least one of the following: Genotype hierarchical evaluation, MAF hierarchical evaluation, sHet hierarchical evaluation, GP threshold sensitivity evaluation, and wHet interval evaluation.
[0137] (1) Genotype stratification evaluation: Based on the true genotype category, SNPs are divided into homozygous genotypes and heterozygous genotypes. The filling performance under different genotype categories is compared to identify filling differences in different genotype categories.
[0138] (2) MAF stratification evaluation: Based on the MAF annotation file provided by the user, SNPs are divided into different intervals according to allele frequency to evaluate the filling reliability of low-frequency variants and common variants.
[0139] (3) sHet hierarchical evaluation: Based on the heterozygosity information of the site, the filling performance of SNPs with different heterozygosity levels is compared to identify low-quality filling sites in different heterozygosity categories.
[0140] (4) GP threshold sensitivity evaluation: By scanning multiple GP thresholds, the changes of indicators such as IP, GKR, CA, TPR and CIS under different screening criteria are compared, thereby assisting users in selecting appropriate genotype probability screening thresholds.
[0141] (5) wHet interval evaluation: The window heterozygosity wHet is calculated according to the SNP heterozygosity ratio within the window, and the filling performance differences in different genomic regions are evaluated to identify local low reliability regions.
[0142] like Figure 5 As shown, in this embodiment, the input VCF file is first read, and the true genotype and the filled genotype are compared and analyzed. After site matching and biallelic SNP screening, 1,132,393 comparable SNPs were obtained from the example data and entered into the overall evaluation. The software finally generates an HTML report, parameter file, running log, and optional statistical results file.
[0143] Under the condition of GPth=0.90, this application performs GP threshold screening on all comparable SNPs. In one embodiment, a low-depth sequencing sample and corresponding high-depth validation genotype data were used for testing. Example results show that a total of 1,040,339 SNPs were retained, of which 962,023 SNPs were correctly filled, corresponding to IP=92.47%, GKR=91.87%, CA=88.82%, TPR=95.22%, COR=0.8335, and CIS=0.9016.
[0144] The results indicate that this application can simultaneously evaluate filling accuracy, site retention rate, GP screening effect, and overall performance.
[0145] Please refer to Figure 6 To identify imputation differences among different genotype categories, this application classifies loci into homozygous and heterozygous genotypes based on their true genotypes and calculates corresponding evaluation indicators for each. This analysis can reveal imputation errors in the overall indicators that may be masked by a large number of homozygous loci.
[0146] In the example report, the Genotype stratified evaluation results show the filling accuracy, locus retention rate, classification accuracy, correlation index, and comprehensive score under different genotype categories, and compare the performance differences between homozygous and heterozygous loci in a graphical way.
[0147] Understandably, this application, through communication with professionals, has specifically integrated tables, matrices, and bar charts into the evaluation results page, allowing users to intuitively obtain the evaluation results.
[0148] Please refer to Table 4 and Figure 7 This application utilizes an external MAF annotation file to divide SNPs into different intervals according to allele frequencies and calculates the filling performance in each MAF category. This module is used to evaluate the reliability differences between low-frequency variants and common variants during the filling process.
[0149] Table 4: MAF Stratified Assessment Results.
[0150] ;
[0151] In the example report, the MAF module displays the changes in evaluation metrics across different MAF intervals. Users can identify instances of decreased low-frequency variant filling performance by comparing metrics such as IP, GKR, CA, COR, and CIS across different frequency categories, and this comparison can help optimize the reference panel or filtering strategies.
[0152] Please refer to Figure 8 , Figure 8 This paper presents the changes in genotype filling quality assessment indicators under different allele frequencies (MAF) grouping conditions. The horizontal axis represents different SNP locus groups according to MAF, and the vertical axis represents the corresponding filling quality assessment indicators.
[0153] Figure 8 Figure 'a' shows the relationship between MAF and filling accuracy (IP). This figure illustrates the change in the proportion of correctly filled sites among the retained sites under different MAF groups, used to evaluate the filling accuracy of SNP sites in different MAF intervals. The results indicate that there are differences in filling performance among SNP sites in different MAF intervals. IPEva can identify changes in filling performance under different MAF conditions, providing a basis for the quality assessment of low-frequency and high-frequency variant sites. Figure 8 Figure b shows the relationship between MAF grouping and genotype retention rate (GKR). This figure illustrates the changes in the proportion of retained SNP sites under different MAF groups, and is used to evaluate site retention under different MAF conditions. By comparing the GKR values of different MAF intervals, the changes in the site retention proportion under different MAF conditions can be analyzed.
[0154] Figure 8 c is a graph showing the relationship between MAF grouping and classification accuracy (CA). This graph illustrates the change in consistency between the GP screening status and the filling correctness status obtained by comparing the actual genotype under different MAF grouping conditions, and is used to evaluate the degree of matching between the screening results and the actual filling correctness under different MAF intervals.
[0155] Figure 8 Figure d shows the relationship between MAF grouping and the true positive rate (TPR). This figure is used to evaluate the proportion of correctly filled sites retained by the screening strategy among all correctly filled sites under different MAF conditions, reflecting the retention capacity of correctly filled results under different MAF conditions.
[0156] Figure 8e is a graph showing the correlation coefficient (COR) between MAF grouping and genotype. This graph illustrates the changes in the correlation between the true genotype and the filler genotype under different MAF grouping conditions, and is used to evaluate the degree of correlation between the filler genotype and the true genotype under different allele frequencies. The results show that the genotype correlation differs among different MAF interval loci, and IPEva can be used to analyze the impact of different MAF ranges on filler correlation.
[0157] Figure 8 f is a graph showing the relationship between MAF grouping and Comprehensive Filling Score (CIS). This graph illustrates the changing trend of CIS under different MAF grouping conditions. CIS comprehensively considers multiple evaluation dimensions such as filling accuracy, site retention, and consistency of filling results, and is used to evaluate the genotype filling performance under different MAF conditions from an overall perspective.
[0158] In conclusion, Figure 8 The MAF stratification method was used to show the changes in genotype filling quality under different allele frequencies, indicating that IPEva can perform stratified evaluation for variant sites of different frequencies, identify the differences in filling performance of different types of SNP sites such as low frequency and high frequency, and provide a basis for genotype filling result quality control, parameter optimization and subsequent genetic analysis.
[0159] Please refer to Figure 9 This application further utilizes locus heterozygosity annotation files to perform stratified evaluation of SNPs at different sHet levels. This module is used to analyze the relationship between the observed heterozygosity of a locus and the filling reliability in a specified population.
[0160] The example report shows the changes in filling metrics across different heterozygous loci groupings. This analysis allows users to identify potentially difficult-to-fill areas within highly heterozygous loci and further interpret performance differences by combining reference population structure and local linkage disequilibrium information.
[0161] Please refer to Figure 10 and Figure 11 This application provides a GP threshold assessment method to evaluate the impact of different screening thresholds on the fill results. Users can set multiple GP thresholds, and the software calculates indicators such as IP, GKR, CA, TPR, COR, and CIS for each threshold.
[0162] The GP module in the example report shows the trends in the number of retained sites, fill accuracy, and overall performance as the GP threshold increases. These results help users balance improving the reliability of retained genotypes with maintaining a sufficient number of markers, thus allowing them to select a suitable screening threshold for subsequent GWAS, genome selection, or population genetic analysis.
[0163] Please refer to Figure 12 , Figure 12 This diagram illustrates the changes in genotype filling quality evaluation indicators under different genotype probability thresholds (GPth). The horizontal axis represents the set GPth, and the vertical axis represents the corresponding evaluation indicator.
[0164] Figure 12 Figure a shows the relationship between GPth and accuracy in filling (IP). This figure illustrates the trend of the proportion of correctly filled sites among the retained sites as GPth increases. In this example data, increasing GPth improves the filling reliability of the retained sites, leading to a gradual increase in IP.
[0165] Figure 12 Figure b shows the relationship between GPth and genotype retention rate (GKR). This figure illustrates the change in the proportion of SNP sites that meet the selection criteria and are retained under different GPth conditions. In this example data, as GPth increases, the selection criteria become more stringent, low GP value sites are filtered out, and therefore the proportion of retained SNP sites gradually decreases.
[0166] Figure 12 c is a graph showing the relationship between GPth and classification accuracy (CA). This graph illustrates the consistency changes between the GP selection status and the filling correctness status obtained based on the comparison with the true genotype under different GPth conditions, and is used to evaluate the degree of matching between the screening results and the actual filling correctness under different GP selection strategies.
[0167] Figure 12 Figure d shows the relationship between GPth and the true positive rate (TPR). TPR represents the proportion of all correctly filled sites retained by the GP selection strategy, and is used to evaluate the retention capacity of correctly filled sites under different GP threshold conditions. As GPth changes, TPR changes accordingly, reflecting the impact of the GP selection strategy on the retention effect of correctly filled sites.
[0168] Figure 12 e is a graph showing the relationship between GPth and the correlation coefficient of genotype (COR). This graph illustrates the changes in the correlation between the true genotype and the filler genotype at the retained loci under different GPth conditions. In this example data, as GPth increases, the number of low-confidence loci decreases, and the genotype correlation at the retained loci shows an increasing trend.
[0169] Figure 12 f is a graph showing the relationship between GPth and the Comprehensive Filling Score (CIS). This graph illustrates the trend of CIS under different GPth conditions, used to evaluate the comprehensive impact of different GP screening strategies on overall filling performance, and to provide a reference for researchers to select a suitable GP screening threshold for subsequent analysis.
[0170] In conclusion, Figure 12The impact of GPth variation on genotype filling quality and site retention was demonstrated through multiple evaluation indicators, indicating that IPEva can systematically evaluate the balance between filling accuracy and site retention rate under different GP screening strategies, providing a basis for genotype filling result quality control and parameter optimization.
[0171] Please refer to Figure 13 In addition to site-level analysis, this application also supports interval evaluation based on window heterozygosity (wHet). The software divides genomic regions according to the user-defined window size and calculates wHet in each window, as well as the corresponding IP, GKR, CA, TPR, COR, and CIS indices.
[0172] The wHet analysis in the example report demonstrates the relationship between local heterozygosity and filling performance. This module can identify low-reliability genomic windows that are difficult to detect in the overall evaluation and assist in locating difficult regions that may be affected by local haplotype structure.
[0173] It should be noted that the true genotypes in this application are not limited to high-depth whole-genome sequencing, but may also come from confirmatory genotyping, target capture sequencing, microarray data, or other high-confidence genotype data that have undergone strict quality control.
[0174] The source of the imputation results is not limited to specific genotype imputation software. As long as the output file contains a resolvable GT field and a GP field or a genotype probability field equivalent to GP, the process of this invention can be used for evaluation.
[0175] The GP threshold can be set manually by the user or determined with the help of GPscan results; the GPscan threshold set can use the default range of 0.90 to 0.99, or it can be customized according to the research purpose.
[0176] The MAF and sHet bin boundaries can use default values or be customized based on species characteristics, population structure, or SNP density; the wHet window size, window step size, and grouping criteria can also be adjusted according to the research objectives.
[0177] Interval assessment can be performed using a fixed window, sliding window, gene region, linkage group, chromosome segment, or user-provided BED interval.
[0178] Reports can be generated in HTML format, or converted to PDF, Word documents, database entries, or structured result records as needed; visualizations can be in SVG, PNG, or interactive web graphics.
[0179] In a multi-sample validation queue, the method can be run independently for each target sample, and the evaluation results of multiple samples can be aggregated at the queue level.
[0180] Based on the same inventive concept, this application also provides an SNP genotype filling quality assessment device, which includes: an acquisition module, a conversion module, a determination module, and an assessment module.
[0181] The acquisition module is used to acquire the true genotype file and the filled genotype file of the target sample to be evaluated. The true genotype file contains the GT field from the high-confidence genotype results, and the filled genotype file contains the GT field and the genotype probability GP field.
[0182] The conversion module is used to perform site matching and allele orientation coordination of SNP sites in real genotype files and filled genotype files, and to convert real genotypes and filled genotypes into genotype codes under the same coding system for comparison, so as to obtain the genotype filling correctness status of SNP sites.
[0183] The determination module is used to determine the GP filtering status of SNP sites based on the GP field in the populated genotype file and according to a preset GP threshold.
[0184] The evaluation module is used to construct a confusion matrix based on the genotype filling correctness status and GP filtering status of each SNP locus. Based on the confusion matrix and combined with the true genotype code and the filled genotype code of the retained locus, the quality of SNP genotype filling is evaluated.
[0185] The conversion module is also used to parse the real genotype file and the filled genotype file to obtain information related to each SNP locus, including sample information field, locus location field, allele field, FORMAT field, and sample genotype field; compare the relevant information corresponding to each SNP locus with preset candidate locus conditions to filter and obtain a set of candidate SNP loci; using chromosome name and genomic physical location as matching criteria, match each point in the candidate SNP locus set with the real genotype file and the filled genotype file to determine the corresponding SNP locus pairs in the real genotype file and the filled genotype file; for SNP locus pairs, determine whether the REF allele and ALT allele of the variant site in the real genotype file and the filled genotype file correspond to the same biallelic SNP and whether there is a difference in allele direction; if so, use the allele direction of the real genotype file as the benchmark to convert the genotype code of the variant site in the filled genotype file to the allele direction; convert the real genotype and the filled genotype into numerical codes and compare them to obtain the genotype filling correctness status of the SNP locus, which includes filling correct status and filling incorrect status.
[0186] The determination module is also used to parse the filled genotype file to obtain the GP field corresponding to each SNP site; compare the GP field with the preset GP threshold to determine the GP filtering status of the SNP site, which includes retention status and screening status.
[0187] The evaluation module is also used to combine the genotype filling correctness status and GP filtering status to construct a confusion matrix; based on the confusion matrix, the quality of SNP genotype filling is evaluated.
[0188] The evaluation module is also used to calculate genotype correlation coefficient, imputation precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, false detection rate, and overall imputation score based on the confusion matrix. Based on the genotype correlation coefficient, imputation precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, false detection rate, and overall imputation score, the SNP genotype imputation quality is evaluated from the aspects of imputation consistency, correct genotype retention ability, incorrect genotype screening ability, and overall balance performance.
[0189] The evaluation module is also used to obtain the site annotation information and analysis parameters of the target sample to be evaluated, and to perform multidimensional stratified evaluation of the target sample to be evaluated based on the site annotation information and analysis parameters; the multidimensional stratified evaluation includes at least one of the following: Genotype stratified evaluation, MAF stratified evaluation, sHet stratified evaluation, GP threshold sensitivity evaluation and wHet interval evaluation.
[0190] It is understood that the SNP genotype filling quality assessment device provided in this application corresponds to the SNP genotype filling quality assessment method provided in this application. For the sake of brevity, the same or similar parts can be referred to the content of the SNP genotype filling quality assessment method section, and will not be repeated here.
[0191] Each module in the aforementioned SNP genotype filling quality assessment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the server's processor in hardware form, or stored in the server's memory in software form, so that the processor can call and execute the corresponding operations of each module. The processor can be a central processing unit (CPU), microprocessor, microcontroller, etc.
[0192] The above-mentioned SNP genotype filling quality assessment method and / or SNP genotype filling quality assessment device can be implemented in the form of a computer-readable instruction that can run on a computer system.
[0193] This application also provides a computer system including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described SNP genotype filling quality assessment method.
[0194] The computer system can be a server. The computer system includes a processor, non-volatile storage medium, internal memory, input device, display screen, and network interface connected via a system bus. The non-volatile storage medium of the computer system can store an operating system and computer-readable instructions. When executed, these computer-readable instructions cause the processor to perform an SNP genotype filling quality assessment method according to various embodiments of this application. The specific implementation process of this method can be found in [reference needed]. Figure 1 The specific details will not be elaborated here.
[0195] The processor of this computer system provides computational and control capabilities, supporting the operation of the entire system. The internal memory can store computer-readable instructions, which, when executed by the processor, cause the processor to perform an SNP genotype filling quality assessment method. The computer system's input devices are used for inputting various parameters, the display screen is used for display, and the network interface is used for network communication.
[0196] Based on the same inventive concept, this application provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps in the above-described SNP genotype filling quality assessment method.
[0197] The memory in this application embodiment can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), sync link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
[0198] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs.
[0199] When computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted wirelessly (e.g., infrared, microwave, etc.) from one website, computer, server, or data center to another website, computer, server, or data center.
[0200] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives (SSDs).
[0201] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0202] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0203] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0205] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0206] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0207] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0208] In this specification, references to "an embodiment" or "a specific implementation" mean that a particular feature, structure, or characteristic described in connection with that embodiment / specific implementation is included in at least one embodiment / specific implementation of the invention. Therefore, the phrase "in one embodiment / specific implementation" appearing in various places in this specification does not necessarily refer to the same embodiment / setting, but rather to potentially different embodiments. Furthermore, specific features, structures, or characteristics may be combined in one or more embodiments / settings in any suitable manner, as will be apparent to those skilled in the art from this disclosure.
[0209] Similarly, it should be understood that in the above description of exemplary embodiments / specific implementations of the invention, various features of the invention are sometimes combined in a single embodiment / specific implementation or its figures and description, with the aim of simplifying the disclosure and aiding in the understanding of one or more of the various aspects of the invention. However, the method of description in this patent should not be construed as reflecting an intention that the claimed features of the invention are more than those expressly stated in each claim, except where explicitly stated otherwise or in obvious technical contradiction or exclusion. Rather, the inventive aspect reflected in the claims lies in not all the features of a single foregoing disclosed embodiment / specific implementation. Therefore, the claims following the detailed description are expressly incorporated herein by reference, each claim existing independently as a separate embodiment / specific implementation of the invention.
[0210] Furthermore, while some embodiments / specific implementations described herein include, but are not limited to, other features included in other embodiments / specific implementations, combinations of features from different embodiments / specific implementations are intended to be within the scope of the invention and form different embodiments / specific implementations, as will be understood by those skilled in the art. For example, in the following claims, embodiments / specific implementations of any claim can be used in any combination.
[0211] The terms and expressions used in this specification are for illustrative purposes and not for limitation. In using these terms and expressions, it is not intended to exclude any equivalents of the features or portions thereof shown and described, but rather to recognize that various modifications may be possible within the scope of the invention.
[0212] Therefore, it should be understood that although the invention has been specifically disclosed through preferred embodiments, exemplary embodiments and optional features, those skilled in the art may take variations or modifications of the concepts disclosed herein, and such variations and modifications are therefore considered to be within the scope of the invention as defined by the appended claims.
[0213] The specific embodiments given in this specification are examples of useful implementations of the present invention. It will be apparent to those skilled in the art that the present invention can be implemented using many variations of the devices, device components, and method steps disclosed in this specification.
[0214] The foregoing description of specific embodiments fully discloses the general features of the present invention, enabling others to easily modify and / or adapt such specific embodiments for various applications by applying knowledge within the scope of the art, without conducting excessive experimentation and without departing from the general concept of the present invention.
[0215] Therefore, based on the teachings and guidance provided herein, it is intended that such modifications and alterations be included within the meaning and scope of equivalents of the disclosed embodiments. It should be understood that the wording or terminology used herein is for descriptive purposes and is not intended to be limiting; thus, the wording or terminology in this specification will be interpreted by those skilled in the art based on the foregoing teachings and guidance.
[0216] Furthermore, the scope of the invention should not be limited to any of the exemplary embodiments described above, but only to the appended claims and their equivalents.
Claims
1. A method for assessing the quality of SNP genotype filling, characterized in that, The SNP genotype filling quality assessment method includes: Step S1: Obtain the true genotype file and the filled genotype file of the target sample to be evaluated. The true genotype file contains the GT field from the high-confidence genotype results, and the filled genotype file contains the GT field and the genotype probability GP field. Step S2: Perform site matching and allele direction coordination on the SNP sites in the real genotype file and the filled genotype file, and convert the real genotype and the filled genotype into genotype codes under the same coding system for comparison to obtain the genotype filling correctness status of the SNP sites; Step S3: Based on the GP field in the filled genotype file, determine the GP filtering status of the SNP site according to the preset GP threshold; Step S4: Construct a confusion matrix based on the genotype filling correctness status and GP filtering status of each SNP locus, and evaluate the SNP genotype filling quality based on the confusion matrix.
2. The SNP genotype filling quality assessment method according to claim 1, characterized in that, The real genotype file and the filled genotype file are in VCF or VCF.GZ format.
3. The SNP genotype filling quality assessment method according to claim 1, characterized in that, Step S2 includes: Step S21: Parse the real genotype file and the filled genotype file to obtain the variation record information of each SNP site. The variation record information includes the chromosome name field, chromosome physical coordinate position field, REF allele field, ALT allele field, FORMAT field and sample genotype field. Step S22: Compare the variant record information corresponding to each SNP site with the preset candidate site conditions to obtain a set of candidate SNP sites; Step S23: Using chromosome name and genomic physical location as matching criteria, match each point in the candidate SNP site set with the corresponding points in the real genotype file and the filled genotype file to determine the corresponding SNP site pairs in the real genotype file and the filled genotype file; Step S24: For the SNP locus pair, compare the REF allele and ALT allele of the variant site in the real genotype file and the filled genotype file to determine whether the allele type of the REF allele and the ALT allele is REF / ALT consistent or REF / ALT interchanged. If the two belong to REF / ALT interchange, then the allele direction of the genotype code of the variant site in the filled genotype file is converted based on the allele direction of the real genotype file; Step S25: Convert the real genotype and the filled genotype into digital codes and compare them to obtain the genotype filling correctness status of the SNP locus. The genotype filling correctness status includes a filling correct status and a filling incorrect status.
4. The SNP genotype filling quality assessment method according to claim 3, characterized in that, Step S3 further includes: Step S31: Parse the filled genotype file to obtain the GP field corresponding to each SNP site; Step S32: Compare the GP field with the preset GP threshold to determine the GP filtering status of the SNP site. The GP filtering status includes retention status and rejection status.
5. The SNP genotype filling quality assessment method according to claim 1, characterized in that, Step S4 includes: Step S41: Combine the genotype filling correctness status and the GP filtering status to construct the confusion matrix; Step S42: Calculate the evaluation index of SNP genotype filling quality based on the confusion matrix, and evaluate the SNP genotype filling quality based on the evaluation index.
6. The SNP genotype filling quality assessment method according to claim 5, characterized in that, The confusion matrix includes GP reaching the threshold and the filled genotype is correct, GP reaching the threshold but the filled genotype is incorrect, GP not reaching the threshold but the filled genotype is actually correct, and GP not reaching the threshold and the filled genotype is incorrect.
7. The SNP genotype filling quality assessment method according to claim 5, characterized in that, Step S42 includes: Step S421: Based on the confusion matrix, calculate the filling precision, genotype retention rate, classification accuracy, true positive rate, true negative rate, false positive rate, false negative rate, and false discovery rate; Step S422: Based on the genotype correlation coefficient, the filling accuracy, the genotype retention rate, the classification accuracy, the true positive rate, the true negative rate, the false positive rate, the false negative rate, and the false detection rate, evaluate the SNP genotype filling quality from the perspectives of filling consistency, correct genotype retention ability, incorrect genotype screening ability, and overall balance performance.
8. The SNP genotype filling quality assessment method according to claim 1, characterized in that, The SNP genotype filling quality assessment method also includes: Step S5: Obtain the site annotation information and analysis parameters of the target sample to be evaluated, and perform multidimensional hierarchical evaluation of the target sample to be evaluated based on the site annotation information and the analysis parameters; The multidimensional hierarchical evaluation includes at least one of the following: Genotype hierarchical evaluation, MAF hierarchical evaluation, sHet hierarchical evaluation, GP threshold sensitivity evaluation, and wHet interval evaluation.
9. A device for assessing the quality of SNP genotype filling, characterized in that, The SNP genotype filling quality assessment device includes: an acquisition module, a conversion module, a determination module, and an assessment module. The acquisition module is used to acquire the true genotype file and the filled genotype file of the target sample to be evaluated. The true genotype file contains the GT field from the high-confidence genotype results, and the filled genotype file contains the GT field and the genotype probability GP field. The conversion module is used to perform site matching and allele direction coordination of SNP sites in the real genotype file and the filled genotype file, and to convert the real genotype and the filled genotype into genotype codes under the same coding system for comparison, so as to obtain the genotype filling correctness status of the SNP site. The determining module is used to determine the GP filtering status of SNP sites based on the GP field in the filled genotype file and according to a preset GP threshold. The evaluation module is used to construct a confusion matrix based on the genotype filling correctness status and GP filtering status of each SNP locus, and to evaluate the SNP genotype filling quality based on the confusion matrix.
10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When executed by a processor, the computer program / instructions implement the steps of the SNP genotype filling quality assessment method according to any one of claims 1-8.
