Genome structure variation deep learning detection method and system based on third-generation sequencing

Through a two-way convolutional neural network with four-channel image coding and attention mechanism, the problems of inconsistency and high false positive rate of structural variation detection in the prior art are solved, and accurate detection of various structural variation types in the third-generation sequencing data is achieved.

CN120496633APending Publication Date: 2025-08-15XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510612933.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing structural variation detection methods are inconsistent under various structural variation types, and there are high false positive or false negative rates. Especially in deep learning-based methods, image encoding is simple and difficult to distinguish between insertion and repetitive variation, and traditional network frameworks have limited room for improvement in performance.

Method used

A two-way convolutional neural network using four-channel image encoding method combined with attention mechanism is constructed by extracting comparison and deep signals, and a deep learning structural variation detection model is used for structural variation detection of third-generation sequencing data.

Benefits of technology

It improves the accuracy and consistency of structural variation detection, especially in the distinction ability of insertion and repetitive variation, reduces the false positive rate and false negative rate, and is suitable for detection of various types of structural variation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496633A_ABST
    Figure CN120496633A_ABST
Patent Text Reader

Abstract

The invention discloses a deep learning detection method and system for genome structure variation based on third-generation sequencing. Simulation data and real data are used for constructing a sequence data set; the method comprises the following steps of: according to comparison modes of various structural variations, extracting comparison and depth signals from comparison data of a long read sequence generated by a third-generation sequencing technology, realizing coding from a genome sequence to a four-channel image, and constructing a supervised training set, a supervised verification set and a supervised test set based on a structural variation set and the corresponding comparison data; establishing a double-path CNN integrated deep learning classification model with an attention mechanism, and performing model training, verification and testing by using a training set, a verification set and a test set; and predicting a four-channel image generated by sequence alignment data coding based on the trained deep learning classification model, and identifying a genome structure variation type and a breakpoint coordinate according to a prediction result of image classification so as to realize automatic detection of genome insertion, deletion, inversion and repeated structure variation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of bioinformatics and deep learning technology, and specifically relates to a deep learning detection method and system for genome structural variation based on third-generation sequencing. Background Art

[0002] Structural variation (SV) detection aims to identify sequence alterations greater than 50 base pairs (50 bp) in the genome, including deletions (DELs), insertions (INSs), inversions (INVs), duplications (DUPs), and translocations (TRAs). These variants play a crucial role in many genetic diseases, tumorigenesis, and population evolution. Accurately detecting structural variations allows researchers to uncover alterations in gene function and potential pathogenic mechanisms, making structural variation detection crucial for genetic disease diagnosis, precision medicine, and personalized treatment. Detection of structural variations relies on genomic data generated by high-throughput sequencing technologies. Currently, commonly used data sources include second-generation short-read sequencing (e.g., Illumina) and third-generation long-read sequencing (e.g., PacBio, ONT). Short-read sequencing technologies offer high sequencing accuracy and low cost, making them widely used for short-range variant detection, exome sequencing, and transcriptome research. However, due to its short read length, generally 100bp to 300bp, alignment is difficult in complex genomic regions, such as repetitive sequence regions, resulting in limited detection rate and accuracy of structural variations. In contrast, the long-read data generated by third-generation sequencing technology has ultra-long read lengths, reaching thousands to tens of thousands of bp, which has a natural advantage in directly analyzing structural variations. Although third-generation sequencing faced the problem of high sequencing error rates in the early days, with the development of sequencing platforms and algorithms, its accuracy has been significantly improved, and it has been widely used in the comprehensive detection of structural variations. For example, PacBio high-fidelity sequencing data (PacBio HiFi) combines the advantages of long read length and high accuracy, and is widely used in structural variation detection tasks.

[0003] Structural variation detection methods can be further categorized into traditional rule-based or statistical methods and deep learning methods based on neural networks. Traditional methods typically manually extract features from alignments of sequencing data with a reference genome based on the biological significance of the structural variation to characterize the alignment pattern of each structural variation type. These features are then fed into statistical models or heuristic methods to predict different SV types and breakpoints, such as those used by methods like DELLY, LUMPY, and Sniffles. Later, given the information mining capabilities of deep learning in large-scale data, deep learning-based SV detection methods were explored and developed. These methods primarily utilize information from sequence alignments for feature encoding, thereby transforming the variant detection problem into an image classification problem. Computer vision models are then applied to solve the problem, significantly improving variant detection accuracy, such as methods like Cue and SVision. Deep learning offers the ability to directly learn complex and abstract features from large labeled datasets, making it an effective approach for comprehensive SV detection.

[0004] Although these methods have the above characteristics, they still have the following defects: 1) Traditional methods perform manual feature extraction based on typical alignment patterns of various structural variations. This method cannot cover the various complex alignment situations of the genome in context, and it is difficult to maintain consistent high specificity and high sensitivity in detecting multiple different types of SVs.

[0005] 2) Traditional methods are mostly applicable to short-read sequencing data, but short-read sequencing data cannot effectively detect INS due to its short read length.

[0006] With the development of deep learning, researchers have gradually applied deep learning algorithms to the field of genomic structural variation detection. Currently, they face two main challenges: 1) In deep learning-based structural variation detection methods, genomic sequence data generally needs to be encoded into images for resolution. However, there is a problem with the simple image encoding method. For example, image encoding only considers the alignment signal and does not fully utilize the information in the alignment data, which can easily lead to false positive and false negative prediction results.

[0007] 2) Many structural variation detection methods are prone to confusion in the identification of INS and DUP variations and are unable to effectively distinguish INS and DUP variations.

[0008] 3) The network framework used by the detection method is relatively traditional, and its overall performance in detecting multiple structural variations still has room for improvement. Summary of the Invention

[0009] The technical problem to be solved by the present invention is to address the deficiencies in the above-mentioned existing technologies and provide a method and system for deep learning detection of structural variation in genomes based on third-generation sequencing, so as to solve the technical problems that current structural variation detection methods have inconsistent performance under various types of structural variation and high false positive or false negative rates.

[0010] The present invention adopts the following technical solutions: The deep learning detection method for genome structural variation based on third-generation sequencing includes the following steps: Four-channel image encoding and annotation were performed on the simulated variation set containing insertions, deletions, inversions and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset, respectively, to obtain the encoded image dataset; Use the obtained image dataset to train a deep learning structural variation classification model using a two-way convolutional neural network ensemble with an attention mechanism; Use the trained deep learning structural variation classification model to predict the structural variation type of the encoded image from the genome, and use the maximum probability prediction result as the structural variation type to achieve the structural variation type prediction of the genome; The obtained structural variation type prediction results are used in combination with the cluster region to which the fragment of the encoded image belongs. The cluster region coordinates are used as the breakpoint coordinate prediction results of the corresponding structural variation. The final structural variation set is constructed in coordinate order to realize structural variation detection of the genome.

[0011] Preferably, the encoded image dataset includes a training set, a simulated test set, and a real test set, as follows: Chromosomes chr1, chr2, chr17, and chrx in the human genome were selected to simulate variant sets carrying insertions, deletions, inversions, and duplications, variant genomes, and their long-read sequencing data. The long-read sequencing data were aligned to obtain alignment data for constructing a training set, which was then divided into a training subset and a validation subset based on the level of structural variation. Chromosome chr12 in the human genome was selected to obtain a simulated variant set carrying insertions, deletions, inversions, and duplications, along with their alignment data, to construct a simulated test set. Download the HG002 sample alignment data, along with its whole-genome true variant set and variant region set. The whole-genome true variant set only contains records of DEL and INS variants. HG002 is a widely recognized benchmark dataset for structural variation detection and was used to construct the true test set.

