Genome short variant detection method and system based on third-generation sequencing
By constructing a multi-task, multi-class deep learning ensemble classifier and optimizing parameters using a focus loss function, the problems of long processing time and high false positive rate in short genome variant detection were solved, achieving efficient and accurate INDEL variant detection for third-generation sequencing data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2023-03-16
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies for detecting short genomic variants suffer from problems such as long processing time, high false positive or false negative rates, especially poor performance in detecting INDEL variants, and the problem of sample imbalance has not been effectively resolved.
A deep learning-based method for detecting short genomic variants based on third-generation sequencing is adopted. A multi-task, multi-class deep learning ensemble classifier is constructed using convolutional neural networks and bidirectional long short-term memory neural networks. By constructing a supervised learning dataset and training, validating, and testing it, and by optimizing the network parameters using a focus loss function, efficient variant detection of sequence alignment data is achieved.
It improves the accuracy and efficiency of short genome variant detection, reduces false positive and false negative rates, and significantly enhances the detection of INDEL variants. It is applicable to genome data generated by different third-generation sequencing technologies.
Smart Images

Figure CN116959560B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of bioinformatics and deep learning technology, specifically relating to a deep learning method and system for detecting short genomic variants based on third-generation sequencing. Background Technology
[0002] Variance detection is a method that infers the type, genotype, and length of variants at candidate mutation sites by comparing sequencing sequences with a human reference genome. Researchers can use variant detection tools to analyze DNA sequence mutation information in patients and their families, and combine this with clinical diagnostic information to help doctors explore and analyze the causes of diseases. There are many technologies for generating sequencing sequences. With the development of next-generation sequencing technologies, the length of sequencing sequences has evolved from the initial short reads to the current long reads. Compared to first-generation sequencing technologies, second-generation sequencing technologies produce data with advantages such as high throughput, high accuracy, and low cost. Third-generation sequencing has further developed, characterized by the elimination of the PCR amplification step before sequencing, lower cost, shorter sequencing time, and the generation of extremely long data. Representative third-generation sequencing technologies include PacBio's single-molecule real-time sequencing technology and ONT (Oxford Nanopore Tech)'s nanopore single-molecule sequencing technology. Although short read sequences have high basic accuracy, they often cannot be clearly aligned in repetitive regions and usually cannot provide a large amount of read-based phase information, while long read sequences overcome the basic limitations of short reads. Based on third-generation sequencing data, researchers can detect short variants and structural variants, including point mutations (SNPs) and insertions or deletions (INDELs). Currently, the main methods for short variant detection fall into two categories: statistical inference-based and deep learning-based. Statistical inference-based variant algorithms, exemplified by GATKHaplotypeCaller developed by the GATK team, perform genotyping through active region identification, candidate haplotype assembly, and calculation of the probability of each haplotype being observed. Deep learning-based methods, such as DeepVariant and Clair, have attracted significant attention due to their low research threshold, high detection efficiency, and high accuracy. These methods primarily use sequence alignment information and real variant information for feature encoding, thereby transforming the variant detection problem into an image classification problem.
[0003] Despite having the above-mentioned characteristics, these methods still have the following drawbacks:
[0004] 1) When using traditional methods to detect short variants in the genome, it is not only time-consuming, but even after variant filtering, there are still a large number of false positives or false negatives in the candidate variant set.
[0005] 2) In the detection methods for short variants, some tools are only available for SNPs, while other tools can detect both SNPs and INDELs at the same time, but the detection effect of INDELs is somewhat different from that of SNPs, or even worse.
[0006] 3) Although there is a lot of research on gene mutations, since gene mutations only occur in a small portion of the human genome, imbalance is inevitable when constructing datasets. This problem exists not only between mutated and non-mutated regions, but also among different types of mutations. This issue has not been well resolved by current deep learning-based methods.
[0007] With the development of deep learning, researchers hope to apply deep learning algorithms to the field of genome variation detection, and currently face two main challenges:
[0008] 1) Balancing mutation detection time and accuracy. The network structure is closely related to the time and space complexity of the mutation detection problem, and many researchers are striving to achieve a better balance between time consumption and detection accuracy. However, existing algorithms still have room for improvement in mutation detection.
[0009] 2) Improved INDEL variant detection performance. To reduce the false positive and false negative rates in the variant detection set, researchers have used various deep learning methods to improve the overall quality of the detected variant set, especially SNPs. However, existing algorithms have shortcomings in image encoding methods and loss functions, which limits the improvement of INDEL's detection performance. Summary of the Invention
[0010] The technical problem to be solved by the present invention is to provide a deep learning detection method and system for short genomic variants based on third-generation sequencing, which addresses the shortcomings of the prior art and solves the technical problems of long detection time, high false positive rate or false negative rate of traditional variant detection methods.
[0011] The present invention adopts the following technical solution:
[0012] A deep learning-based method for detecting short genomic variants based on third-generation sequencing includes the following steps:
[0013] S1. Construct a supervised learning dataset and divide it into a training set, a validation set, and a test set;
[0014] S2. Construct a multi-task, multi-class deep learning ensemble classifier with convolutional neural network and bidirectional long short-term memory neural network as the core. Use the training set, validation set and test set obtained in step S1 as the training, validation and testing of the deep learning classifier, respectively, to obtain the trained deep learning classifier.
[0015] S3. Use the deep learning classifier obtained in step S2 to classify and predict the stacked images from different samples. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. Select the maximum probability distribution prediction result of each sub-task of the stacked image to obtain the classification result of each task of the corresponding stacked image.
[0016] S4. Using the classification results of each point obtained in step S3, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, construct the final variant set row by row according to the position order of the variant on the chromosome to realize genome variant detection.
[0017] Specifically, step S1 is as follows:
[0018] S101. According to chromosome truncation, obtain the sequence alignment data of samples 1 to 5 of HG002 in the sequence alignment dataset of a certain reference genome version refver in the "Genome in Bottle" project, namely sample.refver.pacbio.bam, and the sequence alignment data of chromosome 20, namely sample.refver.pacbio.chr20.bam. sample.refver.pacbio.chr1_5.bam is used for model training and validation, and sample.refver.pacbio.chr20.bam is used for model testing. Extract the CIGAR string from the sequence alignment of each chromosome in the bam alignment data and filter it; count the chromosome, position, number of bases before mutation, and number of bases after each mutation. The insertion is marked as I, the deletion is marked as D, and the reference sequence is skipped is marked as N. The chromosomes are counted into the file can_fn_chri, i = 1, 2, 3, 4, 5, 20.
[0019] S102. According to chromosome truncation, obtain the real dataset sample.refver.vcf of a certain reference genome version refver in the bottle genome project and the real variant data sample.refver.chr1_5.vcf of sample HG002 from the high confidence variant interval dataset sample.refver.highconfi.bed, as well as the real variant data sample.refver.chr20.vcf of sample 20. For each point on each chromosome in the vcf real variant data, count the chromosome, position, base type before and after mutation, and genotype. The information is entered into the file var_fn_chr i according to chromosome.
[0020] S103. For each site in can_fn_chr_i and var_fn_chr_i in steps S101 and S102, initialize a 101×8×4 tensor x with 0. 101 represents the starting position of a mutation and the 50 bp bases on both sides, 8 represents the count of four possible bases from two different strands, and 4 represents counting the base sequences corresponding to reference, insertion, deletion, and point mutation using four different counting methods respectively. Then, simplify the base encoding method and encode the simplified bases digitally according to the IUPAC2Num rule. Accumulate the data by site and base type and write it into tensor x. The tensor information tensor_can_chr_i and tensor_var_chr_i generated from the mutation statistics in can_fn_chr_i and var_fn_chr_i are regarded as stacked images. Finally, the stacked images on chromosomes 1-5 are merged according to chromosomes to obtain the stacked image data tensor_can_chr_1_5 and tensor_var_chr_1_5. 1_5, tensor_can_chr20 and tensor_var_chr 20;
[0021] S104. Retain the tensors corresponding to all real mutations in tensor_var_chr 1_5, and by comparing them with tensor_var_chr 1_5, randomly extract stacked images of non-mutated sites from tensor_can_chr 1_5, initialize the ratio of non-mutated to mutated sites to 2:1, and finally mix the randomly selected non-mutated and mutated stacked images to obtain a training set with a sample size of 1,617,250; Retain the tensors corresponding to all real mutations in tensor_var_chr 20, and by comparing them with tensor_var_chr 20, randomly extract stacked images of non-mutated sites from tensor_can_chr 20, initialize the ratio of non-mutated to mutated sites to 2:1, and finally mix the randomly selected non-mutated and mutated stacked images to obtain a test set with a sample size of 139,098;
[0022] S105. Divide the dataset obtained in step S104 into a training set, a validation set, and a test set, with the ratio of the training set to the validation set being 8:2.
[0023] Specifically, in step S103, the counting method for writing tensor x after accumulating by site and base type is as follows:
[0024] If a certain site tag is a reference, then the base counts of the reference alleles within 50 bp before and after that site are written into the first channel of the third dimension of x.
[0025] If a certain site tag is an insertion, then the inserted base readbase information of the inserted sequence is written into the second channel of the third dimension of x;
[0026] If a certain site tag is deletion, then the missing base refbase information of the missing sequence is written into the third channel of the third dimension of x;
[0027] If a certain site tag is a point mutation, then the base information before and after the mutation site transformation is written into the fourth channel of the third dimension of x.
[0028] Specifically, in step S104, the stacked image is labeled with a 1×90 vector. The first 21 bits represent 21 genotypes composed of bases as Task 1; bits 22-24 represent 3 zygotic types as Task 2; bits 25-57 represent 33 variant lengths of the INDEL allele as Task 3; bits 58-90 represent 33 variant lengths of the other INDEL allele as Task 4. The 33 variant lengths in Task 3 or Task 4 belong to one of the following three categories: deletions exceeding 15 bp are one category; deletions or insertions of any number between -15 bp and 15 bp, including 31 bp, are one category; and insertions exceeding 15 bp are another category.
[0029] Specifically, step S2 is as follows:
[0030] S201. Construct a convolutional neural network for stacked image feature extraction and a bidirectional long short-term memory neural network for sequence feature extraction, and integrate these two networks to obtain an integrated network.
[0031] S202. Flatten the features obtained from the convolutional neural network and bidirectional long short-term memory neural network constructed in step S201 into one dimension, and then output a 1×90-dimensional probability distribution vector after passing through a fully connected layer, representing the probability distribution of the predicted mutation type of the four tasks.
[0032] S203. Based on the focus loss function, optimize and update the parameters of the convolutional neural network and the bidirectional long short-term memory neural network through adaptive moment estimation and backpropagation algorithm;
[0033] S204. Apply the deep learning model trained in step S203 to the corresponding test sets, and use the weighted F1-score of classification precision and recall to evaluate the classification accuracy of the deep learning classifier, thus obtaining the trained deep learning classifier.
[0034] Furthermore, in step S203, the multi-task loss function Loss used in the optimization process is:
[0035]
[0036] Among them, Loss t The loss is for task t.
[0037] Specifically, step S3 is as follows:
[0038] Information such as CIGAR alignment strings in sequence alignment data of size D is encoded into a 101×8×4 tensor; a deep learning classifier is used to predict the tensor encoded in step S1 to obtain a 1×90 probability distribution result.
[0039] Furthermore, during the prediction process, the genotype, zygotic type, and variant length of the predicted locus stacking image are combined, and the combined variant form is as follows:
[0040] Homozygous reference HomRef, homozygous point mutation HomSNP, heterozygous point mutation HetSNP, homozygous insertion HomIns, heterozygous insertion HetOneIns, heterozygous insertion HetTwoIns, homozygous deletion HomDel, heterozygous deletion HetOneDel, heterozygous deletion HetTwoDel, and heterozygous insertion and deletion HetInsDel.
[0041] Specifically, step S4 is as follows:
[0042] Using the classification results of each point obtained in step S3, combined with the base type and variant length of each point, as well as the corresponding chromosome and position information, the final variant set is constructed row by row according to the position order of the variant on the chromosome, thereby realizing the detection of genome variants.
[0043] Secondly, embodiments of the present invention provide a deep learning-based genomic short variant detection system based on third-generation sequencing, comprising:
[0044] The data module constructs a supervised learning dataset and divides it into a training set, a validation set, and a test set.
[0045] The model building and training module constructs a multi-task, multi-class deep learning ensemble classifier with convolutional neural networks and bidirectional long short-term memory neural networks as its core. The training set, validation set, and test set obtained from the data module are used as the training, validation, and testing sets of the deep learning classifier, respectively, to obtain a trained deep learning classifier.
[0046] The classification prediction module uses the deep learning classifier obtained from the training module to classify and predict each stacked image from different samples. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. The maximum probability distribution prediction result of each sub-task of the stacked image is selected to obtain the classification result of each task of the corresponding stacked image.
[0047] The variant set construction module uses the classification results of each point obtained by the classification module, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, to construct the final variant set row by row according to the position order of the variant on the chromosome, thereby realizing the detection of genome variants.
[0048] Compared with the prior art, the present invention has at least the following beneficial effects:
[0049] A deep learning-based method for detecting short genome variants based on third-generation sequencing (NGS) is developed. This method sets the image encoding method for biological sequences generated by the PacBio NGS platform and creates training, validation, and test sets based on real variant sets and corresponding sequence alignment data. A deep learning multi-task classifier, based on convolutional neural networks and bidirectional long short-term memory neural networks, is constructed. The classifier is trained and validated using the training and validation sets, with the loss function curve gradually converging during training. The trained deep learning classifier is then used to classify and predict the stacked images generated from sequence alignments or real variant sets. Based on the classification prediction results of the stacked images, variant site detection is performed on the sequence alignment data to obtain complete candidate variant information.
[0050] Furthermore, by utilizing image encoding, deep learning algorithms can be used to infer the genotype, zygotic type, and variant length of the corresponding sites in the stacked images. This enables variant detection of sequence data, the construction of candidate variant sets, and the training of new deep learning classifiers on new datasets obtained from specific sequencing technologies to create customized short variant detection tools for specific sequencing technologies.
[0051] Furthermore, by accumulating by site and base type and writing it into tensor x, the potential variant sites and the sequence alignment and base type within a 50bp range to their left and right can be considered simultaneously. This method can better display and detect INDELs. Through this concise and clear encoding method, some unnecessary information in the sequence alignment data can be filtered out, enabling the deep learning classifier to better acquire features in the stacked image, thereby giving the model better performance.
[0052] Furthermore, by labeling the stacked images and constructing a deep learning classifier using supervised learning, the classifier can clearly understand its target. Through training, the classifier can find the relationship between features and labels, thereby more accurately predicting the variation of unlabeled genome sequence alignment data. Moreover, the labeling in this invention combines information such as genotype, zygotic type, and variation length, fully considering various possible forms of short variations, which is more in line with actual biological significance.
[0053] Furthermore, the deep learning classifier obtained through training exhibits robustness and universality, and can be applied to genomic data generated by different third-generation sequencing technologies. Compared to traditional short variant detection methods, it extracts more features, such as sequence features, which is more conducive to improving detection accuracy.
[0054] Furthermore, the focus loss function is used as the classification loss function; the smaller the value of this loss function, the smaller the error of the deep learning classifier. Moreover, during training, this invention establishes an iterative loop and uses an adaptive moment estimation optimization algorithm to optimize the neural network parameters in the deep learning classifier, causing the focus loss function to gradually decrease and eventually converge to a minimum value, resulting in the final deep learning classifier.
[0055] Furthermore, for the 101×8×4 input tensor in this mutation detection problem, it is difficult to improve the model classification effect by simply relying on convolutional neural networks and attempting to increase the number of convolutional layers. However, by combining it with a bidirectional long short-term memory neural network, the final integrated network has better detection performance and solves the problem of decreased SNP mutation detection performance caused by the change in image encoding from 33×8×4 to 101×8×4. This network input size and structural design not only meets the practical needs of general INDEL mutations, but also reduces the false positive and false negative rates of the detected mutation set, making the short mutation detection method of this invention applicable to more gene mutation analyses.
[0056] Furthermore, by combining genotype, zygotic type, and variant length, 10 different types of variant variables are defined. Variants are distinguished as heterozygous or homozygous based on whether the variant length is consistent across genotype and alleles, and as Ref, SNP, and INDEL based on variant length. The above 10 types of variant variables are intended to cover most real-world short variant scenarios, thereby training a deep learning classifier capable of handling the vast majority of commonly used sequence alignment data. Simultaneously, for example, by consulting literature and referencing typical insertion or deletion lengths, this invention makes its image encoding method more closely resemble the real-world INDEL variant, significantly improving INDEL detection performance.
[0057] Furthermore, although the deep learning network structure used has a larger number of parameters compared to a simple convolutional network, it still maintains good time efficiency when performing mutation detection on sequence alignment data.
[0058] It is understandable that the beneficial effects of the second aspect mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0059] In summary, this invention proposes a novel deep learning-based method for detecting short-range genomic variants using third-generation sequencing technology. This method enables efficient variant detection on long-read sequence alignment data and is also applicable to short-read sequence alignment data. The invention designs a deep learning classifier covering most short-range mutation types, trained for different classification tasks. The trained classifier can detect variants on various samples and effectively handles class imbalance, while also improving INDEL detection performance. To address the issue of limited feature extraction, this invention integrates convolutional neural networks and bidirectional long short-term memory neural networks. The integrated network predicts candidate sites, significantly improving short-range variant detection performance, particularly INDEL variant detection.
[0060] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0061] Figure 1 This is a flowchart of the deep learning detection method and system for short genomic variants based on third-generation sequencing in an embodiment of the present invention;
[0062] Figure 2 This is a schematic diagram of the sequence alignment data parsing process in this invention;
[0063] Figure 3 This is a schematic diagram of the real variant data parsing process in this invention;
[0064] Figure 4 A schematic diagram of the image encoding process in this invention;
[0065] Figure 5 This is a simplified diagram of the IUPAC naming convention encoding rules and its numerical encoding in this invention;
[0066] Figure 6 This is a schematic diagram of the stacked hybrid SNPs in this invention;
[0067] Figure 7 This is a schematic diagram of homozygous insertion stacking images in this invention;
[0068] Figure 8 This is a schematic diagram of the stacking of multi-allelic heterozygous deletions in this invention;
[0069] Figure 9 This is a network framework diagram of the deep learning classifier CLNN-Caller in this invention;
[0070] Figure 10 This is a schematic diagram illustrating the shuffling of the dataset during training in this invention;
[0071] Figure 11 This is a graph showing the variation of training loss based on HG002 PacBio Chr1-Chr5 in this invention;
[0072] Figure 12 This is a schematic diagram of 10 possible categories of variation variables during classification in this invention;
[0073] Figure 13 This diagram illustrates the performance of the deep learning classifier and other methods in detecting variants on chromosome 20 of the NCBI database HG002 PacBio GRCh37 sequence alignment dataset. (a) shows the overall detection performance of each method on SNP and INDEL variants on chromosome 20 of HG002, and (b) shows the detection performance of each method on INDEL variants on chromosome 20 of HG002.
[0074] Figure 14 This diagram illustrates the performance of the deep learning classifier and other methods in detecting variants on chromosome 20 of the NCBI database HG001 PacBio GRCh37 sequence alignment dataset. (a) shows the overall detection performance of each method on SNP and INDEL variants on chromosome 20 of HG001, and (b) shows the detection performance of each method on INDEL variants on chromosome 20 of HG001. Detailed Implementation
[0075] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0076] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0077] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0078] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" relationship.
[0079] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0080] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0081] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0082] This invention provides a deep learning-based method for detecting short genomic variants based on third-generation sequencing. Utilizing convolutional neural networks and bidirectional long short-term memory neural networks, it offers a novel deep learning framework for detecting short genomic variants using third-generation sequencing technology, providing a retrainable toolkit for everyday applications of short variant detection. A Python command-line package, CLNN-Caller, has been developed to detect SNPs and INDEL variants in input sequence alignment data. Furthermore, new training parameters can be set for data from different sequencing technologies to obtain new deep learning classifiers, customizing the short genomic variant detection method for specific sequencing technologies. This invention effectively solves the problem of genomic variant detection. Compared to traditional deep learning methods, this invention balances detection time and accuracy, improves the graph encoding method, and combines temporal and image features, thus enabling better detection of INDEL variants in PacBio-based third-generation sequencing data, and therefore has greater application potential for specific scenarios.
[0083] Please see Figure 1 This invention discloses a deep learning-based method for detecting short genomic variants based on third-generation sequencing. It encodes features from sequence alignment data and actual variants, infers variant types and other information such as potential mutation sites in the genome using deep learning algorithms, and then detects variants in the sequence alignment data, constructing a variant detection set. Furthermore, it allows setting new parameters for datasets generated by specific sequencing technologies to train new deep learning classifiers, resulting in a customized deep learning network for short variant detection. The specific steps are as follows:
[0084] S1. Analyze the information in the sequence alignment BAM dataset and the real variant VCF dataset, count the variant-related information at each point, define 10 different variant variables, combine variant genotype, zygotic type, and variant length, based on the sequence alignment data of each sample using third-generation sequencing technology and its corresponding real variant data, use the stacked image after encoding the sequence alignment and real variant information as the supervised learning data, and use the corresponding variant genotype, zygotic type, and variant length categories as the classification labels for supervised learning, thus forming the supervised learning dataset, and finally divide the supervised learning dataset into training set, validation set, and test set;
[0085] S101. Download the sequence alignment data of HG002.GRC37.pacbio.bam (refver GRC37) from the Genome in a Bottle (GIAB) project database (ftp: / / ftp-trace.ncbi.nlm.nih.gov / ReferenceSamples / giab / data / AshkenazimTrio / HG002_NA24385_son / ). Use Samtools software to obtain sequences 1 to 5 of sample HG002 according to chromosome truncation. The alignment data HG002.GRC37.pacbio.chr1_5.bam and the sequence alignment data of chromosome 20 HG002.GRC37.pacbio.chr20.bam were used. HG002.GRC37.pacbio.chr1_5.bam was used for model training and validation, while HG002.GRC37.pacbio.chr20.bam was used for model testing. CIGAR strings were extracted from the sequence alignments on each chromosome in the bam alignment data, and low-quality sequences were filtered out. Then, the chromosome number, position, number of bases before mutation, and number of bases after each mutation were counted. Insertions or deletions were marked as I or D, and skipped reference sequences were marked as N. All sequences were entered into the file can_fn_chr i (i = 1, 2, 3, 4, 5, 20) according to chromosome count. Figure 2 As shown;
[0086] S102. Download the real datasets HG002.GRC37.vcf and HG002.GRC37.highconfi.bed (high confidence variant interval dataset) from the GIAB project, with the reference genome version refver being GRC37. Using Bcftools software, obtain the real variant data HG002.GRC37.chr1_5.vcf for samples 1 to 5 of the HG002 sample, and the real variant data HG002.GRC37.chr20.vcf for sample 20, according to chromosome truncation. For each chromosome in the vcf real variant data, statistically analyze the chromosome number, position, base types before and after mutation, and genotype. Record the information according to chromosome in the file var_fn_chr_i (i = 1, 2, 3, 4, 5, 20). Figure 3 As shown;
[0087] S103. For each site in can_fn_chr i and var_fn_chr i (i = 1, 2, 3, 4, 5, 20), initialize a 101×8×4 tensor x with 0. 101 represents the starting position of a mutation and the 50 bp bases on both sides. 8 represents the count of four possible bases from two different strands. 4 represents counting the base sequences corresponding to the four mutation cases (ref, insertion, deletion, and point mutation) using four different counting methods to highlight the Ref, Insertion, Deletion, and SNP at each site. Then, the base encoding method was simplified using the IUPAC nomenclature established by the International Union of Pure and Applied Chemistry. Following the IUPAC2Num rule, the simplified bases were numerically encoded and accumulated by site and base type, then written into tensor x. The writing method employed four different counting methods mentioned above: if the site label is Ref, the base counts of the site and the reference alleles within a 50bp range before and after it are written into the first channel of the third dimension of x; if the site label is Insertion, the readbase information of the inserted sequence is written into the second channel of the third dimension of x; if the site label is Deletion, the refbase information of the deleted sequence is written into the third channel of the third dimension of x; if the site label is SNP, the readbase information of the bases before and after the mutation site is written into the fourth channel of the third dimension of x. Tensor information tensor_can_chr is generated from the mutation statistics in can_fn_chr i and var_fn_chr i (i = 1, 2, 3, 4, 5, 20). i and tensor_var_chr i (i = 1, 2, 3, 4, 5, 20) can be considered as stacked images. Finally, the stacked images on chromosomes 1-5 are merged according to the chromosomes to obtain the stacked image data tensor_can_chr 1_5, tensor_var_chr 1_5, tensor_can_chr 20, and tensor_var_chr 20. The x encoding process is as follows... Figure 4 As shown;
[0088] Please see Figure 5 According to the IUPAC nomenclature, the naming rules are simplified and IUPAC bases are converted into numbers.
[0089] Please see Figure 6 , Figure 7 and Figure 8 x is generated by visualizing the image encoding rules.
[0090] S104. First, for `tensor_var_chr 1_5` and `tensor_can_chr 1_5` used for model training and validation, retain the tensors corresponding to all true mutations in `tensor_var_chr 1_5`. Then, by comparing with `tensor_var_chr 1_5`, randomly select some stacked images of non-mutated sites from `tensor_can_chr 1_5`, initializing the ratio of non-mutated to mutated sites to 2:1. Finally, mix the randomly selected non-mutated and mutated stacked images to obtain a training set (validation set) with a sample size of 1,617,250. Second, for `tensor_var_chr 20` and `tensor_can_chr 20` used for model testing, retain the tensors corresponding to all true mutations in `tensor_var_chr 20`. Then, by comparing with `tensor_var_chr 20`, randomly select some stacked images of non-mutated sites from `tensor_can_chr 1_5`, initializing the ratio of non-mutated to mutated sites to 2:1. Finally, mix the randomly selected non-mutated and mutated stacked images to obtain a training set (validation set) with a sample size of 1,617,250. Stacked images of some non-variant sites were randomly selected from 20 samples, with an initial non-variant to variant ratio of 2:1. The randomly selected non-variant and variant stacked images were then mixed to obtain a test set with a sample size of 139,098. These stacked images were then labeled with 1×90 vectors, where the first 21 digits represent 21 genotypes composed of bases (AA, AC, AG, AT, CC, CG, CT, GG, GT, TT, AI, CI, GI, TI, AD, CD, GD, TD, II, DD, and ID), which is Task 1; the 22nd to 24th digits represent 3 genotypes. The zygotic type (refer to 0 / 0, heterozygous 0 / 1, homozygous 1 / 1) is Task 2; the 25th-57th digits represent the 33 variant lengths of the INDEL allele, which is Task 3; the 58th-90th digits represent the 33 variant lengths of the other INDEL allele, which is Task 4. The 33 variant lengths in Task 3 or Task 4 may fall into one of the following three categories: deletions exceeding 15 bp (<-15 bp) are one category; deletions or insertions of any number between -15 bp and 15 bp, including 31 bp, are one category; and insertions exceeding 15 bp (>15 bp) are another category.
[0091] S105. The obtained dataset is divided into a training set (1,293,800 images), a validation set (323,450 images), and a test set (139,098 images), with the ratio of the training set to the validation set being 8:2.
[0092] The beneficial effects of the above technical solution are:
[0093] While simplifying sequence alignment encoding information, the combination of different classification results from different tasks is used to fully discuss various possible variables, which helps to improve the accuracy of classification tasks.
[0094] S2. Using the established supervised learning dataset, construct a multi-task, multi-class deep learning ensemble classifier with convolutional neural network and bidirectional long short-term memory neural network as the core. Use the training set, validation set, and test set from step S1 as the training, validation, and testing sets of the deep learning classifier, respectively, to obtain the trained deep learning classifier.
[0095] S201. Construct a convolutional neural network for stacked image feature extraction and a bidirectional long short-term memory neural network for sequence feature extraction, and integrate these two networks to obtain an ensemble network, named CLNN. The network framework is as follows: Figure 9 As shown;
[0096] S202. The features obtained from the constructed convolutional neural network and bidirectional long short-term memory neural network are flattened into one dimension, and then output as a 1×90-dimensional probability distribution vector after passing through a fully connected layer, representing the probability distribution of the predicted mutation types for the four tasks.
[0097] S203. Based on the focus loss function, optimize and update the parameters of the convolutional neural network and the bidirectional long short-term memory neural network through adaptive moment estimation and backpropagation algorithms. For the four tasks, train the corresponding deep learning classifiers respectively, setting the initial learning rate lr = 1 × 10⁻⁶. -3 Training batch size BatchSize = 10000, data block size BlockSize = 500, and the dataset shuffling method during training is as follows: Figure 10 As shown, the training loss changes during the training process as follows: Figure 11 As shown;
[0098] S204. Apply the trained deep learning model to the corresponding test sets, and use the classification F1-score metric to evaluate the classification accuracy of the deep learning classifier to obtain the trained deep learning classifier.
[0099] The loss function for the optimization process is as follows:
[0100] Given N samples, Loss t The loss for task t is γ, the focusing coefficient is α, and the sample balance parameter is used to solve the sample imbalance problem. cg Let α be the sample balance parameter for class cg in the genotype classification task. cz This represents the sample balancing parameter for the cz-th class in a zygote type classification task. The sample balance parameter represents the class cl1 in a classification task with a variation length of 1. Let represent the sample balancing parameter of class cl2 in the binary classification task with variable length. The loss function for the optimization process is:
[0101]
[0102] in,
[0103]
[0104]
[0105]
[0106]
[0107] Training settings γ = 2.
[0108] The beneficial effects of the above technical solution are:
[0109] By establishing an ensemble network, other types of features are extracted for image classification detection, thereby further improving the performance of mutation detection. The focus loss function is used to solve the problem of class imbalance in the dataset.
[0110] S3. For stacked image data from different samples, use the obtained multi-task multi-class deep learning ensemble classifier to perform classification prediction. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. Select the maximum probability distribution prediction result of each sub-task of the stacked image to obtain the classification result of each task of the stacked image.
[0111] S301. For genome sequence alignment bam data of size D, such as HG002.GRCh37.pacbio.bam in step S101 and another sequence alignment data HG001.GRCh37.pacbio.bam (ftp: / / ftp-trace.ncbi.nlm.nih.gov / ReferenceSamples / giab / data / NA12878 / ), each sample is truncated according to chromosome 20. According to the CIGAR alignment information statistical method in step S101, the alignment information in the bam is analyzed and statistically analyzed. Using the IUPAC2Num rule and stacked image encoding method in step S103, the alignment information of each point is encoded into a 101×8×4 tensor, i.e., a stacked image.
[0112] S302. Use a deep learning classifier to predict the tensor encoded in step S301 to obtain a 1×90 result.
[0113] During the prediction process, the genotype, zygotic type, and variant length of the predicted locus stacking image are combined. The combined variant forms include the following 10 categories:
[0114] Homozygous reference (HomRef), homozygous point mutation (HomSNP), heterozygous point mutation (HetSNP), homozygous insertion (HomIns), heterozygous insertion (HetOneIns, allele 1 undergoes a base change, allele 2 undergoes an insertion), heterozygous insertion (HetTwoIns, both alleles 1 and 2 undergo insertion), homozygous deletion (HomDel), heterozygous deletion (HetOneDel, allele 1 undergoes a base change, allele 2 undergoes a deletion), heterozygous deletion (HetTwoDel, both alleles 1 and 2 undergo deletion), and heterozygous insertion and deletion (HetInsDel, allele 1 undergoes an insertion, allele 2 undergoes a deletion) are selected based on the probability distribution values for each task provided by the deep learning classifier. The combination with the highest probability is chosen to determine the form of mutation, such as... Figure 12 As shown.
[0115] S4. Using the variant classification results obtained in step S3, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, construct the final variant set row by row according to the position order of the variant on the chromosome to realize genome variant detection; finally, combine the evaluation results of the variant set evaluation tool to conduct a comprehensive evaluation of the variant detection effect of the model.
[0116] S401. For the variant set HG002.pacbio.chr20.call.vcf generated after the sequence alignment data of HG002.GRCh37.pacbio.chr20.bam predicts the binding site location and other information, the Rtg-tools variant evaluation tool is used to evaluate it, with the F1-score as the judgment standard. The results are also compared with the detection results of Longshot, GATK, and Clair to determine the performance of the invention. The overall results are as follows: Figure 13 As shown, the short mutation detection performance is generally better than the other three algorithms;
[0117] S402. The variant set HG001.pacbio.chr20.call.vcf, generated after the sequence alignment data of HG001.GRCh37.pacbio.chr20.bam was predicted and the binding site location and other information were used to evaluate it using Rtg-tools.
[0118] Please see Figure 14 The model was compared with Longshot, GATK, and Clair algorithms to determine the generalization ability of the mutation detection model.
[0119] The embodiments of the present invention utilize a deep learning classifier, which not only has good performance in detecting INDEL variants, but also effectively improves the overall detection performance of SNPs and INDELs in real data.
[0120] In another embodiment of the present invention, a deep learning detection system for short genome variants based on third-generation sequencing is provided. This system can be used to implement the above-mentioned deep learning detection method for short genome variants based on third-generation sequencing. Specifically, the deep learning detection system for short genome variants based on third-generation sequencing includes a data module, a model construction and training module, a classification prediction module, and a variant set construction module.
[0121] The data module constructs a supervised learning dataset and divides it into a training set, a validation set, and a test set.
[0122] The model building and training module constructs a multi-task, multi-class deep learning ensemble classifier with convolutional neural networks and bidirectional long short-term memory neural networks as its core. The training set, validation set, and test set obtained from the data module are used as the training, validation, and testing sets of the deep learning classifier, respectively, to obtain a trained deep learning classifier.
[0123] The classification prediction module uses the deep learning classifier obtained from the training module to classify and predict each stacked image from different samples. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. The maximum probability distribution prediction result of each sub-task of the stacked image is selected to obtain the classification result of each task of the corresponding stacked image.
[0124] The variant set construction module uses the classification results of each point obtained by the classification module, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, to construct the final variant set row by row according to the position order of the variant on the chromosome, thereby realizing the detection of genome variants.
[0125] In another embodiment of the present invention, a terminal device is provided, comprising a processor and a memory. The memory stores a computer program, the computer program including program instructions, and the processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a deep learning detection method for short genomic variants based on third-generation sequencing, including:
[0126] A supervised learning dataset is constructed and divided into training, validation, and test sets. A multi-task, multi-class deep learning ensemble classifier based on convolutional neural networks and bidirectional long short-term memory neural networks is built. The training, validation, and test sets are used for training, validation, and testing of the deep learning classifier, respectively, to obtain a trained deep learning classifier. The deep learning classifier is used to classify and predict the classification of stacked images from different samples. The classification prediction result for each stacked image is a 1×90-dimensional probability distribution vector. The maximum probability distribution prediction result for each sub-task of the stacked image is selected to obtain the classification results for each task of the corresponding stacked image. Using the classification results at each point, as well as the base type and variant length of each stacked image, combined with the corresponding chromosome and location information, the final variant set is constructed row by row according to the position order of the variant on the chromosome to achieve genome variant detection.
[0127] In another embodiment of the present invention, a storage medium is also provided, specifically a computer-readable storage medium (memory). This computer-readable storage medium is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.
[0128] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the deep learning detection method for short genomic variants based on third-generation sequencing in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps:
[0129] A supervised learning dataset is constructed and divided into training, validation, and test sets. A multi-task, multi-class deep learning ensemble classifier based on convolutional neural networks and bidirectional long short-term memory neural networks is built. The training, validation, and test sets are used for training, validation, and testing of the deep learning classifier, respectively, to obtain a trained deep learning classifier. The deep learning classifier is used to classify and predict the classification of stacked images from different samples. The classification prediction result for each stacked image is a 1×90-dimensional probability distribution vector. The maximum probability distribution prediction result for each sub-task of the stacked image is selected to obtain the classification results for each task of the corresponding stacked image. Using the classification results at each point, as well as the base type and variant length of each stacked image, combined with the corresponding chromosome and location information, the final variant set is constructed row by row according to the position order of the variant on the chromosome to achieve genome variant detection.
[0130] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0131] The advantages of the genomic short variant detection results of this invention can be seen from the following aspects.
[0132] First, for the problem of detecting short variants in the genome, deep learning algorithms can treat it as a multi-task, multi-classification problem. This invention trains its own deep learning classifier, which outperforms previous methods in classifying INDEL variants on two real-world test datasets. This invention uses chromosome 20 sequence alignment data from two samples, HG001 and HG002, in the NCBI database for variant detection testing. Since Longshot is only applicable to SNP variant detection, for the INDEL variant detection problem, this invention uses only three methods, including this invention, in comparative experiments, using F1-score as the evaluation metric. The results are as follows: Figure 13 (b) and Figure 14 As shown in (b), it can be seen that the method of the present invention has a higher F1-score than the other two in terms of INDEL variant detection, indicating that the detection method of the CLNN-Caller of the present invention is more effective in INDEL variant detection.
[0133] Second, for the same data source, this invention compared its performance with other traditional detection tools. It demonstrated that the method of this invention has a better ability to handle short variant detection in real third-generation sequencing biological data, not only in INDEL variant detection, but also in overall short variant detection. This invention used chromosome 20 sequence alignment data from two samples, HG001 and HG002, in the NCBI database for variant detection testing. Comparisons were made not only with other methods in INDEL variant detection, but also with four methods, including this invention, in SNP and overall INDEL variant detection. Figure 13 (a) and Figure 14As shown in (a). Overall, the present invention has a higher F1-score than the other three, indicating that the CLNN-Caller of the present invention has better detection performance for short variant SNPs and INDELs, demonstrating that the method of the present invention has a better ability to handle the problem of short variant detection in long-read genomic sequences.
[0134] In summary, this invention presents a deep learning method and system for detecting short genomic variants based on third-generation sequencing. It sets the image encoding method for biological sequences generated by the third-generation sequencing platform and creates training, validation, and test sets based on real variant sets and corresponding sequence alignment data. A deep learning multi-task classifier with convolutional neural networks and bidirectional long short-term memory neural networks as its core is constructed. The deep learning classifier is trained and validated using the training and validation sets, and its accuracy is tested using the test set. Based on the trained deep learning classifier, the system performs classification prediction on stacked images generated from sequence alignment or real variant sets. Based on the classification prediction results of the stacked images, variant site detection is performed on the sequence alignment data to obtain complete candidate variant information, achieving automatic detection of short genomic variants with stable and excellent performance. Finally, the short variant SNP and INDEL detection algorithms are validated based on real sequence data. Applying the model to a real-world scenario verifies the accuracy and feasibility of this invention.
[0135] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0136] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0137] 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 implementations should not be considered beyond the scope of this invention.
[0138] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or 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 system, 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.
[0139] 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.
[0140] Furthermore, the functional units in the various embodiments of the present invention 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. The integrated unit can be implemented in hardware or as a software functional unit.
[0141] If the integrated module / unit 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, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0145] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A deep learning-based method for detecting short genomic variants based on third-generation sequencing, characterized in that, Includes the following steps: S1. Construct a supervised learning dataset and divide it into a training set, a validation set, and a test set, specifically as follows: S101. Based on chromosome truncation, obtain the sequence alignment data of samples 1 to 5 (sample.refver.pacbio.chr1_5.bam) and the sequence alignment data of chromosome 20 (sample.refver.pacbio.chr20.bam) from the HG002 sample.refver.pacbio.chr20.bam in the sample.refver.pacbio.chr1_5.bam dataset of a reference genome version (refver) in the "Genome in Bottle" project. sample.refver.pacbio.chr1_5.bam is used for model training and validation, and sample.refver.pacbio.chr20.bam is used for model testing. Extract CIGAR strings from the sequence alignments on each chromosome in the bam alignment data and filter them. Count the chromosome, position, number of bases before mutation, and number of bases after each mutation. Label insertion as I, deletion as D, and skip reference sequences as N. Include the chromosomes in the file can_fn_chr. i , i =1, 2, 3, 4, 5, 20; S102. Based on chromosome extraction, obtain the real dataset sample.refver.vcf and the real variant data sample.refver.chr1_5.vcf of sample HG002 from a reference genome version refver in the bottle genome project, and the real variant data sample.refver.chr20.vcf of sample 20 from the high confidence variant interval dataset sample.refver.highconfi.bed. For each chromosome in the real variant data of vcf, count the chromosome, position, base type before and after mutation, and genotype. The information is entered into the file var_fn_chr according to chromosome. i ; S103, regarding can_fn_chr in steps S101 and S102 i and var_fn_chr i Each point in the array is initialized with a 101×8×4 tensor. x 101 represents the start position of a mutation and the 50 bp bases on either side; 8 represents the count of four possible bases from two different strands; and 4 represents counting the base sequences corresponding to reference, insertion, deletion, and point mutation using four different counting methods. Then, the base encoding method is simplified, and the simplified bases are numerically encoded according to the IUPAC2Num rule. The results are then accumulated by site and base type and written into a tensor. x For can_fn_chr i and var_fn_chr i The tensor information generated from the variation statistics is tensor_can_chr i and tensor_var_chr i These are considered as stacked images. Finally, the stacked images on chromosomes 1-5 are merged according to chromosome number to obtain the stacked image data tensor_can_chr 1_5 and tensor_var_chr 1. _ 5. tensor_can_chr 20 and tensor_var_chr 20; accumulating data by site and base type and writing it into the tensor. x The counting method is as follows: If a certain site tag is a reference, then the base counts of the reference alleles within that site and the 50bp range before and after it are written into the database. x The first channel of the third dimension; If a certain site tag indicates an insertion, then the inserted base readbase information of the inserted sequence is written to... x The second channel of the third dimension; If a site is labeled as deleted, then the refbase information of the deleted bases in the deleted sequence is written to... x The third channel of the third dimension; If a certain site tag is a point mutation, then the base information before and after the mutation site is written into... x The fourth channel of the third dimension; S104. Retain the tensors corresponding to all real mutations in tensor_var_chr 1_5, and by comparing them with tensor_var_chr 1_5, randomly extract stacked images of non-mutated sites from tensor_can_chr 1_5, initialize the ratio of non-mutated to mutated sites to 2:1, and finally mix the randomly selected non-mutated and mutated stacked images to obtain a training set with a sample size of 1,617,250; Retain the tensors corresponding to all real mutations in tensor_var_chr 20, and by comparing them with tensor_var_chr 20, randomly extract stacked images of non-mutated sites from tensor_can_chr 20, initialize the ratio of non-mutated to mutated sites to 2:1, and finally mix the randomly selected non-mutated and mutated stacked images to obtain a test set with a sample size of 139,098; S105. Divide the dataset obtained in step S104 into a training set, a validation set, and a test set, with the ratio of the training set to the validation set being 8:
2. S2. Construct a multi-task, multi-class deep learning ensemble classifier with convolutional neural networks and bidirectional long short-term memory neural networks as its core. Use the training set, validation set, and test set obtained in step S1 as the training, validation, and testing sets of the deep learning classifier, respectively, to obtain the trained deep learning classifier. Specifically: S201. Construct a convolutional neural network for stacked image feature extraction and a bidirectional long short-term memory neural network for sequence feature extraction, and integrate these two networks to obtain an integrated network. S202. Flatten the features obtained from the convolutional neural network and bidirectional long short-term memory neural network constructed in step S201 into one dimension, and then output a 1×90-dimensional probability distribution vector after passing through a fully connected layer, representing the probability distribution of the predicted mutation type of the four tasks. S203. Based on the focus loss function, optimize and update the parameters of the convolutional neural network and the bidirectional long short-term memory neural network through adaptive moment estimation and backpropagation algorithms. The multi-task loss function used in the optimization process is... for: in, For the task t The loss; S204. Apply the deep learning model trained in step S203 to the corresponding test sets, and use the weighted F1-score of classification precision and recall to evaluate the classification accuracy of the deep learning classifier, and obtain the trained deep learning classifier. S3. Use the deep learning classifier obtained in step S2 to classify and predict the stacked images from different samples. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. Select the maximum probability distribution prediction result of each sub-task of the stacked image to obtain the classification result of each task of the corresponding stacked image. S4. Using the classification results of each point obtained in step S3, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, construct the final variant set row by row according to the position order of the variant on the chromosome to realize genome variant detection.
2. The deep learning method for detecting short genomic variants based on third-generation sequencing according to claim 1, characterized in that, In step S104, the stacked image is labeled with a 1×90 vector. The first 21 bits represent the 21 genotypes composed of bases as Task 1; bits 22-24 represent the 3 zygotic types as Task 2; bits 25-57 represent the 33 variant lengths of the INDEL allele (length 1) as Task 3; bits 58-90 represent the 33 variant lengths of the other INDEL allele (length 2) as Task 4. The 33 variant lengths in Task 3 or Task 4 belong to one of the following three categories: deletion exceeding 15 bp is category 1, deletion or insertion. Any number between 15bp and 15bp, including 31bp, is classified into one category; insertions exceeding 15bp are classified into another category.
3. The deep learning method for detecting short genomic variants based on third-generation sequencing according to claim 1, characterized in that, Step S3 is as follows: The size is The sequence alignment data contains CIGAR alignment strings and other information encoded into a single... The tensor; using a deep learning classifier to predict the tensor encoded in step S1, obtain... The probability distribution results.
4. The deep learning method for detecting short genomic variants based on third-generation sequencing according to claim 3, characterized in that, During the prediction process, the genotype, zygotic type, and variant length of the predicted locus stacking image are combined, and the combined variant form is as follows: Homozygous reference HomRef, homozygous point mutation HomSNP, heterozygous point mutation HetSNP, homozygous insertion HomIns, heterozygous insertion HetOneIns, heterozygous insertion HetTwoIns, homozygous deletion HomDel, heterozygous deletion HetOneDel, heterozygous deletion HetTwoDel, and heterozygous insertion and deletion HetInsDel.
5. The deep learning method for detecting short genomic variants based on third-generation sequencing according to claim 1, characterized in that, Step S4 is as follows: Using the classification results of each point obtained in step S3, combined with the base type and variant length of each point, as well as the corresponding chromosome and position information, the final variant set is constructed row by row according to the position order of the variant on the chromosome, thereby realizing the detection of genome variants.
6. A deep learning-based genomic short variant detection system based on third-generation sequencing, characterized in that, include: The data module constructs a supervised learning dataset and divides it into training, validation, and test sets, specifically: Based on chromosome extraction, the sequence alignment data for samples 1 to 5 (sample.refver.pacbio.chr1_5.bam) and the sequence alignment data for chromosome 20 (sample.refver.pacbio.chr20.bam) of sample.refver.pacbio.chr20.bam from the HG002 sample sequence alignment dataset of a reference genome version (refver) in the "Genome in a Bottle" project were obtained. sample.refver.pacbio.chr1_5.bam was used for model training and validation, while sample.refver.pacbio.chr20.bam was used for model testing. CIGAR strings were extracted from the sequence alignments on each chromosome in the bam alignment data and filtered. The chromosome number, position, number of bases before mutation, and number of bases after each mutation were counted. Insertion was marked as I, deletion as D, and skipped reference sequences were marked as N. The data was then entered into the file can_fn_chr according to the chromosome. i , i =1, 2, 3, 4, 5, 20; Based on chromosome extraction, the real dataset sample.refver.vcf and the real variant data sample.refver.chr1_5.vcf of sample HG002 from the high-confidence variant interval dataset sample.refver.highconfi.bed were obtained for a certain reference genome version refver in the "Genome in a Bottle" project. The real variant data sample.refver.chr20.vcf of sample HG002 were obtained for sample.refver.chr1_5.vcf and sample.refver.chr20.vcf, respectively. For each chromosome in the real variant data sample.vcf, the chromosome, position, base type before and after mutation, and genotype were counted. The information was entered into the file var_fn_chr according to chromosome. i ; for can_fn_chr i and var_fn_chr i Each point in the array is initialized with a 101×8×4 tensor. x 101 represents the start position of a mutation and the 50 bp bases on either side; 8 represents the count of four possible bases from two different strands; and 4 represents counting the base sequences corresponding to reference, insertion, deletion, and point mutation using four different counting methods. Then, the base encoding method is simplified, and the simplified bases are numerically encoded according to the IUPAC2Num rule. The results are then accumulated by site and base type and written into a tensor. x For can_fn_chr i and var_fn_chr i The tensor information generated from the variation statistics is tensor_can_chr i and tensor_var_chr i These are considered as stacked images. Finally, the stacked images on chromosomes 1-5 are merged according to chromosome number to obtain the stacked image data tensor_can_chr 1_5 and tensor_var_chr 1. _ 5. tensor_can_chr20 and tensor_var_chr20; accumulating data by site and base type and writing it into the tensor. x The counting method is as follows: If a certain site tag is a reference, then the base counts of the reference alleles within that site and the 50bp range before and after it are written into the database. x The first channel of the third dimension; If a certain site tag indicates an insertion, then the inserted base readbase information of the inserted sequence is written to... x The second channel of the third dimension; If a site is labeled as deleted, then the refbase information of the deleted bases in the deleted sequence is written to... x The third channel of the third dimension; If a certain site tag is a point mutation, then the base information before and after the mutation site is written into... x The fourth channel of the third dimension; Tensors corresponding to all real mutations in tensor_var_chr 1_5 are retained, and stacked images of non-mutated sites are randomly extracted from tensor_can_chr 1_5 by comparison with tensor_var_chr 1_5. The ratio of non-mutated to mutated sites is initialized to 2:
1. Finally, the randomly selected stacked images of non-mutated and mutated sites are mixed to obtain a training set with a sample size of 1,617,250. Tensors corresponding to all real mutations in tensor_var_chr 20 are retained, and stacked images of non-mutated sites are randomly extracted from tensor_can_chr 20 by comparison with tensor_var_chr 20. The ratio of non-mutated to mutated sites is initialized to 2:
1. Finally, the randomly selected stacked images of non-mutated and mutated sites are mixed to obtain a test set with a sample size of 139,098. The obtained dataset is divided into a training set, a validation set, and a test set, with a ratio of 8:2 between the training set and the validation set. The model building and training module constructs a multi-task, multi-class deep learning ensemble classifier based on convolutional neural networks and bidirectional long short-term memory neural networks. The training, validation, and test sets obtained from the data module are used for training, validation, and testing of the deep learning classifier, respectively, resulting in a trained deep learning classifier. Specifically: A convolutional neural network for stacked image feature extraction and a bidirectional long short-term memory neural network for sequence feature extraction are constructed, and the two networks are integrated to obtain an ensemble network. The features obtained from the constructed convolutional neural network and bidirectional long short-term memory neural network are flattened into one dimension, and then output as a 1×90-dimensional probability distribution vector after passing through a fully connected layer, representing the probability distribution of the predicted mutation types for the four tasks. Based on the focus loss function, the parameters of the convolutional neural network and the bidirectional long short-term memory neural network are optimized and updated through adaptive moment estimation and backpropagation algorithms. The optimization process uses a multi-task loss function. for: in, For the task t The loss; The trained deep learning model is applied to the corresponding test set, and the classification accuracy of the deep learning classifier is evaluated using the weighted F1-score of classification precision and recall to obtain the trained deep learning classifier. The classification prediction module uses the deep learning classifier obtained from the training module to classify and predict each stacked image from different samples. The classification prediction result of each stacked image is a 1×90-dimensional probability distribution vector. The maximum probability distribution prediction result of each sub-task of the stacked image is selected to obtain the classification result of each task of the corresponding stacked image. The variant set construction module uses the classification results of each point obtained by the classification module, combined with the base type and variant length of each stacked image, as well as the corresponding chromosome and position information, to construct the final variant set row by row according to the position order of the variant on the chromosome, thereby realizing the detection of genome variants.
Citation Information
Patent Citations
Model-independent genome structure variation detection system and method
CN113963746A
Chromatin ring prediction method and system based on deep learning
CN114842914A