Deep learning based whole genome variant site recognition prediction method
By aligning sequencing reads to a reference genome and extracting local features, and using a bi-branch coding network to capture inter-read associations and sequence context features, this method addresses the shortcomings of existing methods in terms of accuracy and generalization ability in whole-genome variant identification, and achieves efficient identification and localization of multiple variant types.
Patent Information
- Application Number
- CN202611374618.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-27
AI Technical Summary
Existing deep learning-based whole-genome variant site identification methods lack accuracy when dealing with structural variations and low-frequency mutations, struggle to adaptively learn the differences in variant patterns among different samples, and suffer from insufficient computational efficiency and model generalization ability, thus limiting their application in clinical diagnosis and large-scale population studies.
A deep learning-based approach is used to align sequencing reads of the test sample to a reference genome, generating alignment coordinates, CIGAR strings, and base quality values. Local features are extracted using a sliding window and stacked into a four-dimensional feature tensor. The self-attention mechanism and dilated convolution in a bi-branch coding network are used to capture inter-read association features and sequence context features. The variant type is identified and its location is corrected by combining classification and regression prediction heads.
It achieves unified identification of single nucleotide variants, insertions and deletions, deletion-type structural variants and duplication-type structural variants, improves the accuracy of variant site localization and the model's generalization ability on whole-genome scale data, and solves the problem of insufficient identification accuracy of traditional methods in complex situations.
Smart Images