[0012] Preferably, the simulation test set is constructed as follows: Reference sequences for chromosomes chr1, chr2, chr17, and chrx were extracted from the GRCh38 reference genome. A total of 500, 500, 300, and 300 structural variants were simulated on the chr1, chr2, chr17, and chrx reference sequences, respectively. Insertions, deletions, inversions, and duplications were randomly introduced into each chromosome at a ratio of 35:35:10:20 to generate the variant genome sim.fa. The variant positions were recorded in the simulated variant set sim_sv.bed. The variant genome was then used as input to simulate 30× depth PacBio HiFi long-read sequencing data. After alignment and sorting with minimap2, the alignment data sim.srt.bam was generated.

[0013] Preferably, the four-channel image encoding and labeling is performed as follows: Collect abnormally aligned sequence fragments from the alignment data as variant feature fragments, and their aligned sequence fragments on the reference genome to extract alignment signals; Identify and extract the fragment combinations pointing to a single mutation event, write the coordinates, direction, and length information of the two adjacent fragments in the cluster to a file named chr_name.segments.bed in the Read and Ref respectively, and write the cluster region information in the file; A three-channel RGB image is used to encode the two variant feature segments and the corresponding reference sequence recorded in each line of the chr_name.segments.bed file, and a three-channel image with a size of 224×224×3 is obtained. The axis represents the reference genome sequence, The axis represents the sequencing read sequence; According to the three-channel image The reference genome regions represented by the axes [ , ], get Compare the files chromosome arrive List of alignment depths for each base position in the range ; will compare the depth list Divide into multiple bins , calculate each bin The average value of the result is a list with a length of the number of pixels ; Then the list g is smoothed to obtain List, finally normalized get List, the The element value corresponding to the index As the fourth channel The values of the column pixels are taken to realize the depth signal extraction and complete the construction of the fourth channel image, which is superimposed with the three-channel image to obtain the four-channel image; The simulated alignment data and HG002 alignment data were aligned, depth signals were extracted, and encoded into four-channel images. Subsequently, the variant set corresponding to the alignment data and its segment feature file chr_name.segments.bed were traversed, and the variant type corresponding to the variant region with the largest intersection with the cluster region where the segment in the current record row is located was used as the image label generated by the current segment. This resulted in the training image dataset Sim-PacBio-4chrs, the simulated test image dataset Sim-PacBio-Chr12, and the real test image dataset HG002-PacBio-Allchrs.

[0014] Preferably, abnormally aligned sequence segments are collected from the alignment data as variant feature segments, and their aligned sequence segments on the reference genome, specifically: Extract alignment fragments around structural variations from inter-read alignments and intra-read alignments, define primary and secondary fragments, traverse each read, filter out unaligned reads with MAPQ < 10, and then traverse the alignment object lists of the filtered reads to obtain the primary and supplementary alignment lists of the current read; Filter reads with more than 4 supplementary alignments, traverse the alignment list of the filtered reads, record the alignments in the same direction as the primary alignment, and sort them according to their coordinates on the read. Define the first and last alignments in the same direction after sorting as the primary fragments, and based on the positional overlap between other alignments and these two primary fragments, define the alignments with an overlap greater than or equal to 0.8 as secondary fragments; Analyze the CIGAR field of the primary fragment, identify records containing D and I characters and whose length is greater than the minimum structural variation length, extract the sequence fragments before and after the two characters as the new primary fragment, and complete the identification of all primary and secondary fragments of the current read.

[0015] Preferably, a three-channel RGB image is used to encode the two variant feature segments and the corresponding reference sequence recorded in each line of the chr_name.segments.bed file, specifically: Traverse each row of the chr_name.segments.bed file, and for each record, initialize a three-channel image matrix of size 224×224×3, and set the initial values of all elements to zero; Extract information about a pair of adjacent segments from the current record and process each segment as follows: If the fragment direction is positive, in the first channel of the image, draw a white straight line according to its starting position and ending position, that is, set the value of the corresponding pixel site to 255, and the direction is from the starting point to the end point; If the direction of the segment is reversed, a white straight line is drawn from the end point to the starting point in the first and third channels of the image to clearly distinguish the directionality; After the fragments are drawn, the first channel is scanned column by column. If there are two or more non-zero pixels in a column, the corresponding pixel position is set to 255 in the second channel to mark the part where the two fragments are repeatedly aligned to the reference genome region; The generated image matrix is used as the encoded three-channel image, which integrates the alignment position, alignment direction, and overlapping information between fragments to form a visual expression of the structural variation alignment signal.

[0016] Preferably, the obtained image dataset is used to train a deep learning structural variation classification model of a two-way convolutional neural network ensemble with an attention mechanism, specifically: Build a deep learning structural variation classification model based on a dual-path convolutional neural network integration of four-channel images and attention mechanism; The features obtained by the constructed deep learning structural variation classification model are flattened into one dimension, and then output as a 1×4 dimensional probability distribution vector after passing through a fully connected layer and a Softmax activation function; Using focal loss function , using the training set Sim-PacBio-4chrs, the parameters of the deep learning structural variation classification model were optimized and updated through adaptive moment estimation and backpropagation algorithm to perform model training; Focal loss function for:

[0017] in, For category The weight coefficient of is the regulating factor, is the focusing parameter, is the total number of categories, is the true label of the image in indicator function on the class, Indicates the model The predicted probability of the class.

[0018] Preferably, the trained deep learning structural variation classification model is used to predict the structural variation type of the encoded image from the genome, specifically: Extract the alignment and depth signals from the alignment data and encode them into a 224×224×4 tensor; Use the trained deep learning structural variation classification model to predict the encoded tensor and obtain a 1×4 probability distribution result; The predicted 1×4 probability vectors represent the probabilities of insertion, deletion, inversion, and duplication mutations, respectively. The type with the highest probability value is taken as the structural variation type prediction result of the input image.

[0019] Preferably, the structural variation detection of the genome is specifically: The segment information in the chr_name.segments.bed file is encoded into a four-channel image. The trained deep learning structural variation classification model is used to predict the encoded four-channel image encoding to obtain the structural variation type. The cluster region coordinates of the segment used for image encoding in the chr_name.segments.bed file are then used as the breakpoint coordinates of the structural variation. According to the chromosome where the variation is located and its breakpoint coordinates, the final structural variation set containing the structural variation type and breakpoint coordinates is constructed in sequence to realize structural variation detection of the genome.

[0020] In a second aspect, an embodiment of the present invention provides a deep learning detection system for genome structural variation based on third-generation sequencing, comprising: The data module performs four-channel image encoding and annotation on the simulated variation set containing insertions, deletions, inversions, and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset, respectively, to obtain the encoded image dataset; The training module uses the obtained image dataset to train a deep learning structural variation classification model using a dual-path convolutional neural network ensemble with an attention mechanism; The prediction module uses the trained deep learning structural variation classification model to predict the structural variation type of the encoded image from the genome, and uses the maximum probability prediction result as the structural variation type to achieve the structural variation type prediction of the genome; The detection module uses the obtained structural variation type prediction results, combined with the cluster area to which the encoded image fragment belongs, and uses the cluster area coordinates as the breakpoint coordinate prediction results of the corresponding structural variation. The final structural variation set is constructed in coordinate order to realize structural variation detection of the genome.

[0021] In a third aspect, a computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned method for deep learning detection of structural variation in genomes based on third-generation sequencing are implemented.

[0022] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for deep learning detection of genome structural variation based on third-generation sequencing.

[0023] In the fifth aspect, a chip comprises a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for deep learning detection of genome structural variation based on third-generation sequencing are implemented.

[0024] In a sixth aspect, an embodiment of the present invention provides an electronic device, comprising a computer program, which, when executed by the electronic device, implements the steps of the above-mentioned method for deep learning detection of genome structural variations based on third-generation sequencing.

