A deep learning-based sv detection method
Patent Information
- Application Number
- CN202511522841.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing SV detection methods have high false alarm rates in complex regions and noisy data, lack automatic feature learning capabilities, have high computational costs, limited type recognition, and are highly dependent on the training set.
A hybrid deep learning model integrating convolutional neural networks, bidirectional long short-term memory networks, and multi-head attention mechanisms is adopted. Combined with three-stage clustering and multi-level quality control, it automatically learns the structural variation features in the genome sequence through end-to-end training for accurate detection.
It achieves high-precision detection and breakpoint localization for five SV types: DEL, INS, INV, DUP, and TRA, improving the robustness and generalization of detection, reducing the false positive rate, and is applicable to various sequencing data platforms.
Smart Images

Figure CN121331225B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bioinformatics technology, and in particular to a deep learning-based method for SV detection. Background Technology
[0002] Existing SV detection methods can be divided into heuristic methods based on alignment features (such as cuteSV, Sniffles, SVIM, etc.) and deep learning-based methods (such as SVision, BreakNet, MAMnet, Cue, SVHunter, etc.). While heuristic methods based on alignment features can detect SVs quickly, they suffer from high false alarm rates in complex regions and noisy data, and lack automatic feature learning capabilities. Deep learning-based methods, on the other hand, possess strong feature representation capabilities, but generally suffer from high computational costs, limited type recognition, and strong dependence on training sets.
[0003] Therefore, it is necessary to develop a deep learning-based SV detection method to solve the above problems. Summary of the Invention
[0004] The purpose of this invention is to design a deep learning-based SV detection method to solve the above problems.
[0005] The present invention achieves the above objectives through the following technical solutions:
[0006] A deep learning-based SV detection method includes the following steps:
[0007] S1. Data Input and Feature Extraction: Using the BAM file generated from third-generation long-read sequencing data as input, candidate SV signals are extracted by parsing the CIGAR string and SA tag. The SV signals include insertion, deletion, inversion, duplication, and translocation. At the same time, soft splicing, hard splicing, and segmentation alignment information features are combined to construct a multi-channel feature matrix. The feature matrix is statistically analyzed in a windowed manner. The distribution of the above features on the positive and negative strands is considered to construct a two-dimensional tensor of size N×20 and perform standardization.
[0008] S2. Deep learning model architecture; A hybrid deep learning model integrating convolutional neural networks, bidirectional long short-term memory networks and multi-head attention mechanisms is adopted for the accurate detection of genomic structural variations. The deep learning model adopts an end-to-end training method and automatically learns the complex feature patterns related to structural variations in the genomic sequence.
[0009] S3. Three-stage clustering and breakpoint optimization; First, perform preliminary clustering based on the SV type and genome start position indicated by the SV signal read in step S1; Second, merge insertion and deletion sequences from each cluster originating from the same read to correct alignment errors in highly repetitive regions; Finally, re-split the preliminary clusters to represent different supported SV lengths.
[0010] S4. Quality Control and Genotyping: The entire quality control system consists of a multi-stage filtering strategy, with each stage focusing on different indicators, including coverage, number of supporting reads, consistency of variant locations, and alignment quality. Genotyping is the process of determining specific genetic variations or allele combinations present at specific gene loci in a sample. In SV detection, the SV genotype represents the allele status of SV in the diploid genome, and is divided into three categories: homozygous reference (0 / 0), heterozygous (0 / 1), and homozygous substitution (1 / 1). The genotype is determined using the maximum likelihood method.
[0011] S5. Output Results: Finally, the high-confidence SV events are output as standardized VCF format files.
[0012] The beneficial effects of this invention are as follows:
[0013] 1. By designing a hybrid neural network architecture of ResBlock+BiLSTM+multi-head attention mechanism, combined with a three-stage clustering strategy and multiple quality control, high-precision detection and breakpoint localization of five SV types (DEL, INS, INV, DUP, and TRA) are achieved, improving the robustness and generalization ability of detection. Feature engineering and deep learning are combined to alleviate data noise interference, resulting in higher detection accuracy in complex regions and low-quality data.
[0014] 2. The three-stage clustering strategy effectively optimizes the localization of mutation breakpoints and improves the reconstruction accuracy of structural mutation events.
[0015] 3. The multi-head attention mechanism focuses on key variant signals, enhancing the model's ability to detect different types of variants.
[0016] 4. A multi-level quality control system reduces the false positive rate and ensures high-confidence test results.
[0017] 5. It has good cross-platform adaptability and versatility, and is suitable for various sequencing data such as PacBioCLR, CCS and Oxford Nanopore. Attached Figure Description
[0018] Figure 1 This is a flowchart of the present invention;
[0019] Figure 2SV feature collection is used to comprehensively collect and record various types of SV features from within and between alignments;
[0020] Figure 3 The structure diagram of the deep learning model used in the SV detection method;
[0021] Figure 4 The detection results on the GIABHG002SV dataset were used to compare the performance of different sequencing platforms and coverage; the F1 score of DEL and INS under different datasets; where a is the F1 score of DEL under different datasets and b is the F1 score of INS under different datasets.
[0022] Figure 5 To evaluate the detection results on the GIABHG002SV dataset, we compared the performance of different sequencing platforms and coverage levels; and evaluated the precision and recall of DEL and INS under different datasets. Specifically, a represents the precision and recall of DEL under different datasets, and b represents the precision and recall of INS under different datasets.
[0023] Figure 6 The performance of different sequencing platforms and coverage was compared based on the detection results on the GIABHG002SV dataset; where a and b are the DEL and INS genotype results under different datasets, respectively.
[0024] Figure 7 The results are on the simulated dataset; F1 scores for different variant types (DEL, INS, DUP, INV, and BND) on the CLR and ONT simulated datasets; where a is the F1 score for missing DEL; where b is the F1 score for inserted INS; where c is the F1 score for duplicated DUP; where d is the F1 score for inverted INV; and where e is the F1 score for ectopic BND.
[0025] Figure 8 The results are shown on a simulated dataset; the precision and recall of the PacBioCLR and ONT datasets are compared to the performance of different tools; where a represents the precision and recall of the PacBioCLR dataset, and b represents the precision and recall of the PacBioCLR dataset.
[0026] Figure 9The results are shown on a simulated dataset. A radar chart of the MDR results for the Ashkenazi trio family, including overall and different SV types of MDR values; where a is the overall MDR result chart for the Ashkenazi trio family, and b is the multidimensional scaling radar chart (MDR radar chart) for the Ashkenazi trio family, displaying MDR values by structural variation type. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0029] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0030] In the description of this invention, it should be understood that the terms "upper," "lower," "inner," "outer," "left," "right," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used to facilitate the description of this invention and to simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0031] Furthermore, the terms "first," "second," etc., are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0032] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, terms such as "set" and "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0033] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0034] Here, we will first explain the meaning of the key components in the secure data transmission method:
[0035] (1) CA: As the administrator in the system, the CA is responsible for initializing and publishing common system parameters, ensuring that all entities operate under a unified security framework. Simultaneously, the CA is responsible for mobile device identity registration and certificate issuance, and maintains device registration information within the system. When malicious behavior is detected on a device, the CA can promptly revoke its communication permissions. Furthermore, to adapt to the security threats posed by future quantum computing environments, the CA employs a quantum-resistant cryptographic security mechanism in parameter configuration and certificate management, ensuring the system's long-term security and scalability.
[0036] (2) Edge Gateway: The edge gateway is responsible for accessing and managing mobile devices within a designated area. When a device connects, the edge gateway verifies the device's identity using a pre-defined quantum-resistant authentication mechanism and establishes a secure communication session with the device upon successful verification. Subsequently, the gateway periodically receives and verifies data uploaded by the device, summarizing and analyzing it locally to achieve both high efficiency and security in data processing.
[0037] (3) Mobile Devices: Mobile devices are the data interaction and access units in the system, typically deployed on the user terminal side, used for real-time collection, generation, or transmission of various application data. Before joining the system, the device needs to complete identity registration based on a quantum-resistant security mechanism at the CA. Subsequently, when establishing a communication connection with the edge gateway, the device first verifies the gateway's legitimacy through a quantum-resistant authentication mechanism. After confirming trustworthiness, it negotiates and generates a secure session key to protect the confidentiality and integrity of subsequent transmitted data. The device will securely upload the collected or generated data to the gateway according to a predetermined period or triggering conditions, achieving end-to-end quantum-resistant secure data transmission.
[0038] like Figure 1 As shown, a deep learning-based SV detection method includes the following steps:
[0039] S1. As Figure 2As shown, the data input and feature extraction are performed as follows: Using the BAM file generated from third-generation long-read sequencing data (PacBio / ONT) as input, candidate SV signals are extracted by parsing the CIGAR string and SA tag. SV signals include insertions, deletions, inversions, duplications, and translocations. Simultaneously, soft / hard clipping and segmentation alignment information features are combined to construct a multi-channel feature matrix. The feature matrix is statistically analyzed in a windowed manner (e.g., 10Mb interval, 2000bp sub-window). Considering the distribution of the above features on the positive and negative strands, a two-dimensional tensor of size N×20 is constructed and standardized.
[0040] S2. For example Figure 3 As shown, the deep learning model architecture employs a hybrid deep learning model that integrates convolutional neural networks (CNN), bidirectional long short-term memory networks (BiLSTM), and multi-head attention mechanisms for the accurate detection of genomic structural variations. The deep learning model uses an end-to-end training method to automatically learn complex feature patterns related to structural variations in the genomic sequence.
[0041] S3. Three-Stage Clustering and Breakpoint Optimization; Detection of structural variants (SVs) typically relies on clustering features from the same variant event to enhance the signal and reduce noise. However, traditional clustering methods often face challenges. These methods are usually based on fixed distance metrics and struggle to flexibly handle different intensities and distributions of variant signals, especially between different types of variants (SVs). The clustering algorithm implemented in this study employs a three-stage progressive clustering strategy to address the noise, discontinuity, and complexity of SV signals in long-read sequencing data. The three-stage clustering algorithm follows a "coarse-to-fine, stepwise refinement" design philosophy: First, preliminary clustering is performed based on the SV type and genome start position indicated by the SV signals read in step S1; second, insertion and deletion sequences from each cluster originating from the same read are merged to correct alignment errors in highly repetitive regions; finally, the preliminary clusters are re-split to represent different supported SV lengths.
[0042] S4. Quality Control and Genotyping: In this workflow, we introduce a multi-level Quality Control (QC) process to screen reliable results from candidate variants. The entire QC system consists of multiple stages of filtering strategies, each focusing on different indicators, including coverage, number of supporting reads, consistency of variant locations, and alignment quality. Genotyping is the process of determining specific genetic variations or allele combinations present at specific gene loci in a sample. In SV detection, the SV genotype represents the allele status of SV in the diploid genome, usually divided into three categories: homozygous reference (0 / 0), heterozygous (0 / 1), and homozygous substitution (1 / 1). The genotype is determined using the maximum likelihood method.
[0043] S5. Output Results: Finally, the high-confidence SV events are output as standardized VCF format files.
[0044] In some embodiments, the construction process of the deep learning model architecture in step S2 includes the following steps:
[0045] (1) Residual Convolution Module: The residual convolution module can extract local features at different scales, from fine-grained sequence variations to large-scale structural patterns. The feature extraction part of the model adopts a residual learning framework, which solves the gradient vanishing problem in deep network training by constructing residual blocks; the mathematical expression of the residual block is as follows:
[0046] ;
[0047] Where H(x) is the input feature, F(x,{Wi}) represents the residual mapping, and {Wi} are learnable parameters; the specific residual block structure contains two consecutive convolutional layers, each followed by batch normalization and the SELU activation function:
[0048] ;
[0049] ;
[0050] ;
[0051] in, The weight matrix is designed for quick connections. When the input and output dimensions do not match, 1×1 convolutions are used to adjust the dimensions. In this model, the first two ResBlock layers have 32 and 64 output channels respectively. Max pooling is used after each layer to downsample and capture a wider range of local sequence features. The third ResBlock outputs 128 channels without subsequent pooling operations, ensuring that high-level features maintain high resolution. In addition, each ResBlock is followed by SELU activation and Dropout regularization after summation to improve the network's robustness.
[0052] (2) Bidirectional Long Short-Term Memory Network: Bidirectional LSTM networks can effectively capture long-range dependencies in genomic sequences, which is crucial for identifying large structural variations. After convolutional feature extraction, the model reshapes the two-dimensional features into a one-dimensional sequence and inputs it into the bidirectional long short-term memory network (bidirectional LSTM network); BiLSTM simultaneously captures forward and backward dependencies in the genomic sequence, and its mathematical expression is:
[0053] Forward: Backward: ;
[0054] Bidirectional output: ;
[0055] The (500, 2560) feature sequence output by ResBlock is processed by a bidirectional LSTM. Specifically, the two-dimensional features are reshaped into a sequence of length 500, with a feature dimension of 2560 at each time step. The BiLSTM consists of two LSTMs, one forward and one backward, which scan the sequence in the forward and backward directions respectively to capture bidirectional contextual information. Let the forward hidden state at time t be... The reverse hidden state is Then the output vector of BiLSTM is concatenated as follows: =[ This design integrates past and future contextual information; compared to unidirectional LSTM, it effectively alleviates gradient vanishing and obtains richer temporal representations. In the bidirectional long short-term memory network, the BiLSTM output sequence retains a length of 500, and subsequent Dropout further prevents overfitting.
[0056] (3) Multi-head attention module: The multi-head attention mechanism enables the model to adaptively focus on key regions related to structural variations, improving detection accuracy. The sequence output by the BiLSTM module is first input into the multi-head attention mechanism to further aggregate long-distance dependencies; the multi-head attention will... The data is mapped into several sets of query (Q), key (K), and value (V) vectors, and then summed according to attention weights; multi-head attention allows the model to learn different attention patterns in parallel in different representation subspaces.
[0057] ;
[0058] Each attention head is calculated as follows:
[0059] ;
[0060] The formula for calculating scaled dot product attention is:
[0061] ;
[0062] The model employs four attention heads, each with a dimension of 64; this mechanism allows the model to focus on information simultaneously in different subspaces and at different locations. After output, residual connections and LayerNorm normalization are used to preserve the original sequence information and stabilize training.
[0063] (4) Global Feature Aggregation and Classification: The sequence after the attention module is first processed by Global Average Pooling (GlobalAveragePooling1D), which compresses the sequence features into an average vector in the length dimension. Then, it passes through two fully connected layers (Dense128→64) and activates SELU respectively. Dropout regularization is inserted in between. The final output layer is a single neuron sigmoid activation unit, which outputs a real probability, representing the possibility of SV in the window. The feature sequence processed by the attention mechanism is then aggregated by global average pooling.
[0064] ;
[0065] Where T is the sequence length. Let be the feature vector at position t;
[0066] The final classification layer uses two fully connected layers for feature transformation:
[0067] =SELU( g+ ); =SELU( + p=σ( );
[0068] Where p represents the probability of structural variation, and σ is the Sigmoid activation function.
[0069] In some embodiments, step S3 includes the following steps:
[0070] (1) FAS clustering (Fast Adaptive Scanning): In the first stage, the bins (segments) corresponding to the SV signals extracted in step S1 preprocessing are quickly traversed, with the default bin size set to 100bp; for the five basic SV types, these bins are traversed sequentially from the start to the end of the chromosome. If the internal distance between adjacent bins is less than a threshold, these bins will be merged; this threshold is calculated based on the minimum standard deviation of the starting position of the SV signal in each bin; the formula for calculating the internal distance threshold is as follows:
[0071] ;
[0072] Where r is a constant, with a default value of 2.5; and These represent the standard deviations of the starting positions of the SVs in two adjacent bins. When the external distance between adjacent bins is less than a threshold, these bins will be merged. This threshold is calculated based on the average SV length indicated by the adjacent bins. The formula for calculating the external distance threshold is as follows:
[0073] ;
[0074] `xA` and `xB` are constants, with default values of 1.5kb and 1kb respectively; `xA` and `xB` represent the average SV lengths of two adjacent bins; `xA` and `xB` are constants, with default values of 1.5kb and 1kb respectively; `xA` and `xB` represent the average SV lengths of two adjacent bins respectively; `xA` and `xB` are constants, with default values of 1
[0075] a. The distance between their starting positions is less than :startB−endA≤ ;
[0076] b. If they are located within a repeating region, the distance between their outer boundaries is less than... : endB−startA≤ .
[0077] The algorithm merges two adjacent initial clusters A and B into a new cluster. After merging, the statistics of the new cluster are updated, and the original clusters in the global clustering array are replaced with the new cluster. To avoid ignoring better long-distance combinations due to local optimum merging, the algorithm backtracks to the positions of the first two clusters after each merge and rescans subsequent clusters. This mechanism enhances the global consistency and completeness of the clustering results.
[0078] (2) Merging of events within the same read: In long-read sequencing (such as PacBio or Oxford Nanopore), due to the high sequencing error rate or poor handling of repetitive regions by the alignment algorithm, real structural variant (SV) events may be incorrectly split into multiple discontinuous sub-events. This phenomenon is particularly common in insertion (INS) and deletion (DEL) events, especially in tandem repeat regions, where sequence alignment errors occur more frequently. To address this issue, the second-stage algorithm integrates fragmented SV signals from the same sequencing read to reconstruct the original complete variant pattern. In the second stage, within the initial clustering, multiple SV events from the same sequencing read and located close to each other are identified and merged based on the region type and spatial distance threshold, with the region type being either a repeat region or a non-repetitive region.
[0079] (3) Length-based re-segmentation: After the first two clustering stages, real SV events with the same starting position but different lengths may still be incorrectly clustered together. The third stage of clustering aims to solve this problem by splitting the initial clusters according to the length signal of the SV and re-merging them when appropriate; traversing each cluster and mapping the SV signal to a fixed-width bin according to the absolute value of the SV length, the boundaries of which are defined as follows:
[0080] ;
[0081] In this design, the default value for B is 50bp. Events with similar lengths (i.e., events falling into the same group) will be assigned to the same bin. Due to the ambiguity of boundaries in true structural variations, adjacent bins may correspond to the same underlying variation event. To address this issue, a relative difference strategy is used to determine whether adjacent bins need to be merged. After merging, a backward check is performed to avoid missing continuous similarities spanning multiple adjacent bins. Each remaining bin is considered an independent sub-cluster. All SV signals within a bin are considered a candidate SV event. Support evaluation and VCF file generation will follow. The relative threshold of 33% is chosen based on the following considerations: for smaller SV events, stricter length constraints need to be imposed, while for larger SV events, greater absolute differences can be tolerated. In practice, this design achieves a balance between accuracy and flexibility.
[0082] Ultimately, this phase ensures that SV events with the same starting position on the reference genome but different lengths can be correctly isolated and reported as independent variant events.
[0083] In some embodiments, in step S4, the quality control system includes:
[0084] This workflow introduces a multi-level quality control (QC) system to filter reliable variant events from the candidate structural variant (SV) set. The QC framework consists of multiple filtering stages, each targeting different evaluation criteria, such as coverage, number of supported reads, positional consistency, and alignment quality.
[0085] First, for each initially detected candidate SV, its basic attributes are extracted, including chromosome, start position, type, length, and number of supporting reads. Simultaneously, the sequencing alignment file (BAM) is accessed to assess coverage and read characteristics within the candidate region, providing foundational data for subsequent quality control steps. Next, a five-dimensional coverage analysis is performed, corresponding to the upstream, start, center, termination, and downstream positions of the variant region, to assess depth variations within the variant region. True structural variants typically exhibit characteristic coverage patterns. For example, deletion events usually show decreased coverage in the central region compared to the lateral regions, while duplication events show the opposite trend. Subsequently, the coefficient of variation and local gradient changes of the SV signal are calculated to detect potential alignment artifacts. Signals exhibiting abnormal patterns or excessive fluctuations are marked as low-confidence events. The number of supporting reads is a key factor; the minimum support threshold is dynamically adjusted based on local and global coverage to ensure a balance between sensitivity and specificity at different sequencing depths. Furthermore, specific QC strategies are applied for different types of SV events. For example, missing events must exhibit a "decreasing coverage" pattern, while duplicate events must exhibit a "increasing coverage" pattern.
[0086] Finally, quality control includes standard deviation analysis, alignment quality scoring, and error rate-based weighted support reads to ensure that SV events have high confidence levels of support. Candidate SV events are sorted and filtered based on their alignment quality scores. Any candidate SV event that fails at any quality control stage is marked "FILTERED" and excluded from the final results. Candidate SV events that pass all quality control stages are marked "PASS" and proceed to the subsequent aggregation and output process. For filtered SV events, the specific reasons for their exclusion are recorded (e.g., insufficient coverage, insufficient number of support reads) for subsequent review and analysis. This multi-level QC process is a core component of the detection workflow, ensuring that only high-confidence structural variation events are included in the final results. All candidate events that pass QC are written into the final output VCF file.
[0087] This progressively layered filtering framework ensures that each candidate variant event can be evaluated from multiple perspectives. The filtering process starts with sequencing depth and the number of supporting reads, followed by statistical consistency and biological pattern validation, and finally further refines the screening by comparison accuracy, thereby minimizing the false positive rate.
[0088] Furthermore, we first selected the well-studied human sample HG002 from the "Genome in a Bottle" (GIAB) project to evaluate its performance across different sequencing platforms and coverage levels. We used the detection tool Truvari to systematically evaluate the structural variant (SV) detection performance of the HG002 sample on three mainstream long-read sequencing platforms (PacBio CLR65×, PacBio CCS30×, and Oxford Nanopore 50×). Evaluation metrics included precision, recall, and F1 score for both insertions (INS) and deletions (DEL). Figure 4-6 As shown.
[0089] Secondly, we used the SURVIVOR tool to generate a predetermined number and type of SV variants, introduced these variants into a reference genome, and then used the PBSIM2 simulator to simulate long-read sequence data at approximately 30× sequencing depth, based on the error characteristics of the PacBioCLR and Oxford Nanopore (ONT) sequencing platforms. This dataset covers SV types such as insertions (INS), deletions (DEL), duplications (DUP), inversions (INV), and translocations (TRA), aiming to provide a test set with known ground truth values to objectively evaluate the tool's capabilities. The evaluation used the SURVIVOR tool for alignment analysis to obtain the precision, recall, and F1 score for each tool across different variant types and platforms, such as... Figure 7-9 As shown.
[0090] This invention proposes a method for constructing a high-dimensional signal matrix based on BAM file alignment features, supporting the detection of five SV types. Furthermore, it combines deep learning methods, designing a hybrid network architecture of ResBlock+BiLSTM+multi-head attention mechanism to improve feature representation and detection accuracy.
[0091] A three-stage adaptive clustering strategy is introduced to dynamically optimize the clustering results of SV events.
[0092] This invention establishes a multi-level quality control system driven by both coverage and support to enhance the stability of the model under noisy data.
[0093] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A deep learning-based SV detection method, characterized in that, Includes the following steps: S1. Data input and feature extraction; Using BAM files generated from third-generation long-read sequencing data as input, candidate SV signals are extracted by parsing CIGAR strings and SA tags. SV signals include insertions, deletions, inversions, duplications, and translocations. At the same time, soft splicing, hard splicing, and segmentation alignment information features are combined to construct a multi-channel feature matrix. The feature matrix is statistically analyzed in a windowed manner. The distribution of the above features on the positive and negative strands is also considered to construct a two-dimensional tensor of size N×20 and perform standardization. S2. Deep learning model architecture; A deep learning model is used to detect genomic structural variations in the feature windows corresponding to the multi-channel feature matrix. A hybrid deep learning model that integrates convolutional neural networks, bidirectional long short-term memory networks, and multi-head attention mechanisms is used for accurate detection of genomic structural variations. The deep learning model adopts an end-to-end training method to automatically learn complex feature patterns related to structural variations in the genomic sequence. S3. Three-stage clustering and breakpoint optimization: First, the SV signals are initially clustered according to the SV type and genome start position indicated by the SV signals read in step S1; second, the insertion and deletion sequences from each cluster originating from the same read are merged to correct alignment errors in highly repetitive regions; finally, the initial clusters are re-split to obtain different supported SV lengths. S4. Quality Control and Genotyping: The entire quality control system consists of a multi-stage filtering strategy, with each stage focusing on different indicators, including coverage, number of supporting reads, consistency of variant locations, and alignment quality. Genotyping is the process of determining specific genetic variations or allele combinations present at specific gene loci in a sample. In SV detection, the SV genotype represents the allele status of SV in the diploid genome, and is divided into three categories: homozygous reference (0 / 0), heterozygous (0 / 1), and homozygous substitution (1 / 1). The genotype is determined using the maximum likelihood method. S5. Output Results: Finally, the high-confidence SV events are output as standardized VCF format files.
2. The deep learning-based SV detection method according to claim 1, characterized in that, The deep learning model architecture in step S2 is constructed by the following steps: (1) Residual Convolution Module: The feature extraction part of the model adopts the residual learning framework, which solves the gradient vanishing problem in deep network training by constructing residual blocks; the mathematical expression of the residual block is as follows: ; Where H(x) is the input feature, F(x,{Wi}) represents the residual mapping, and {Wi} are learnable parameters; the specific residual block structure contains two consecutive convolutional layers, each followed by batch normalization and the SELU activation function: ; ; ; in, The weight matrix is used for quick connections. When the input and output dimensions do not match, dimensionality adjustment is performed through 1×1 convolution. In this model, the first two ResBlock layers are set to output 32 and 64 channels respectively. Max pooling is used after each layer to downsample and capture a wider range of local sequence features. The third ResBlock outputs 128 channels and has no subsequent pooling operation. In addition, each ResBlock is followed by SELU activation and Dropout regularization after summation. (2) Bidirectional Long Short-Term Memory Network: After convolutional feature extraction, the model reshapes the two-dimensional features into a one-dimensional sequence and inputs it into the bidirectional long short-term memory network; BiLSTM simultaneously captures the forward and backward dependencies in the genome sequence, and its mathematical expression is: Forward: Backward: ; Bidirectional output: ; The (500, 2560) feature sequence output by ResBlock is processed by a bidirectional LSTM; specifically, the two-dimensional features are reshaped into a sequence of length 500, with a feature dimension of 2560 at each time step; the BiLSTM consists of two LSTMs, one forward and one backward, which scan the sequence in the forward and backward directions respectively to capture bidirectional contextual information; let the forward hidden state at time t be... The reverse hidden state is Then the output vector of BiLSTM is concatenated as follows: =[ It integrates contextual information from the past and future; the output sequence of BiLSTM in the bidirectional long short-term memory network still retains a length of 500, and then Dropout is used to further prevent overfitting; (3) Multi-head attention module: The sequence output by the BiLSTM module is first input into the multi-head self-attention mechanism, which further aggregates long-distance dependencies; the multi-head attention will... The data is mapped into several sets of query Q, key K, and value V vectors, and then summed according to attention weights; multi-head attention allows the model to learn different attention patterns in parallel in different representation subspaces. ; Each attention head is calculated as follows: ; The formula for calculating scaled dot product attention is: ; The model employs four attention heads, each with a dimension of 64. After output, residual connections and LayerNorm normalization are used to preserve the original sequence information and stabilize the training. (4) Global Feature Aggregation and Classification: The sequence after the attention module is first subjected to global average pooling to compress the sequence features into an average vector in the length dimension. Then, it is passed through two fully connected layers and SELU is activated respectively. Dropout regularization is inserted in between. The final output layer is a single neuron sigmoid activation unit, which outputs a real probability, representing the possibility that the genome alignment signal window input to the model has SV. The feature sequence processed by the attention mechanism is then aggregated through global average pooling. ; Where T is the sequence length. Let be the feature vector at position t; The final classification layer uses two fully connected layers for feature transformation: =VILLAGE( g+ ); =VILLAGE( + );p=σ( ); Where p represents the probability of structural variation, and σ is the Sigmoid activation function.
3. The deep learning-based SV detection method according to claim 2, characterized in that, Step S3 includes the following steps: (1) FAS clustering: In the first stage, the bins corresponding to the SV signals extracted in step S1 are fast traversed, and the default bin size is set to 100bp. For the five basic SV types, these bins are traversed sequentially from the start point to the end point of the chromosome. If the internal distance between adjacent bins is less than a threshold, these bins will be merged. This threshold is calculated based on the minimum standard deviation of the starting position of the SV signal in each bin. The formula for calculating the internal distance threshold is as follows: ; in, It is a constant with a default value of 2.5; and These represent the standard deviations of the starting positions of the SVs in two adjacent bins. When the external distance between adjacent bins is less than a threshold, these bins will be merged. This threshold is calculated based on the average SV length indicated by the adjacent bins. The formula for calculating the external distance threshold is as follows: ; `xA` and `xB` are constants, with default values of 1.5kb and 1kb respectively; `xA` and `xB` represent the average SV lengths in two adjacent bins; `xA` and `xB` are constants, with default values of 1.5kb and 1kb respectively; `xA` and `xB` represent the average SV lengths in two adjacent bins respectively; `xA` and `xB` are constants, with default values of 1 a) The distance between their starting positions is less than :startB−endA≤ ; b) If they are located within a repeating region, the distance between their outer boundaries is less than [a certain value]. : endB−startA≤ ; Then, the two adjacent initial clusters A and B are merged into a new cluster; after merging, the statistics of the new cluster are updated, and the original clusters in the global clustering array are replaced with the new cluster. (2) Merging of events within the same read: The second-stage algorithm integrates fragmented SV signals from the same sequencing read to reconstruct the original complete mutation pattern; in the second stage, within the initial clustering, multiple SV events from the same sequencing read and close in location are identified and merged according to the region type and spatial distance threshold, with the region type being either a repeating region or a non-repeating region. (3) Length-based re-segmentation: The initial clusters are split according to the length signal of SV and re-merged as appropriate; each cluster is traversed and the SV signal is mapped to a fixed-width bin according to the absolute value of the SV length. The boundaries of the bin are defined as follows: ; in, The default value is 50bp; events of similar length will be assigned to the same bin. A relative difference strategy is used to determine whether adjacent bins need to be merged; after merging, a backward check is performed to avoid missing continuous similarities across multiple adjacent bins; each remaining bin is treated as an independent sub-cluster; all SV signals within a bin are treated as a candidate SV event.
4. The deep learning-based SV detection method according to claim 3, characterized in that, In step S4, the quality control system includes: First, for each initially detected candidate SV, its basic attributes are extracted, including chromosome, start position, type, length, and number of supporting reads. Simultaneously, the sequencing alignment file is accessed to assess coverage and read characteristics within the candidate region, providing foundational data for subsequent quality control steps. Next, a five-dimensional coverage analysis is performed, corresponding to the upstream, start, center, termination, and downstream positions of the variant region, to assess depth variations within the variant region. Subsequently, the coefficient of variation and local gradient changes of the SV signal are calculated to detect potential alignment artifacts; signals exhibiting abnormal patterns or excessive fluctuations are marked as low-confidence events. The minimum support threshold for the number of supporting reads is dynamically adjusted based on local and global coverage to ensure a balance between sensitivity and specificity at different sequencing depths. Finally, quality control also includes standard deviation analysis, alignment quality scoring, and error rate-based weighted support reads to ensure that SV events have high confidence levels. Candidate SV events are sorted and filtered according to their alignment quality scores. Any candidate SV event that fails at any quality control stage is marked "FILTERED" and excluded from the final results. Candidate SV events that pass all quality control stages are marked "PASS" and enter the subsequent aggregation and output process. For filtered SV events, the specific reasons for their exclusion are recorded for subsequent review and analysis.