Figure CN123182760A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of bioinformatics and deep learning, and in particular to a method for identifying and predicting genome-wide variant sites based on deep learning. Background Technology
[0002] With the rapid development of high-throughput sequencing technology, whole-genome variant identification has become a crucial step in precision medicine and genetics research. Current variant detection methods primarily rely on sequence alignment algorithms combined with statistical thresholds, using manually designed feature rules to distinguish true variants from sequencing noise. However, whole-genome data is massive in scale and diverse in variant types. Traditional methods show significant decreases in accuracy when dealing with complex situations such as structural variations and low-frequency mutations, and struggle to adaptively learn the differences in variant patterns between different samples. In recent years, deep learning technology has made breakthroughs in image recognition and natural language processing, but its application in whole-genome variant identification remains in its early stages. Existing deep learning-based models are mostly designed for specific variant types or local genomic regions, lacking a unified identification framework for the whole genome scale. Furthermore, there is a significant contradiction between computational efficiency and model generalization ability when processing massive sequencing data, hindering the practical application of this technology in clinical diagnosis and large-scale population studies.
[0003] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a deep learning-based method for identifying and predicting genome-wide variant sites. The technical solution of this deep learning-based method for identifying and predicting genome-wide variant sites is as follows: The sequencing reads of the sample to be tested are aligned to the reference genome to generate the alignment coordinates, CIGAR string and base quality value of each sequencing read; A fixed-length sliding window is moved along the reference genome, and local features of each sequencing read covering the sliding window are extracted within each window. The local features of each sequencing read are sorted according to the alignment coordinates and stacked into a four-dimensional feature tensor. The four-dimensional feature tensor is input into a dual-branch coding network, which includes a spatial branch and a temporal branch. The spatial branch uses a self-attention mechanism to generate inter-read association features along the sequencing read dimension, and the temporal branch uses dilated convolution to generate sequence context features along the window length dimension. The inter-read association features and the sequence context features are concatenated and then dimensionality reduced by a fully connected layer to obtain the fused coding vector at the center position of the current window. The fused encoding vector is input into the classification prediction head and the regression prediction head. The classification prediction head outputs the probability that the center position belongs to a single nucleotide variant, insertion / deletion, deletion-type structural variant, or duplication-type structural variant. The regression prediction head outputs the left offset and the right offset relative to the center position. The mutation type of the center position is determined based on the highest probability. When the mutation type is a single nucleotide variant or insertion / deletion, the center position coordinates are corrected using the left and right offsets. When the mutation type is a deletion or duplication, the mutation start and end coordinates are calculated using the left and right offsets, respectively, and a list of mutation sites is output.
[0005] The technical solution of this invention aligns the sequencing reads of the sample to be tested to a reference genome and extracts local features, stacking them into a four-dimensional feature tensor. It utilizes the self-attention mechanism in a dual-branch coding network to capture inter-read association features and dilated convolution to capture sequence context features. The fused coding vector is input into the classification prediction head and the regression prediction head for variant type identification and position offset correction. This solves the problems of insufficient identification accuracy when facing structural variants and low-frequency mutations, and the difficulty in adaptively learning the differences in variant patterns of different samples, which are caused by the reliance on manually designed feature rules in traditional methods. It achieves unified identification of single nucleotide variants, insertions and deletions, deletion-type structural variants and duplication-type structural variants, and improves the accuracy of variant site localization and the generalization ability of the model on whole-genome-scale data.
[0006] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0008] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of a deep learning-based whole-genome variant site identification and prediction method according to the present invention. Detailed Implementation
[0009] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0010] Figure 1 This diagram illustrates a flowchart of an embodiment of a deep learning-based whole-genome variant site identification and prediction method provided by the present invention, executed by a control terminal. Figure 1 As shown, this deep learning-based method for identifying and predicting genome-wide variant sites includes the following steps: S1. Align the sequencing reads of the sample to be tested to the reference genome to generate the alignment coordinates, CIGAR string and base quality value of each sequencing read.
[0011] Specifically, a sequencing read refers to a raw, short sequence fragment output by a high-throughput sequencing platform. When aligning sequencing reads to a reference genome, an alignment algorithm locates each read at a specific position in the reference genome; this location is the alignment coordinate. The CIGAR string is a compact alignment expression string used to record alignment details between the sequencing read and the reference genome, including the type and number of alignment events such as matches, mismatches, insertions, and deletions. The base quality value indicates the sequencing confidence of each base in the sequencing read; this value is directly provided by the sequencing platform.
[0012] The CIGAR string can be parsed to extract the number of mismatched bases, inserted bases, and deleted bases for each sequencing read relative to the reference genome. The number of mismatched bases refers to the number of bases in the sequencing read that do not match the corresponding position in the reference genome. The number of inserted bases refers to the number of additional bases inserted in the sequencing read relative to the reference genome. The number of deleted bases refers to the number of bases missing in the sequencing read relative to the reference genome. In addition, a mapping quality value is generated during alignment. This mapping quality value represents the logarithmic transformation of the probability that the sequencing read is correctly aligned to its current genomic position, and is used to assess the reliability of the alignment results. The number of mismatched bases, inserted bases, deleted bases, and mapping quality values are used as additional channel features, together with the base sequence and base quality value, to form local features used in subsequent steps, thereby enriching the feature expression dimensions and enabling the model to capture variation signals at the alignment level.
[0013] S2. Move a fixed-length sliding window along the reference genome, extract local features of each sequencing read covering the sliding window within each window, sort the local features of each sequencing read according to the alignment coordinates and stack them into a four-dimensional feature tensor.
[0014] Specifically, the sliding window moves progressively along the coordinate sequence of the reference genome from the start position to the end position. The window length is dynamically determined by the GC content distribution of the reference genome. GC content refers to the proportion of guanine and cytosine bases in a genomic fragment. In regions with high GC content, the coverage uniformity of sequencing reads is lower, so a larger window length is set to increase the amount of statistical information; in regions with low GC content, a smaller window length is set to maintain detection resolution. The window length within the same window remains constant. The step size between two adjacent sliding windows is set to half the window length, and the step size decreases as the coverage depth of sequencing reads within the window increases. Coverage depth refers to the number of sequencing reads covering the same genomic location. When the coverage depth is high, the step size is decreased to increase window overlap and improve detection density; when the coverage depth is low, the step size is increased to expand the coverage area and avoid missing variations in sparse regions. Within each window, local features of each sequencing read covering that window are extracted. Local features include the base sequence within the window, the quality value subsequence, the mapped quality value, and the number of mismatched bases, inserted bases, and deleted bases parsed from the CIGAR string. The local features of each sequencing read are arranged in ascending order of the alignment coordinates to ensure that the positional order of each read within the same window is consistent with the genomic coordinate order.
[0015] The local features of all sequencing reads within the same window are stacked into a four-dimensional feature tensor. The four dimensions of this tensor correspond to the genomic location index within the window, the sequence read index covering the same genomic location, the base sequence length channel, and the combined feature channel, respectively. The genomic location index represents the number of each base position within the window relative to the window's starting position. The sequence read index represents the number of each sequencing read covering the same genomic location. The base sequence length channel represents the base sequence length of each sequencing read. The combined feature channel is obtained by concatenating base subsequences, quality value subsequences, the number of mismatched bases, the number of inserted bases, the number of missing bases, and the mapped quality value along the feature dimensions. This four-dimensional tensor structure organizes multi-source heterogeneous information into a unified data format, facilitating direct reading and processing by subsequent network models.
[0016] Before inputting the four-dimensional feature tensor into the dual-branch coding network, the four-dimensional feature tensor is truncated or zero-padded along the base sequence length channel. Truncation means that when the base sequence length of a sequencing read exceeds a predetermined length threshold, the base sequence within that threshold is retained and the excess portion is discarded. Zero padding means that when the base sequence length of a sequencing read is less than the predetermined length threshold, zero values are added to the end of the sequence to ensure that all sequencing reads have the same length along the base sequence length channel. Through truncation or zero padding, sequencing reads covering the same window achieve a uniform length along the base sequence length channel. Standardized scores are then applied to each feature component in the combined feature channel. Standardized scores involve subtracting the mean of that feature component from the original value of each feature component across all samples and then dividing by the standard deviation, resulting in each feature component having zero mean and unit variance, thus eliminating interference from dimensional differences.
[0017] S3. Input the four-dimensional feature tensor into the dual-branch coding network. The dual-branch coding network includes a spatial branch and a temporal branch. The spatial branch uses a self-attention mechanism to generate inter-read association features along the sequencing read dimension. The temporal branch uses dilated convolution to generate sequence context features along the window length dimension. After concatenating the inter-read association features and the sequence context features, the dimensionality is reduced by a fully connected layer to obtain the fused coding vector at the center position of the current window.
[0018] Specifically, the dual-branch coding network comprises a spatial branch and a temporal branch. The spatial branch employs a self-attention mechanism to process the four-dimensional feature tensor along the sequencing read dimension. This self-attention mechanism captures the dependencies and interactions between different sequencing reads at the same genomic location by calculating attention weights, generating inter-read association features. Before calculating the attention weights, the relative position of each sequencing read within the window is sinusoidally encoded. The positional encoding vector is added to the feature vector of the sequencing read and used as input to the self-attention mechanism to preserve the relative order information of each sequencing read within the window. In the spatial branch, the self-attention mechanism performs a dot product operation on the query vector, key vector, and value vector of the sequencing read. The query vector and key vector are used to calculate the attention weight allocation, and the value vector is used for feature weighted aggregation according to the attention weights. The spatial branch includes a multi-head self-attention module. Each attention head calculates the inter-read association weights in different feature subspaces along the sequencing read dimension. The outputs of each attention head are concatenated along the channel dimension and then linearly transformed to generate inter-read association features.
[0019] The temporal branch employs dilated convolution along the window length dimension to process the four-dimensional feature tensor. Dilated convolution expands the receptive field by inserting zeros between elements of the convolution kernel, capturing sequence context dependencies across different genomic distances without increasing the number of parameters. The temporal branch contains multiple dilated convolutional layers, with the expansion rate of each layer increasing sequentially along the hierarchy, extracting context dependencies from near to far genomic distances. Each dilated convolutional layer sequentially extracts context features corresponding to its genomic distance along the window length dimension, and the outputs of each dilated convolutional layer are summed element-wise to generate the sequence context features. Before element-wise summation, the outputs of each dilated convolutional layer are batch normalized to ensure that the outputs of each layer have the same dimensions and distribution range. This approach can simultaneously capture fine features of locally neighboring bases and global features of distant bases, enhancing the model's ability to perceive variation patterns at different scales.
[0020] Before dimensionality reduction by a fully connected layer after concatenating inter-segment association features and sequence context features, a gated fusion mechanism is used to calculate the dynamic fusion weights of the inter-segment association features and sequence context features. The gated fusion mechanism maps the concatenated joint features to a dynamic fusion weight vector with values between 0 and 1 using a sigmoid activation function. Each element in the dynamic fusion weight vector controls the relative contribution ratio of the inter-segment association features and sequence context features at the same channel position. The inter-segment association features are multiplied element-wise by the dynamic fusion weight vector, and the sequence context features are multiplied element-wise by the difference between the all-1 vector and the dynamic fusion weight vector. The two weighted results are then summed element-wise to obtain the fused feature vector before dimensionality reduction by the fully connected layer. This gated fusion mechanism ensures a balanced contribution of the two features during the fusion process, avoiding information overload caused by simple concatenation. The fused feature vector is then input into the fully connected layer for dimensionality reduction. The fully connected layer maps the high-dimensional fused features to a low-dimensional compact vector, resulting in the fused encoding vector at the center of the current window. The window center position refers to the midpoint of the sliding window on the reference genome coordinates, and all subsequent predictions are based on this center position.
[0021] S4. Input the fused encoding vector into the classification prediction head and the regression prediction head. The classification prediction head outputs the probability that the center position belongs to a single nucleotide variant, insertion / deletion, deletion-type structural variant, or duplication-type structural variant. The regression prediction head outputs the left offset and right offset relative to the center position.
[0022] Specifically, the fused encoding vector is simultaneously input into both the classification and regression prediction heads, which operate in parallel. The classification prediction head comprises two fully connected layers and a Softmax activation function. The first fully connected layer performs a linear transformation and non-linear activation on the fused encoding vector. The second fully connected layer maps the activated features into a four-dimensional fractional vector. The Softmax activation function converts this four-dimensional fractional vector into a probability distribution, corresponding to the probability that the center position belongs to a single nucleotide variant, insertion / deletion, deletion-type structural variant, or duplication-type structural variant, respectively. A single nucleotide variant refers to a variant in which a single base in the genome is replaced by another base. An insertion / deletion refers to a variant in which a small number of bases are inserted or deleted in the genome. A deletion-type structural variant refers to a deletion event in a large segment of the genome. A duplication-type structural variant refers to a duplication event in a large segment of the genome.
[0023] The regression prediction head consists of three fully connected layers, with the last fully connected layer outputting two regression values. The first two fully connected layers perform layer-by-layer linear transformations and non-linear activations on the fused encoding vector, progressively extracting features related to location offsets. The third fully connected layer maps the extracted features to two scalar values, serving as the left and right offsets, respectively. After outputting the two scalar values, the third fully connected layer performs a non-linear transformation using the ReLU activation function, truncating negative values to zero to ensure that both the left and right offsets are non-negative. The left offset represents the relative distance from the center of the window to the start of the predicted mutation interval, and the right offset represents the relative distance from the center of the window to the end of the predicted mutation interval. Both the left and right offsets are non-negative, and the right offset is greater than the left offset to ensure that the predicted mutation interval has a positive width. By separating the classification and regression task branches, mutation type identification and mutation location localization are optimized respectively, reducing interference between tasks.
[0024] S5. Determine the mutation type of the center position based on the highest probability. When the mutation type is a single nucleotide mutation or insertion / deletion, correct the center position coordinates using left and right offsets. When the mutation type is a deletion structural mutation or a duplication structural mutation, calculate the mutation start coordinates and end coordinates using left and right offsets respectively, and output a list of mutation sites.
[0025] Specifically, the probabilities of the four variant types output by the classification prediction head are compared, and the variant type with the highest probability is taken as the predicted variant type at the center position. When the predicted variant type is a single nucleotide variant or insertion / deletion, the variant interval is relatively short, and the center position coordinates are directly corrected using left and right offsets: the corrected starting coordinates are obtained by subtracting the left offset from the center position coordinates, and the corrected ending coordinates are obtained by adding the right offset to the center position coordinates. When the predicted variant type is a deletion or duplication structural variant, the variant interval is relatively long, and the starting and ending coordinates of the variant are calculated using left and right offsets respectively: the starting coordinates are the window center position coordinates minus the left offset, and the ending coordinates are the window center position coordinates plus the right offset.
[0026] Before outputting the list of variant sites, candidate variant sites are screened and merged. The central location is selected based on the variant type with the highest probability; if the highest probability is lower than the confidence threshold, the variant site corresponding to that central location is removed. The confidence threshold is dynamically adjusted by the coverage depth of the sequencing reads within the window: higher coverage depth indicates more reliable sequencing data quality, and a higher confidence threshold is set; lower coverage depth indicates less stable sequencing data quality, and a lower confidence threshold is set to balance the detection rate and false positive rate.
[0027] It should be noted that the confidence threshold is determined in the following way: when the coverage depth is greater than the third depth threshold, the confidence threshold is set to the first threshold; when the coverage depth is less than the fourth depth threshold, the confidence threshold is set to the second threshold, and the first threshold is greater than the second threshold; when the coverage depth is between the third depth threshold and the fourth depth threshold, the confidence threshold increases linearly from the second threshold to the first threshold as the coverage depth increases.
[0028] For variant sites selected through confidence threshold screening, those with overlapping or adjacent coordinates and the same variant type are further merged and output as a single variant event. Coordinate overlap refers to the intersection of the coordinate intervals of two variant sites. Coordinate adjacency means the interval between the coordinate intervals of two variant sites is less than a predetermined interval threshold, which is less than the window length. The predetermined interval threshold is dynamically determined based on the variant type: when the variant type is a single nucleotide variant or insertion / deletion, the predetermined interval threshold is set to the first interval value; when the variant type is a deletion or duplication structural variant, the predetermined interval threshold is set to the second interval value, which is greater than the first interval value. Through the above screening and merging, duplicate reports and false positive results are reduced, and a final list of variant sites is output. Each record in the variant site list contains the genomic coordinates of the variant site, the variant type, and the predicted probability.
[0029] During the training phase, the classification and regression prediction heads employ a joint constraint loss function for multi-task optimization. This joint constraint loss function includes three terms: classification loss, regression loss, and interval consistency regularization. The classification loss uses the cross-entropy loss function to measure the difference between the probability distribution output by the classification prediction head and the true variant type label. The regression loss uses the smoothed L1 loss function to measure the difference between the left and right offsets output by the regression prediction head and the true offset. When the center position is within a non-variable region, the true values of both the left and right offsets are set to zero. When the center position is within a variable region, the true value of the left offset is the distance from the center position to the start of the mutation, and the true value of the right offset is the distance from the center position to the end of the mutation. The interval consistency regularization term constrains the relationship between the left and right offsets. For any variable region center position, the difference between the right offset and the left offset represents the width of the predicted mutation interval. The interval consistency regularization term imposes a minimum width constraint on the difference. When the predicted variation interval width is less than a preset positive threshold, the regularization term is positive, generating a penalty signal; when the predicted variation interval width is greater than or equal to the preset positive threshold, the regularization term is zero, and no penalty signal is generated. The classification loss, regression loss, and interval consistency regularization term are multiplied by their respective weight coefficients and then summed to obtain the joint constraint loss function value. By minimizing the joint constraint loss function value, the classification and regression tasks are optimized simultaneously, and the physical rationality of the predicted variation interval is constrained, preventing logically contradictory boundary positions in the regression prediction head output.
[0030] The technical solution of this embodiment aligns the sequencing reads of the sample to be tested to the reference genome and extracts local features, stacking them into a four-dimensional feature tensor. It uses the self-attention mechanism in the dual-branch coding network to capture the inter-read association features and the dilated convolution to capture the sequence context features. The fused coding vector is input into the classification prediction head and the regression prediction head to identify the variant type and correct the position offset. This solves the problems of insufficient recognition accuracy when facing structural variants and low-frequency mutations, and the difficulty in adaptively learning the differences in variant patterns of different samples, which are caused by the reliance on manually designed feature rules in traditional methods. It achieves unified recognition of single nucleotide variants, insertions and deletions, deletion-type structural variants and duplication-type structural variants, and improves the accuracy of variant site localization and the generalization ability of the model on whole-genome-scale data.
[0031] In one alternative approach, after parsing the number of mismatched bases, inserted bases, and deleted bases of each sequencing read relative to the reference genome from the CIGAR string, the number of mismatched bases, inserted bases, deleted bases, and the mapped quality value of the sequencing read are used as additional channel features, which together with the base subsequence and the quality value subsequence constitute local features.
[0032] Among the above optional methods, the number of mismatched, inserted, and missing bases and the mapping quality value obtained from CIGAR string parsing are further incorporated into the local features, which enriches the feature expression dimension, enables the model to capture mutation signals from the comparison level, reduces misjudgment caused by insufficient single base information, and improves the ability to identify complex mutation patterns.
[0033] In one alternative approach, the window length of the sliding window is dynamically determined by the GC content distribution of the reference genome and remains constant within the same window. The step size between two adjacent sliding windows is set to half the window length, and the step size decreases as the coverage depth of the sequencing reads within the window increases. The step size is adaptively determined as follows: when the coverage depth of the sequencing reads within the window is greater than a first depth threshold, the step size is set to one-quarter of the window length; when the coverage depth is less than a second depth threshold, the step size is set to half the window length; when the coverage depth is between the first and second depth thresholds, the step size decreases linearly from one-quarter to one-half of the window length as the coverage depth increases.
[0034] In the above-mentioned optional methods, the sliding window length is further dynamically adjusted according to the GC content distribution of the reference genome, and the window step size is adaptively adjusted according to the sequencing read coverage depth, so that the window division is more in line with the local characteristics of the genome, reducing redundant calculations while maintaining detection resolution, and balancing recognition accuracy and processing speed.
[0035] In one alternative approach, the four dimensions of the four-dimensional feature tensor correspond to the genomic location index within the window, the sequencing read index covering the same genomic location, the base sequence length channel, and the combined feature channel, respectively. The combined feature channel is obtained by concatenating base subsequences, quality value subsequences, the number of mismatched bases, the number of inserted bases, the number of missing bases, and the mapped quality value along the feature dimensions.
[0036] Among the above optional methods, the physical meaning of each dimension of the four-dimensional feature tensor and the composition of the combined feature channels are further clarified. The base sequence, quality value and alignment statistics are sequentially spliced along the feature dimensions to form a structured input representation, which facilitates the direct reading and processing of multi-source heterogeneous information by the dual-branch coding network.
[0037] In one alternative approach, before inputting the four-dimensional feature tensor into the dual-branch coding network, the four-dimensional feature tensor is truncated or zero-padded along the base sequence length channel so that each sequencing read covering the same window has the same length in the base sequence length channel; and the feature components in the combined feature channel are standardized by standard scores.
[0038] In the above-mentioned optional methods, the base sequence length of each sequencing read within the same window is further unified by sequence truncation or zero padding, and the standard scores of each component of the combined feature channel are standardized to eliminate interference caused by differences in dimensions, ensure consistent distribution of input data, and make the network training process more stable.
[0039] In one alternative approach, before dimensionality reduction by a fully connected layer after concatenating the inter-segment association features and sequence context features, a gated fusion mechanism is used to calculate the dynamic fusion weights of the inter-segment association features and sequence context features. The dynamic fusion weights are determined by the following formula: in, This represents the feature vector indicating the correlation between reading segments. Represents the sequence context feature vector. This represents the concatenated vector obtained by concatenating two feature vectors along the channel dimension. and These are the gate weight matrix and the gate bias vector, respectively. This represents the Sigmoid activation function. Represents the dynamic fusion weight vector. This represents a vector of all ones with the same dimension as the dynamically fused weight vector. This represents element-wise multiplication. This represents the fused feature vector before dimensionality reduction of the fully connected layer.
[0040] Among the above-mentioned optional methods, a gating fusion mechanism is further introduced before feature splicing and dimensionality reduction. The fusion weights are dynamically allocated based on the importance of inter-segment correlation features and sequence context features to avoid information overload caused by simple splicing. This ensures that the two features contribute in a balanced manner during the fusion process and enhances the expressive power of the encoding vector.
[0041] In one alternative approach, when the fused encoding vector is input into the classification prediction head and the regression prediction head, the classification prediction head contains two fully connected layers and a Softmax activation function, and the regression prediction head contains three fully connected layers, with the last fully connected layer outputting two regression values as the left offset and the right offset, respectively.
[0042] Among the above optional methods, the classification prediction head is further limited to using two fully connected layers combined with the Softmax activation function to output the mutation type probability, and the regression prediction head uses three fully connected layers to output the position offset. By separating the task branches, the classification and regression targets are optimized respectively, reducing interference between tasks and improving prediction accuracy.
[0043] In one alternative approach, during the training phase, when the center position is in a non-mutated region, the regression targets for both the left and right offsets are set to zero; when the center position is in a mutated region, the regression target for the left offset is the distance from the center position to the mutation start position, and the regression target for the right offset is the distance from the center position to the mutation end position.
[0044] In the above-mentioned optional methods, the offset regression target is further set to zero in the non-variable region and set to the actual distance to the variability boundary in the variable region. This provides a clear positional supervision signal for the regression prediction head, enabling the model to learn the mapping relationship from the window center to the true variability boundary and improve the positioning accuracy.
[0045] In an alternative approach, the classification and regression prediction heads are optimized for multi-task using a joint constraint loss function. This joint constraint loss function includes an interval consistency regularization term to constrain the magnitude relationship between the left and right offsets. The joint constraint loss function is determined by the following formula: in, This represents the value of the joint constraint loss function. The cross-entropy loss represents the relationship between the probability output by the classification prediction head and the true variant type label. This represents the smoothed L1 loss between the left and right offsets of the regression prediction head output and the true offset. This represents a range consistency regularization term. and Let be positive real numbers, representing the regression loss weight and the regularization term weight, respectively. This represents the total number of center positions of the mutated regions in the current training batch and It is a positive integer. This represents the index indicating the center position of the mutated region in the current training batch. Indicates the first The predicted left offset value at each center position. Indicates the first The predicted right offset value at each center position. This is a preset positive threshold value, representing the minimum width constraint of the prediction interval. This represents the function that takes the maximum value when... Greater than or equal to The time interval consistency regularization term takes a value of zero.
[0046] In the above-mentioned optional methods, an interval consistency regularization term is further introduced into the joint constraint loss function to constrain the left offset and the right offset to maintain a reasonable size relationship, prevent logical contradictions in the boundary positions of the regression prediction head output, ensure that the predicted variation interval has physical meaning, and improve the synergy of multi-task training.
[0047] In one alternative approach, before outputting the list of variant sites, the center position is selected based on the variant type corresponding to the highest probability. When the highest probability is lower than the confidence threshold dynamically adjusted by the sequencing read coverage depth within the window, the variant site corresponding to the center position is removed. Variants with overlapping or adjacent coordinates and the same variant type are merged and output as the same variant event.
[0048] In the above-mentioned optional methods, the confidence threshold is further dynamically adjusted based on the sequencing read coverage depth within the window to filter candidate sites with low confidence and merge similar variant events with overlapping or adjacent coordinates, thereby reducing duplicate reports and false positive results and making the final output list of variant sites more concise and reliable.
[0049] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for identifying and predicting genome-wide variant sites based on deep learning, characterized in that, include: The sequencing reads of the sample to be tested are aligned to the reference genome to generate the alignment coordinates, CIGAR string and base quality value of each sequencing read; A fixed-length sliding window is moved along the reference genome, and local features of each sequencing read covering the sliding window are extracted within each window. The local features of each sequencing read are sorted according to the alignment coordinates and stacked into a four-dimensional feature tensor. The four-dimensional feature tensor is input into a dual-branch coding network, which includes a spatial branch and a temporal branch. The spatial branch uses a self-attention mechanism to generate inter-read association features along the sequencing read dimension, and the temporal branch uses dilated convolution to generate sequence context features along the window length dimension. The inter-read association features and the sequence context features are concatenated and then dimensionality reduced by a fully connected layer to obtain the fused coding vector at the center position of the current window. The fused encoding vector is input into the classification prediction head and the regression prediction head. The classification prediction head outputs the probability that the center position belongs to a single nucleotide variant, insertion / deletion, deletion-type structural variant, or duplication-type structural variant. The regression prediction head outputs the left offset and the right offset relative to the center position. The mutation type of the center position is determined based on the highest probability. When the mutation type is a single nucleotide variant or insertion / deletion, the center position coordinates are corrected using the left and right offsets. When the mutation type is a deletion or duplication, the mutation start and end coordinates are calculated using the left and right offsets, respectively, and a list of mutation sites is output.
2. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 1, characterized in that, After parsing the number of mismatched bases, inserted bases, and deleted bases of each sequencing read relative to the reference genome from the CIGAR string, the number of mismatched bases, the number of inserted bases, the number of deleted bases, and the mapped quality value of the sequencing read are used as additional channel features, which together with the base subsequence and the quality value subsequence constitute the local features.
3. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 2, characterized in that, The window length of the fixed-length sliding window is dynamically determined by the GC content distribution of the reference genome and remains unchanged within the same window; the step size between two adjacent sliding windows is set to half of the window length, and the step size decreases as the sequencing read coverage depth within the window increases.
4. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 3, characterized in that, The four dimensions of the four-dimensional feature tensor correspond to the genomic location index within the window, the sequencing read index covering the same genomic location, the base sequence length channel, and the combined feature channel, respectively. The combined feature channel is obtained by concatenating the base subsequence, the quality value subsequence, the number of mismatched bases, the number of inserted bases, the number of missing bases, and the mapped quality value along the feature dimensions.
5. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 4, characterized in that, Before inputting the four-dimensional feature tensor into the dual-branch coding network, the four-dimensional feature tensor is truncated or zero-padded along the base sequence length channel so that each sequencing read covering the same window has the same length in the base sequence length channel; and the feature components in the combined feature channel are standardized by standard scores.
6. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 5, characterized in that, Before dimensionality reduction by a fully connected layer after concatenating the inter-segment correlation features and the sequence context features, a gated fusion mechanism is used to calculate the dynamic fusion weights of the inter-segment correlation features and the sequence context features. The dynamic fusion weights are determined by the following formula: in, This represents the feature vector indicating the correlation between the read segments. This represents the sequence context feature vector. This represents the concatenated vector obtained by concatenating two feature vectors along the channel dimension. and These are the gate weight matrix and the gate bias vector, respectively. This represents the Sigmoid activation function. This represents the dynamic fusion weight vector. This represents a vector of all 1s with the same dimension as the dynamically fused weight vector. This represents element-wise multiplication. This represents the fused feature vector before dimensionality reduction of the fully connected layer.
7. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 6, characterized in that, When the fused encoding vector is input into the classification prediction head and the regression prediction head, the classification prediction head contains two fully connected layers and a Softmax activation function, and the regression prediction head contains three fully connected layers, with the last fully connected layer outputting two regression values as the left offset and the right offset, respectively.
8. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 7, characterized in that, During the training phase, when the center position belongs to the non-mutated region, the regression targets for both the left offset and the right offset are set to zero; when the center position belongs to the mutated region, the regression target for the left offset is the distance from the center position to the mutation start position, and the regression target for the right offset is the distance from the center position to the mutation end position.
9. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 8, characterized in that, The classification prediction head and the regression prediction head are optimized for multi-task using a joint constraint loss function. The joint constraint loss function includes an interval consistency regularization term used to constrain the magnitude relationship between the left and right offsets. The joint constraint loss function is determined by the following formula: in, This represents the value of the joint constraint loss function. This represents the cross-entropy loss between the probability output by the classification prediction head and the true variant type label. This represents the smoothed L1 loss between the left and right offsets output by the regression prediction head and the true offset. This represents the interval consistency regularization term. and Let be positive real numbers, representing the regression loss weight and the regularization term weight, respectively. This represents the total number of center positions of the mutated regions in the current training batch and It is a positive integer. This represents the index indicating the center position of the mutated region in the current training batch. Indicates the first The predicted left offset value at each center position. Indicates the first The predicted right offset value at each center position. This is a preset positive threshold value, representing the minimum width constraint of the prediction interval. This represents the function that takes the maximum value when... Greater than or equal to The interval consistency regularization term is set to zero at that time.
10. The method for identifying and predicting genome-wide variant sites based on deep learning according to claim 9, characterized in that, Before outputting the list of variant sites, the center position is filtered according to the variant type corresponding to the highest probability. When the highest probability is lower than the confidence threshold dynamically adjusted by the sequencing read coverage depth within the window, the variant site corresponding to the center position is removed. Variants with overlapping or adjacent coordinates and the same variant type are merged and output as the same variant event.