[0025] Compared with the prior art, the present invention has at least the following beneficial effects: A deep learning-based method for detecting structural variation in genomes based on third-generation sequencing (NGS) is proposed. This method designs an image encoding scheme for long-read genomic sequences generated by NGS platforms. By extracting alignment and depth signals from sequence alignment data, it implements four-channel image encoding of genomic sequences, transforming the structural variation detection problem into an image multi-classification problem. Simulated and real-world data are used to construct the sequence datasets required for the experiment. An image dataset containing four structural variation types is encoded based on the simulated variation set and its sequence alignment data, and the dataset is divided into a training set, a validation set, and a simulated test set. An image dataset containing two variation types, INS and DEL, is encoded based on the real HG002 genome variation set and its sequence alignment data set, serving as the real test set. A deep learning multi-classification model is developed using a two-way CNN ensemble with an attention mechanism. The classification model is trained and validated using the training and validation sets. The trained deep learning classifier predicts the structural variation type of the four-channel images generated from the sequence alignment data. Based on the image variation type predictions and the cluster regions to which the encoded image segments belong, the cluster region coordinates are used as the breakpoint coordinates for the corresponding structural variation, enabling genomic structural variation detection.

[0026] Furthermore, a genome sequence-to-image encoding method was designed that takes both alignment and depth signals into account. A four-channel image was constructed, which contains sufficient information to help subsequent models distinguish different types of structural variations. In particular, this encoding method enhances the discrimination between INS and DUP variation images, helping to improve the overall variation detection performance of subsequent models.

[0027] Furthermore, building a genomic structural variation detection model based on deep learning methods requires high-quality variant annotation data for model training. Currently, publicly available structural variation datasets often only cover a limited range of structural variation types, and due to factors such as sequencing errors, the annotation data may be biased. Therefore, a simulation method was used to generate a high-quality variant dataset covering four types of structural variation and its alignment dataset for subsequent image encoding and model training. This ensures that the model can fully learn each variant type and ensures its applicability to multiple variant types.

[0028] Furthermore, considering that the current gold standard dataset for structural variation detection (HG002) only contains annotations for two variant types, DEL and INS, and that DEL and INS are indeed the two most widespread variant types in the genome, a test set for the model was constructed using both simulated and real data collection. The simulated test set was used to evaluate the model's performance on the four structural variation detection tasks, while the real test set was used to explore the model's generalization performance on real datasets containing INS and DEL variants. This enabled a more comprehensive evaluation of the model, assessing both its overall performance for detecting the four structural variation types and its performance for detecting the two most widespread structural variation types.

[0029] Furthermore, the alignment dataset used for model training was subjected to four-channel image encoding, and its corresponding variant dataset was used for image annotation to construct a labeled image dataset. A deep learning classification model was then constructed using supervised learning methods. This allowed the classification model to clearly identify its prediction targets during training, effectively learning the mapping relationship between features and labels. This training process enabled the model to maintain high generalization capabilities even when faced with unlabeled genomic sequence alignment data, allowing it to more accurately identify and predict multiple potential types of structural variation.

[0030] Furthermore, given that the first three channels of a four-channel image encode the contrast signal, while the fourth channel encodes a different depth signal, the distributions of the two signals differ somewhat. Therefore, two CNN models with an attention mechanism (CBAM module) are used to learn the characteristics of each signal, enabling better learning of each signal. The outputs of the two CNNs are then fused to further effectively combine the two signals, avoiding information loss and ultimately improving the overall detection of multiple variants. CNNs have a strong ability to learn local features, and the introduction of the attention mechanism enhances the model's focus on key features, thereby alleviating the limitations of convolutional networks in handling long-range dependencies and enhancing the performance of the classification model.

[0031] Furthermore, the focal loss function is used as the classification loss function to alleviate the class imbalance problem and the difficult sample classification problem. The smaller the value of the loss function, the smaller the prediction error of the deep learning classification model. During the training process, the present invention uses adaptive moment estimation and backpropagation algorithm to update and optimize the network parameters in the deep learning classification model, so that the focal loss function gradually decreases and eventually converges to a minimum value to obtain the final deep learning classification model.

[0032] Furthermore, the deep learning structural variation detection model trained on four-channel images encoded with sequencing data from the PacBio platform can be well extended to the ONT platform. This means that the proposed method can adapt to long-read sequencing data generated by the two most common third-generation sequencing platforms and has good generalization capabilities. This demonstrates that the proposed method has strong portability and robustness across different sequencing platforms, can effectively extract and utilize variant features in long-read sequences, and can perform structural variation detection tasks on multiple platforms, showing practical application value and promising prospects for promotion.

[0033] Furthermore, the proposed deep learning structural variation detection method based on four-channel images leverages deep learning's ability to mine information from large-scale data, compared to traditional structural variation detection methods. This method also incorporates richer information into the image encoding process. Results show that, without compromising the performance of detecting DEL and INV variants, the proposed method offers improved discrimination between INS and DUP variants, reduces false positive and false negative rates within variant clusters, and enables accurate and comprehensive detection of multiple structural variation types. Its performance for the two most widespread variant types, INS and DEL, is comparable to that of the best currently available methods.

[0034] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0035] In summary, the present invention achieves accurate and comprehensive detection of four structural variation types, DEL, INS, INV, and DUP, for long-read sequencing data generated by mainstream third-generation sequencing platforms. A novel four-channel image encoding method is used to encode sequence alignment signals and depth signals into images, making the images contain rich information. A deep learning multi-classification model, integrating a dual-channel CNN with an attention mechanism, is trained in a supervised manner to alleviate class imbalance in the data. The trained deep learning classification model can detect multiple structural variation types in PacBio and ONT sequencing data, with improved ability to distinguish INS and DUP variations and better overall detection performance.

[0036] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 This is a flow chart of a deep learning detection method for genome structural variation based on third-generation sequencing in an embodiment of the present invention; Figure 2 A flow chart constructed for the sequence data set used in the experiments of the present invention; Figure 3 Flowchart for simulating sequence data sets; Figure 4 Visualizations defined for the four types of structural variations that can be detected by the present invention; Figure 5 Schematic diagram of intra-read alignment and inter-read alignment for four types of structural variations that can be detected by the present invention; Figure 6 The following is a flowchart of four-channel image encoding of genome sequences (taking DEL mutation as an example); Figure 7 Flowchart for parsing alignment signals in sequence alignment data; Figure 8 Schematic diagram of a three-channel image encoding alignment signals for four types of structural variation; Figure 9 Schematic diagram of a four-channel image encoding the alignment and depth signals of four structural variation types (because four-channel images cannot be directly visualized, the alignment signal features of the first three channels and the depth signal features of the fourth channel are combined into a three-channel RGB image in a ratio of 7:3 for display); Figure 10 Schematic diagram of the CBAM module structure; Figure 11 This is the network framework diagram of the deep learning structural variation detection model Dual_CNN; Figure 12 This is a diagram showing the structural variation detection effects of the deep learning structural variation detection method proposed in the present invention and other methods on the simulated test set Sim-PacBio-Chr12; Figure 13 This is a graph showing the detection results of the deep learning structural variation detection method proposed in the present invention and other methods split by structural variation type on the simulated test set Sim-PacBio-Chr12; Figure 14 This is a diagram showing the structural variation detection effects of the deep learning structural variation detection method proposed in this invention and other methods on the real test set HG002-PacBio-Allchrs.

[0039] Figure 15 A schematic diagram of a computer device provided in accordance with an embodiment of the present invention; Figure 16 The present invention is a block diagram of an electronic device according to an embodiment of the present invention.

[0040] Among them, 60. Computer device; 61. Processor; 62. Memory; 63. Computer program; 600. Electronic device; 610. Processing unit; 620. Storage unit; 6201. Random access memory unit; 6202. Cache memory unit; 6203. Read-only memory unit; 6204. Program / Utility; 6205. Program module; 630. Bus; 640. Display unit; 650. Input / output interface; 660. Network adapter; 700. External device. DETAILED DESCRIPTION

[0041] The present invention provides a method for deep learning detection of genome structural variation based on third-generation sequencing. According to the comparison characteristics of various structural variations, a four-channel encoding method for genome sequence to image is designed; a high-quality sequence data set containing four types of structural variation is constructed by simulation, and a dual-channel convolutional neural network Dual_CNN with an attention mechanism is trained after image encoding to predict the type of structural variation. A new genome structural variation detection framework for third-generation sequencing technology is provided. The framework can adapt to the current mainstream third-generation sequencing data PacBio and ONT, and can detect four types of structural variation, DEL, INS, INV, and DUP, on the input sequence alignment data; at the same time, corresponding training parameters can be set for data generated by different sequencing technologies, and the prediction of structural variation types can be achieved through retraining. A deep learning classification model adapted to a specific sequencing platform is constructed to achieve customized optimization of the genomic structural variation detection method under specific technical conditions; the present invention can effectively achieve comprehensive and accurate detection of four types of structural variations in the genome, and its performance on the two most common variation types, INS and DEL, is comparable to that of the current best methods; compared with traditional structural variation detection methods, the present invention utilizes the information mining capabilities of deep learning in large-scale data and can cover a wider range of sequence alignment situations; compared with deep learning structural variation detection methods, the present invention introduces richer information in the image encoding process, and the introduction of the attention mechanism enhances the model's focus on key features, thereby alleviating to a certain extent the limitations of convolutional networks in processing long-distance dependencies and enhancing the performance of the model.

[0042] Example 1 See also Figure 1 , the present invention provides a deep learning detection method for structural variation of the genome based on third-generation sequencing, which uses simulated data and real data to construct a sequence data set containing a variation set and an alignment data set, extracts alignment and depth signals from the alignment data in the sequence data set, performs four-channel image encoding, and uses the corresponding variation set to annotate the image. The obtained image data set is used as a training set (containing four types of variation), a simulated test set (containing four types of variation), and a real test set (containing two types of variation, DEL and INS). The training set is used to train the deep learning structural variation detection model, and the simulated test set is used to test and evaluate the model, and the real test set is used to verify the application of the model. The deep learning structural variation detection model will infer the genomic structural variation type and breakpoint coordinate information of the input image, and then complete the structural variation detection of the sequence alignment data. Finally, a structural variation detection set is constructed to detect the four types of structural variations, DEL, INS, INV, and DUP, in the genome. The specific steps are as follows: S1. Please refer to Figure 2 , using simulated data and real data to construct the sequence data set in the experiment of the present invention; S101. Construct a sequence dataset for model training. Select four typical chromosomes from the human genome: chr1, chr2, chr17, and chrx. Simulate a variant set carrying four types of structural variations: insertions (INS), deletions (DELs), inversions (INVs), and duplications (DUPs). The variant genomes and their long-read sequencing data are then aligned to generate aligned data.

[0043] See also Figure 3Simulate the variant dataset and its alignment data. Based on the data volume and the sequence characteristics of the chromosomes, four representative chromosomes, chr1, chr2, chr17, and chrx, were selected to construct a simulated training dataset. First, reference sequences for chromosomes chr1, chr2, chr17, and chrx were extracted from the GRCh38 reference genome using samtools. Using VISOR HACk, 500, 500, 300, and 300 structural variants were simulated on these four chromosome reference sequences, respectively. Four structural variants, INS, DEL, INV, and DUP, were randomly implanted into each chromosome at a ratio of 35:35:10:20, resulting in the variant genome sim_4chrs.GRCh38.fa. The position and type of the implanted structural variants were retained in the simulated variant set sim_4chrs.GRCh38.sv.bed. To depict the true distribution of various structural variants on chromosomes, INS and DEL were assigned a higher proportion. The variant genome was used as the input of the VISOR_LASoR module to simulate 30x PacBio HiFi long-read sequencing data. After alignment and sorting with minimap2, the sequence alignment data sim_4chrs.GRCh38.pacbio.bam was obtained, which was subsequently used to construct the training set.

[0044] S102. Construct a sequence dataset for model testing. Select chromosome chr12 from the human genome and, using the same simulation tools and simulation scale as in step S101, obtain a simulated variant set carrying four types of structural variation and its alignment data for constructing the simulated test set. Download the alignment data for the HG002 sample provided by the Genome in a Bottle Project (GIAB), along with its full-genome true variant set (containing only records of DEL and INS variants) and variant region set. HG002 is a widely recognized benchmark dataset for structural variation detection and will be used to construct the true test set.

[0045] S1021. Using the same simulation process as step S101, 409 structural variants were simulated in chr12, including 121 DEL variants, 146 INS variants, 70 INV variants, and 72 DUP variants. Because INS and DEL variants are more prevalent in the genome, they were given a higher weight in the simulation to reflect the actual genome. The simulated alignment data, sim_chr12.GRCh38.pacbio.bam, and the simulated variant set, sim_chr12.GRCh38.sv.bed, were obtained and subsequently used to construct the simulated test set.

[0046] S1022. To study the generalization ability of the model on real datasets, download the PacBio HiFi sequencing data HG002.hs37d5.pacbio.bam of the HG002 sample with the reference genome version hs37d5 provided by the Genome in a Bottle Project (GIAB), as well as the real variant set of the whole genome (containing only records of the two variant types, DEL and INS). HG002_SVs_Tier1_v0.6.vcf.gz and the set of variant regions HG002_SVs_Tier1_v0.6.bed , which was subsequently used to construct a real test set. The GIAB project provided high-confidence INS and DEL variant detection results for the HG002 sample. It is a widely recognized benchmark test dataset in the field of structural variation detection. Generated using a variety of sequencing technologies and bioinformatics methods, and validated by multiple independent experiments, its accuracy and reliability are ensured. Table 1 shows an overview of the sequence dataset constructed by this invention.

[0047] Table 1 Overview of sequence datasets

[0048] S2. According to Figure 4 Definition and application of various structural variations Figure 5 The alignment characteristics of various structural variations are analyzed, and intra-read alignment, inter-read alignment, and depth signals are extracted from the alignment data of long-read sequences generated by third-generation sequencing technology, and reference is made to Figure 6 The process shown encodes the sequence alignment data into a four-channel image of 224×224×4; S201, please refer to Figure 7 , extract the alignment signal from the alignment data, collect the sequence fragments with abnormal alignment, called variant feature fragments, and their aligned sequence fragments on the reference genome. The specific steps are as follows: S2011. First filter out the read sequences that are not aligned, have low alignment quality, and have more than 4 supplementary alignments in the alignment data to ensure data quality.

[0049] S2012. Next, traverse each read, obtain its main alignment and supplementary alignment list, perform inter-read alignment analysis and intra-read alignment analysis, identify structural variations and alignment fragments on both sides. In the inter-read alignment analysis, extract the alignment records in the current read that are in the same direction as the main alignment, and sort them according to their coordinates on the read. The first and last alignment sequences on the read are defined as the main fragments. , and define the alignment sequences that are in the opposite direction or overlap with the primary alignment on a large scale as secondary fragments .

[0050] S2013. Main fragments obtained in step S2012 The length is long and may contain signals of INS and DEL mutations. The fragments are further split through intra-read alignment analysis. According to the CIGAR field of the main fragment, the sequences on both sides of the characters 'I' and 'D' are extracted, and the fragments on both sides of SV are further collected to obtain the new main fragment. During the entire process, the fragments are linked, extended, and trimmed based on the linear relationship between adjacent fragments to obtain a series of characteristic fragments around the structural variation breakpoint. The linear relationship between fragments is calculated according to the following formula:

[0051]

[0052]

[0053] Where, Represent two feature fragments respectively, Indicates the starting coordinate of the fragment on the sequencing read, Indicates the end coordinate of the fragment on the sequencing read, Indicates the starting coordinates of the fragment on the reference sequence, Indicates the end coordinate of the fragment on the reference sequence, Indicates the length of the segment.

[0054] S202: Given that a read alignment may cover multiple structural variants, it is necessary to identify characteristic fragments pointing to a single variant, extract the fragment combinations pointing to a single variant event, and aggregate the fragment combinations pointing to the same variant event across multiple reads through clustering operations to predict the breakpoint coordinates of the structural variant. The specific process is as follows: S2021, combining the primary fragment and its adjacent primary fragments on each read in step S201, as well as the secondary fragments located between them on the read, to obtain a fragment set on a single read, and determining the leftmost and rightmost coordinates of all fragments in the set on the reference genome; S2022. Based on the coordinate position information of different fragment sets, hierarchical clustering is performed on the variation features carried by the fragment sets. A cluster of fragment sets supporting the same structural variation event is obtained through clustering. The signals of the same structural variation captured by multiple reads are combined to generate a cluster region coordinate [ , ].

[0055] S2023, combining every two adjacent fragments located on the same Read in the above clustered fragment set The position, direction, length and other information of the segments are written into a text file named chr_name.segments.bed, and the combination of two minor segments or adjacent segments with collinearity is eliminated. The remaining segment pair combinations contain only the characteristics of a single mutation event and will be used to construct the first three channels of the image; the cluster area of the cluster to which the segment combination belongs is divided into Information is also written to the file, starting at and end site This will be used as an estimate of the breakpoint coordinates corresponding to the structural variation event.

[0056] Table 2 shows the key structure of the segment feature file chr_name.segments.bed, where the first column Indicates the cluster area to which the fragment of the current record row belongs. The relevant columns represent the properties of fragment 1, The relevant columns represent the properties of fragment 2. Indicates the starting coordinates of segment 1 on Read, Indicates the end coordinate of segment 1 on Read, Indicates the starting coordinate of fragment 1 on the reference sequence Ref, Indicates the ending coordinates of fragment 1 on Ref, Indicates the direction of segment 1. Indicates the total length of the two segments in the current record line spanned by Read. It indicates the total length of the two segments in the current record line spanned on Ref. ref_start indicates the total length of the two segments in the current record line spanned on Ref. The starting coordinate position of the span on Ref, ref_start represents the two fragments in the current record line The ending coordinate site spanned on Ref.

[0057] Table 2. Structure of the fragment feature file

[0058] S203, combining based on feature fragments The position, direction, length and other information of the segment extracted from the chr_name.segments.bed file pointing to a single mutation event are encoded into a 224×224×3 three-channel RGB image. The axis represents the Read sequence, The axis represents the corresponding reference genome sequence Ref. Specifically, the encoding settings for each channel are as follows: (1) The first channel encodes the read sequence fragments that can be linearly aligned with the reference genome, which can be used as important information for identifying INS and DEL mutations and is represented by blue (255, 0, 0); (2) Second channel: Encodes the repeated fragments that are aligned to the same reference genome sequence as the fragments in the first channel, which can be used as important information for identifying DUP mutations. Axis, will Sites with more than one value on the axis are marked as duplicate sites, which are encoded in both the first and second channels and represented by cyan (255, 255, 0); (3) The third channel encodes the read sequence fragments that are reverse aligned with the reference genome, which can serve as important information for identifying INV variants. The reverse fragments are encoded in both the first and third channels, and are represented by purple (255, 0, 255). If the reverse fragments are also aligned to the same reference genome region as other fragments, they are encoded in all three channels simultaneously, and are ultimately displayed as white (255, 255, 255).

[0059] The specific process of encoding a three-channel image is as follows: S2031. Traverse each row of the chr_name.segments.bed file. For each record, initialize a three-channel matrix of size 224×224×3 and set the initial values of all elements to zero (black).

[0060] S2032. Read the attributes of a pair of adjacent segments from the current record and perform the following processing on each segment: If the segment direction If it is positive (value is TRUE), then in the first channel of the image, a line is drawn from the starting position and ending position of the fragment on Read and Ref. arrive The white straight line (i.e., the corresponding pixel value is set to 255), where , which represents the number of bases represented by each pixel site in the image, is the scaling ratio of mapping the coordinates of the fragment sequence in the genome to the image pixel coordinates; if the fragment direction If it is reverse (the value is FALSE), you need to draw a line from the first channel to the third channel respectively. arrive white straight line.

[0061] S2033. After the fragment drawing is completed, the first channel is scanned column by column: if there are two or more non-zero pixels in a column (indicating that the column contains multiple overlapping fragments), the positions of these pixels are set to 255 (white) in the second channel to mark the parts where the two fragments are aligned to the same reference genome region.

[0062] S2034. The final generated matrix is the encoded three-channel image, which integrates the alignment position, alignment direction, and overlapping information between the fragments to form a visual expression of the structural variation alignment signal.

[0063] Figure 8 Three-channel encoded images of four types of structural variations are shown.

[0064] S204: Introduce the depth signal into the three-channel image encoded by the current comparison signal to provide additional information to distinguish Figure 8 The similar INS and DUP images shown in the figure improve the performance of subsequent model classification. Specifically, the process of deep channel encoding is as follows: S2041, extract the encoded three-channel image from the chr_name.segments.bed file generated in step S2023 The starting and ending coordinates of the axis, that is, the starting site of the reference genome and reference genome end sites ; S2042, with the widely used bioinformatics tool samtools, use the command " "From the comparison file Extract Chromosomes in the specified region [ , ] to get a depth list arranged by base position. ; S2043. Since the range of the genomic region may far exceed the size of the image (224), the depth list is divided into 224 consecutive segments ( ), each segment covers as close a number of base sites as possible (because the interval length may not be divisible by 224, the segment width may vary slightly). Calculate the average value of the depth value in each segment to obtain a list of length 224 , used to represent the average comparison depth corresponding to each column of pixels in the image; S2044. Subsequently, in order to simulate the local fluctuation of sequencing depth in the real sequencing process, Apply 5×5 Gaussian filter GaussianBlur for smoothing, and get Gaussian filtering is a commonly used image processing technique that can smooth data by weighted averaging of adjacent regions, reducing the impact of mutations and noise on subsequent analysis and making the extracted depth features more stable and representative.

[0065] S2045, then Normalized to the pixel grayscale range of [0,255], we get , where index The corresponding value represents the The value of the column pixel; S2046. Finally, the grayscale channel representing the depth signal is merged with the RGB three-channel image generated by the comparison signal in step S203 in the channel dimension to construct a four-channel image with a size of 224×224×4, which serves as the final input image of the subsequent deep learning structural variation detection model.

[0066] Figure 9 Four-channel encoded images showing four types of structural variations. Figure 8 and Figure 9 In the images of INS and DUP mutations, it can be found that the three-channel image that only encodes the comparison signal has some similarities between the INS and DUP images and cannot be distinguished. However, the four-channel image that introduces the depth signal into the image background improves the distinction between the INS and DUP images, which is conducive to better learning and recognition of the mutation detection model.

[0067] S205: Following the steps described in step S2, alignment and deep signal extraction are performed on the alignment data in the sequence dataset constructed in step S1, and the images are encoded into four-channel images. Structural variation types are labeled on the four-channel images based on the variation set in the sequence dataset constructed in step S1. The resulting image datasets serve as the training set, validation set, simulated test set, and real test set for the structural variation detection model. This converts the variation detection problem into an image multi-classification problem, facilitating the subsequent development of a deep learning variation detection model.

[0068] S2051: Perform alignment and depth signal extraction on the alignment data sim_4chrs.GRCh38.pacbio.bam simulated in step S1011, and encode it into a four-channel image. Subsequently, traverse the simulated structural variation set sim_4chrs.GRCh38.sv.bed and the segment feature set sim_4chrs.chr_name.segments.bed, and use the variation type corresponding to the simulated variation region with the largest intersection with the cluster region where the segment is located as the label for the image generated by the current segment, thereby obtaining the supervised image dataset Sim-PacBio-4chrs.

[0069] S2052. Because a single structural variant has multiple encoded images, to avoid information leakage during subsequent model training, the training and validation sets were divided based on the level of structural variation. Specifically, the records in the simulated variation set sim_4chrs.GRCh38.sv.bed were randomly divided into the training structural variation set sim_4chrs.GRCh38.sv.train.bed and the validation structural variation set sim_4chrs.GRCh38.sv.valid.bed in a ratio of 8:2. The four-channel images encoded by the alignment fragment features extracted from the structural variants in sim_4chrs.GRCh38.sv.train.bed served as the training dataset, and the encoded images corresponding to the structural variants in sim_4chrs.GRCh38.sv.valid.bed served as the validation dataset. This resulted in a training set Sim-PacBio-4chrs-Train with a sample size of 34,765 and a validation set Sim-PacBio-4chrs-Valid with a sample size of 8,691.

[0070] S2053: Following the process described in step 2051, perform four-channel image encoding and annotation on the alignment data set sim_chr12.GRCh38.pacbio.bam and the simulated variant set sim_chr12.GRCh38.sv.bed simulated in step S1021. The resulting image data serves as the simulated test set Sim-PacBio-Chr12. This simulated test set is used to evaluate the model's performance on the four structural variation detection tasks. S2054, according to the process described in step 2051, the HG002 alignment data HG002.hs37d5.pacbio.bam downloaded in step S1022 and the true variant set of the whole genome HG002_SVs_Tier1_v0.6.vcf.gz Four-channel image encoding and annotation were performed, and the resulting image data was used as the real test set HG002-PacBio-Allchrs. This real test set was used to practice and explore the generalization performance of the model for structural variation detection on real datasets including INS and DEL.

[0071] Table 3 shows an overview of the image dataset encoded based on the sequence dataset of the present invention.

[0072] Table 3 Overview of image datasets after sequence dataset encoding

[0073] S3. Build a multi-classification deep learning classification model with a dual-path convolutional neural network (CNN) ensemble and an attention mechanism. Use the training set and validation set obtained in step S205 to train and validate the model. Use the two test sets obtained in step S205 to test the model. Compare the model with other methods to obtain a trained deep learning structural variation classification model. S301. Considering the distribution difference of the two signals, a convolutional neural network is constructed for extracting the comparison signal features of the first three channel encodings in the four-channel image, and a convolutional neural network is constructed for extracting the depth signal features of the fourth channel encoding. The two networks are integrated to obtain an integrated network named Dual_CNN. A CBAM module is also introduced into each convolutional neural network to perform channel attention and spatial attention calculations to enhance the network's perception of important features. The structure of the CBAM module is as follows: Figure 10 As shown, the network framework of the integrated network Dual_CNN is as follows Figure 11 As shown; S302: Flatten the features obtained by the structural variation image classification model constructed in step S301 into one dimension, and then output a 1×4-dimensional probability distribution vector after passing through a fully connected layer and a Softmax activation function. This fully connected layer is also called a classification head, which represents the predicted probability distribution of the variation type of the structural variation image classification task; S303, using the training dataset Sim-PacBio-4chrs constructed in step S2052, the parameters of the structural variation image classification model are updated through adaptive moment estimation and back propagation algorithm optimization to perform model training. The hyperparameter settings during the training process are shown in Table 4. The focal loss function used in the optimization process is for:

[0074] in, is the category weight coefficient, which is used to adjust the importance of different categories. Its value range is usually between [0,1]. is the regulating factor, is the focusing parameter that controls the loss attenuation of easy-to-classify samples. When , Focal Loss degenerates into standard cross entropy loss.

[0075] Table 4. List of hyperparameters for the Dual_CNN model training process

[0076] S304. The deep learning classification model trained in step S303 is tested on the simulated test set Sim-PacBio-chr12 obtained in step S2053 and applied to the real test set HG002-PacBio-allchrs obtained in step S2054. The performance of the deep learning structural variation detection model will be evaluated using the precision, recall, and F1-score metrics.

[0077] S4. The trained deep learning classification model is used to predict the structural variation type of the encoded images from the genome sequence. The category prediction result of each image is a 1×4-dimensional probability distribution vector, which represents the predicted probabilities of DEL, INS, INV and DUP variation respectively. The maximum probability prediction result is selected as its structural variation type to realize the structural variation type prediction of the genome.

[0078] S5. Based on the structural variation type prediction results obtained in step S4, combined with the information about the cluster region to which the corresponding fragment belongs during image encoding, the coordinates of the cluster region are used as the breakpoint coordinates of the corresponding structural variation. Subsequently, the coordinates of the variants are sorted row by row according to the order of their coordinates on the chromosome to construct a final structural variation set, completing the structural variation detection of the genome. Finally, the detection results are comprehensively evaluated using the structural variation set evaluation tool to comprehensively measure the model's performance in the structural variation detection task.

[0079] S501. In step S2, a chr_name.segments.bed file containing characteristic segments and their clustering region information is generated. Subsequently, four-channel image encoding is performed based on the segment information in this file and input into the deep learning classification model trained in step S3 to obtain the corresponding structural variation type prediction result. At the same time, the clustering region coordinates of the segment corresponding to the image encoding in the chr_name.segments.bed file are [ ] as the breakpoint coordinate prediction of the structural variation.

[0080] S502: Integrate the structural variant types and breakpoint information according to the order of the chromosomes where the structural variants are located and their breakpoint coordinates to construct a final structural variant set, completing structural variant detection. The detected structural variant set is evaluated on two test sets and compared with other methods.

[0081] S5021. After completing the structural variation type prediction of the simulation test set Sim-PacBio-Chr12, the variation set sim-pacbio-chr12.call.vcf is generated by combining the cluster region information. The Truvari structural variation evaluation tool is used to evaluate the detected variation set and calculate the evaluation index. The detection results of the method of the present invention are compared with the detection results of the existing Sniffles, SVIM, cuteSV and SVision methods to comprehensively judge the performance advantages and effects of the present invention in the structural variation detection task. The results are as follows. Figure 12 As shown in the figure, the deep learning structural variation detection method proposed in this invention has better overall detection effect on the four types of structural variations than other methods; Figure 13 The detection results split by structural variation type are also presented, and the results show that the method proposed in this invention can better achieve DUP variation detection; S5022. After completing the structural variation type prediction of the simulation test set HG002-PacBio-Allchrs, the variation set HG002-pacbio-allchrs.call.vcf was generated by combining the clustering region information. Truvari was also used to evaluate it and compared with other methods. The results are as follows: Figure 14 As shown in the figure, the deep learning structural variation detection method proposed in the present invention has a detection effect close to that of the current optimal method on the two most common types of structural variations DEL and INS.

[0082] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Accordingly, various aspects of the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as "circuits," "modules," or "platforms."

[0083] Example 2 The present invention provides a deep learning detection system for genome structural variation based on third-generation sequencing. The system can be used to implement the above-mentioned deep learning detection method for genome structural variation based on third-generation sequencing. Specifically, the deep learning detection system for genome structural variation based on third-generation sequencing includes a data module, a training module, a prediction module and a detection module.

[0084] The data module performs four-channel image encoding and annotation on the simulated variation set containing insertions, deletions, inversions, and repeat structural variations and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset, respectively, to obtain the encoded image dataset; The training module uses the obtained image dataset to train a deep learning structural variation classification model using a dual-path convolutional neural network ensemble with an attention mechanism; The prediction module uses the trained deep learning structural variation classification model to predict the structural variation type of the encoded image from the genome, and uses the maximum probability prediction result as the structural variation type to achieve the structural variation type prediction of the genome; The detection module uses the obtained structural variation type prediction results, combined with the cluster area to which the encoded image fragment belongs, and uses the cluster area coordinates as the breakpoint coordinate prediction results of the corresponding structural variation. The final structural variation set is constructed in coordinate order to realize structural variation detection of the genome.

[0085] Example 3 The present invention provides a terminal device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the deep learning detection method for genome structural variation based on third-generation sequencing, including: Four-channel image encoding and annotation were performed on the simulated variation set containing insertions, deletions, inversions and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset to obtain the encoded image dataset; the obtained image dataset was used to train a deep learning structural variation classification model integrated with a two-way convolutional neural network with an attention mechanism; the trained deep learning structural variation classification model was used to predict the structural variation type of the encoded image from the genome, and the maximum probability prediction result was used as the structural variation type to achieve the structural variation type prediction of the genome; the obtained structural variation type prediction result was used, combined with the cluster area to which the encoded image fragment belonged, and the cluster area coordinates were used as the prediction result of the corresponding structural variation breakpoint coordinates to achieve structural variation detection in the genome.

[0086] See also Figure 15 The terminal device is a computer device. The computer device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the computer program 63 is executed by the processor 61, the method for detecting genomic structural variations based on deep learning in the third-generation sequencing embodiment is implemented. To avoid repetition, the details are not described here. Alternatively, when the computer program 63 is executed by the processor 61, the functions of each model / unit in the system for detecting genomic structural variations based on deep learning in the third-generation sequencing embodiment are implemented. To avoid repetition, the details are not described here.

[0087] The computer device 60 may be a desktop computer, a notebook computer, a PDA, a cloud server, or other computing devices. The computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 15 This is merely an example of the computer device 60 and does not constitute a limitation of the computer device 60 . The computer device 60 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0088] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, a graphics processing unit (GPU), a tensor processing unit (TPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0089] The memory 62 may be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 60.

[0090] Furthermore, the memory 62 may include both an internal storage unit of the computer device 60 and an external storage device. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 may also be used to temporarily store data that has been output or is about to be output.

[0091] See also Figure 16 The terminal device is an electronic device 600, which is implemented as a general-purpose computing device. The components of the electronic device may include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), and a display unit 640.

[0092] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .

[0093] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0094] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0095] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0096] The electronic device 600 may also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem). Such communication may occur via an input / output interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network, a wide area network, and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0097] Example 4 The present invention also provides a storage medium, specifically a computer-readable storage medium. The 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 herein may include both the built-in storage medium in the terminal device and, of course, the extended storage medium supported by the terminal device. It may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by a processor. These instructions may be one or more computer programs (including program code). It should be noted that more specific examples of the computer-readable storage medium herein include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0098] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, which carry readable program code. Such propagated data signals can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than a readable storage medium, which can send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency, etc., or any suitable combination of the above.

[0099] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network or a wide area network, or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0100] The processor may load and execute one or more instructions stored in a computer-readable storage medium to implement the corresponding steps of the method for deep learning detection of genomic structural variation based on third-generation sequencing in the above embodiment; the processor may load and execute the following steps: Four-channel image encoding and annotation were performed on the simulated variation set containing insertions, deletions, inversions and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset to obtain the encoded image dataset; the obtained image dataset was used to train a deep learning structural variation classification model integrated with a two-way convolutional neural network with an attention mechanism; the trained deep learning structural variation classification model was used to predict the structural variation type of the encoded image from the genome, and the maximum probability prediction result was used as the structural variation type to achieve the structural variation type prediction of the genome; the obtained structural variation type prediction result was used, combined with the cluster area to which the encoded image fragment belonged, and the cluster area coordinates were used as the prediction result of the corresponding structural variation breakpoint coordinates to achieve structural variation detection in the genome.

[0101] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0102] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0103] Compared to traditional structural variation detection methods, the proposed deep learning structural variation detection method based on four-channel images leverages deep learning's ability to mine information from large datasets. This method also incorporates richer information into the image encoding process. Test data set results demonstrate that the proposed method offers superior discrimination between INS and DUP variants, without sacrificing performance for DEL and INV variant detection. It can accurately and comprehensively detect all four structural variation types. Furthermore, its performance for INS and DEL, the two most common variant types, is comparable to that of the best currently available methods.

[0104] In summary, the present invention provides a method and system for deep learning detection of structural variation in genomes based on third-generation sequencing. A sequence data set is constructed using simulated data and real data, and an image encoding method for the biological sequence generated by the third-generation sequencing platform is set. A four-channel image data set is obtained based on the alignment data encoding in the sequence data set, and the image data set is divided into a training set, a validation set, a simulated test set, and a real test set. A deep learning classification model with a dual-path CNN integration with an attention mechanism is constructed, and the model is trained and validated using the training set and validation set, the model is tested and comparatively evaluated using the simulated test set, and the structural variation detection practice and comparative evaluation of the real data set are performed using the real test set. Based on the trained deep learning classification model, the structural variation type of the four-channel image encoded by the sequence alignment data is predicted; the maximum probability prediction result output by the model is used as the structural variation type prediction result of the current four-channel image; the clustering region coordinates of the fragment used when encoding the four-channel image are used as the breakpoint coordinate prediction result of the corresponding structural variation; the type of structural variation and the breakpoint coordinate prediction information are integrated to construct a final structural variation set, thereby achieving comprehensive detection of the four types of structural variations in the genome. Through the above process, a complete link from alignment data to structural variation type and breakpoint coordinate detection was established, realizing automatic detection of genomic structural variations with stable and excellent performance.

[0105] The above content is only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A deep learning detection method for genome structural variation based on third-generation sequencing, characterized by: The following steps are involved: Four-channel image encoding and annotation were performed on the simulated variation set containing insertions, deletions, inversions and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset, respectively, to obtain the encoded image dataset; Use the obtained image dataset to train a deep learning structural variation classification model using a two-way convolutional neural network ensemble with an attention mechanism; Use the trained deep learning structural variation classification model to predict the structural variation type of the encoded image from the genome, and use the maximum probability prediction result as the structural variation type to achieve the structural variation type prediction of the genome; The obtained structural variation type prediction results are used in combination with the cluster region to which the fragment of the encoded image belongs. The cluster region coordinates are used as the breakpoint coordinate prediction results of the corresponding structural variation. The final structural variation set is constructed in coordinate order to realize structural variation detection of the genome.

2. The method for detecting structural variation of genomes based on third-generation sequencing in depth learning according to claim 1, characterized in that: The encoded image dataset includes a training set, a simulated test set, and a real test set, as follows: Chromosomes chr1, chr2, chr17, and chrx in the human genome were selected to simulate variant sets carrying insertions, deletions, inversions, and duplications, variant genomes, and their long-read sequencing data. The long-read sequencing data were aligned to obtain alignment data for constructing a training set, which was then divided into a training subset and a validation subset based on the level of structural variation. Chromosome chr12 in the human genome was selected to obtain a simulated variant set carrying insertions, deletions, inversions, and duplications, along with their alignment data, to construct a simulated test set. Download the HG002 sample alignment data and its whole-genome true variant set and variant region set. The whole-genome true variant set only contains records of two types of variants: DEL and INS. HG002 is a widely recognized benchmark test dataset in the field of structural variation detection and is used to construct a real test set.

3. The method for detecting structural variation of genomes based on third-generation sequencing in depth learning according to claim 2, characterized in that: The construction of the simulation test set is as follows: Reference sequences for chromosomes chr1, chr2, chr17, and chrx were extracted from the GRCh38 reference genome. A total of 500, 500, 300, and 300 structural variants were simulated on the chr1, chr2, chr17, and chrx reference sequences, respectively. Insertions, deletions, inversions, and duplications were randomly introduced into each chromosome at a ratio of 35:35:10:20 to generate the variant genome sim.fa. The positional information of the variants was recorded in the simulated variant set sim_sv.bed. The variant genome was then used as input to simulate 30× depth PacBioHiFi long-read sequencing data. After alignment and sorting with minimap2, the alignment data sim.srt.bam was obtained.

4. The method for detecting structural variation of genomes based on third-generation sequencing in-depth learning according to claim 2, characterized in that: The four-channel image encoding and annotation are as follows: Collect abnormally aligned sequence fragments from the alignment data as variant feature fragments, and their aligned sequence fragments on the reference genome to extract alignment signals; Identify and extract the fragment combinations pointing to a single mutation event, write the coordinates, direction, and length information of the two adjacent fragments in the cluster to a file named chr_name.segments.bed in the Read and Ref respectively, and write the cluster region information in the file; A three-channel RGB image is used to encode the two variant feature segments and the corresponding reference sequence recorded in each line of the chr_name.segments.bed file, and a three-channel image with a size of 224×224×3 is obtained. The axis represents the reference genome sequence, The axis represents the sequencing read sequence; According to the three-channel image The reference genome regions represented by the axes [ , ], get Compare the files chromosome arrive List of alignment depths for each base position in the range ; will compare the depth list Divide into multiple bins , calculate each bin The average value of the result is a list with a length of the number of pixels ; Then the list g is smoothed to obtain List, finally normalized get List, the The element value corresponding to the index As the fourth channel The values of the column pixels are taken to realize the depth signal extraction and complete the construction of the fourth channel image, which is superimposed with the three-channel image to obtain the four-channel image; The simulated alignment data and HG002 alignment data were aligned, depth signals were extracted, and encoded into four-channel images. Subsequently, the variant set corresponding to the alignment data and its segment feature file chr_name.segments.bed were traversed, and the variant type corresponding to the variant region with the largest intersection with the cluster region where the segment in the current record row is located was used as the image label generated by the current segment. This resulted in the training image dataset Sim-PacBio-4chrs, the simulated test image dataset Sim-PacBio-Chr12, and the real test image dataset HG002-PacBio-Allchrs.

5. The method for detecting structural variation of genomes based on third-generation sequencing in depth learning according to claim 4, characterized in that: Collect abnormally aligned sequence fragments from the alignment data as variant feature fragments and their aligned sequence fragments on the reference genome, specifically: Extract alignment fragments around structural variations from inter-read alignments and intra-read alignments, define primary and secondary fragments, traverse each read, filter out unaligned reads with MAPQ < 10, and then traverse the alignment object lists of the filtered reads to obtain the primary and supplementary alignment lists of the current read; Filter reads with more than 4 supplementary alignments, traverse the alignment list of the filtered reads, record the alignments in the same direction as the primary alignment, and sort them according to their coordinates on the read. Define the first and last alignments in the same direction after sorting as the primary fragments, and based on the positional overlap between other alignments and these two primary fragments, define the alignments with an overlap greater than or equal to 0.8 as secondary fragments; Analyze the CIGAR field of the primary fragment, identify records containing D and I characters and whose length is greater than the minimum structural variation length, extract the sequence fragments before and after the two characters as the new primary fragment, and complete the identification of all primary and secondary fragments of the current read.

6. The method for detecting structural variation of genomes based on third-generation sequencing in depth learning according to claim 4, characterized in that: A three-channel RGB image is used to encode the two variant feature segments and the corresponding reference sequence recorded in each line of the chr_name.segments.bed file, specifically: Traverse each row of the chr_name.segments.bed file, and for each record, initialize a three-channel image matrix of size 224×224×3, and set the initial values of all elements to zero; Extract information about a pair of adjacent segments from the current record and process each segment as follows: If the fragment direction is positive, in the first channel of the image, draw a white straight line according to its starting position and ending position, that is, set the value of the corresponding pixel site to 255, and the direction is from the starting point to the end point; If the direction of the segment is reversed, a white straight line is drawn from the end point to the starting point in the first and third channels of the image to clearly distinguish the directionality; After the fragments are drawn, the first channel is scanned column by column. If there are two or more non-zero pixels in a column, the corresponding pixel position is set to 255 in the second channel to mark the part where the two fragments are repeatedly aligned to the reference genome region; The generated image matrix is used as the encoded three-channel image, which integrates the alignment position, alignment direction, and overlapping information between fragments to form a visual expression of the structural variation alignment signal.

7. The method for detecting structural variation of genomes based on deep learning based on third-generation sequencing according to claim 1, characterized in that: The obtained image dataset is used to train a deep learning structural variation classification model using a dual-path convolutional neural network ensemble with an attention mechanism. Specifically: Build a deep learning structural variation classification model based on a dual-path convolutional neural network integration of four-channel images and attention mechanism; The features obtained by the constructed deep learning structural variation classification model are flattened into one dimension, and then output as a 1×4 dimensional probability distribution vector after passing through a fully connected layer and a Softmax activation function; Using focal loss function , using the training set Sim-PacBio-4chrs, the parameters of the deep learning structural variation classification model were optimized and updated through adaptive moment estimation and backpropagation algorithm to perform model training; Focal loss function for: in, For category The weight coefficient of is the regulating factor, is the focusing parameter, is the total number of categories, is the true label of the image in indicator function on the class, Indicates the model The predicted probability of the class.

8. The method for detecting structural variation of genomes based on deep learning based on third-generation sequencing according to claim 1, characterized in that: The trained deep learning structural variation classification model is used to predict the structural variation type of the encoded image from the genome, specifically: Extract the alignment and depth signals from the alignment data and encode them into a 224×224×4 tensor; Use the trained deep learning structural variation classification model to predict the encoded tensor and obtain a 1×4 probability distribution result; The predicted 1×4 probability vectors represent the probabilities of insertion, deletion, inversion, and duplication mutations, respectively. The type with the highest probability value is taken as the structural variation type prediction result of the input image.

9. The method for detecting structural variation of genomes based on third-generation sequencing in depth learning according to claim 1, characterized in that: The specific detection of structural variations in the genome is: The segment information in the chr_name.segments.bed file is encoded into a four-channel image. The trained deep learning structural variation classification model is used to predict the encoded four-channel image encoding to obtain the structural variation type. The cluster region coordinates of the segment used for image encoding in the chr_name.segments.bed file are then used as the breakpoint coordinates of the structural variation. According to the chromosome where the variation is located and its breakpoint coordinates, the final structural variation set containing the structural variation type and breakpoint coordinates is constructed in sequence to realize structural variation detection of the genome.

10. A deep learning detection system for genome structural variation based on third-generation sequencing, characterized in that: include: The data module performs four-channel image encoding and annotation on the simulated variation set containing insertions, deletions, inversions, and duplications and its alignment dataset, and the whole genome real variation set of the real genome HG002 and its alignment dataset, respectively, to obtain the encoded image dataset; The training module uses the obtained image dataset to train a deep learning structural variation classification model using a dual-path convolutional neural network ensemble with an attention mechanism; The prediction module uses the trained deep learning structural variation classification model to predict the structural variation type of the encoded image from the genome, and uses the maximum probability prediction result as the structural variation type to achieve the structural variation type prediction of the genome; The detection module uses the obtained structural variation type prediction results, combined with the cluster area to which the encoded image fragment belongs, and uses the cluster area coordinates as the breakpoint coordinate prediction results of the corresponding structural variation. The final structural variation set is constructed in coordinate order to realize structural variation detection of the genome.