A deep learning-based method for detecting recurrent copy number variations of gene segments

By transforming genomic copy number data into a structured representation using deep learning methods, and utilizing multi-scale sliding windows and multi-branch convolutional neural networks, the problem of existing technologies being unable to identify copy number variations of different lengths is solved, achieving more stable detection results.

CN122157766APending Publication Date: 2026-06-05RES & DEV INST OF NORTHWESTERN POLYTECHNICAL UNIV IN SHENZHEN

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RES & DEV INST OF NORTHWESTERN POLYTECHNICAL UNIV IN SHENZHEN
Filing Date
2026-03-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing recurrent copy number variant detection technologies struggle to simultaneously identify both long arm-level and short focal copy number variants, and traditional statistical models are prone to producing false positives when faced with complex nonlinear patterns and noisy cancer genomic data.

Method used

A deep learning-based approach is used to transform genomic copy number data into a structured representation suitable for deep neural network processing. End-to-end training is performed using multi-scale sliding window sampling and multi-branch convolutional neural networks to achieve automatic identification of recurrent copy number variations.

Benefits of technology

Within the same framework, it can detect both arm-level and focal recurrent copy number variations, reducing false positive results, improving the adaptability and consistency of the test, resulting in more stable output results and reducing the need for manual post-processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157766A_ABST
    Figure CN122157766A_ABST
Patent Text Reader

Abstract

The application provides a gene fragment recurrent copy number variation detection method based on deep learning, which comprises the following steps: (1) grouping, classifying and performing numerical conversion preprocessing on obtained gene data; (2) performing data modeling on the preprocessed data, and converting the original segmented data into a matrix form; (3) performing multi-scale sliding window sampling on the obtained matrix to obtain a data set; (4) performing data set labeling according to the visual features of the data; (5) training a constructed neural network by using the labeled data set; and (6) collecting gene data, inputting the gene data into the trained neural network after processing through steps (1)-(3), and outputting a recurrent copy number variation region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of recurrent copy number variation detection technology, specifically relating to a deep learning-based method for detecting recurrent copy number variations in gene fragments. Background Technology

[0002] Existing techniques for identifying recurrent CNAs mainly rely on statistical frameworks. Early techniques focused on identifying recurrent breakpoints or common overlapping regions based on frequency and amplitude thresholds. These methods laid the foundation for industry-standard tools such as GISTIC2.0[1] and RUBIC[4], among which GISTIC2.0 is more authoritative and representative. This tool identifies statistically significant change peaks by simultaneously assessing the frequency and amplitude of anomalous events. Specifically, for each location on the genome (in practice, in terms of genes or markers), GISTIC2 mainly considers two factors: frequency, i.e. how many samples have amplification or deletion at that location; and amplitude, i.e. how “deep / high” these amplifications / deletions are on the log2ratio. The motivation is that the real driving events are often not only “common” but also “more significant”, such as high amplification and homozygous deletion, while a large number of passenger events may have a high frequency but shallow amplitude and more random distribution; GISTIC2 has constructed an index G-score to comprehensively consider these two factors. This value is influenced by both frequency and amplitude and is used to distinguish targets by thresholds. Furthermore, due to the strong chromosomal instability in tumor samples, which can lead to a large number of false positives, GISTIC2 uses an empirical / permutation-based background estimation approach to screen for false positives: it retains the CNV structural features of each sample, such as the number of events, amplitude distribution, and fragment length scale, and generates the distribution of G-scores under the condition of "only background, no real selection driver" by "rearranging / randomizing" the positions of these events on the genome. This distribution is then used as the background distribution to calculate the p-value of the true G-score, followed by multiple validation to obtain the q-value, which is used as the standard to screen and remove false positives. RUBIC's assumptions and basic idea are similar, but its implementation introduces the observation of input segment endpoints. Areas with denser endpoint distribution are more likely to be endpoints of potentially recurrent CNAs (CopyNumber Alterations) regions. These endpoints are then combined into fragments. Compared to GISTIC2.0, which processes input data only on a segment basis, it can better handle input data with fragmentation and significant overlap.

[0003] In practical use, GISTIC2 and RUBIC exhibit significantly different interval granularity in their detection results: GISTIC2 tends to output fewer but more continuous peak intervals, while RUBIC outputs more and shorter candidate fragments. This difference is not random fluctuation, but mainly stems from their different modeling objectives: GISTIC2 evaluates statistical significance based on "amplified / deleted regions with cross-sample duplication" and provides a more robust definition of widepeaks for segment boundary errors, thus tending to form continuous and longer peak regions; in contrast, RUBIC targets "breakpoints with cross-sample duplication," and breakpoint-driven interval construction is more likely to produce focal and fragmented significant fragments, thus exhibiting a "numerous and short" output. Copy number variation regions themselves have diversity in length. Related studies generally divide CNA regions into two categories: arm_level (longer in length, close to the length of chromosome arms) and focal (focal, shorter in length), which often play different roles in genetic mechanisms. Clearly, these two mainstream tools cannot simultaneously identify both types of targets. This dichotomy forces researchers to rely on ensemble methods or manual screening to obtain a more complete genomic picture. Furthermore, traditional statistical models often struggle to cope with the highly "noisy" nature of cancer genomic data, and complex nonlinear patterns and boundary effects can easily lead to false positives or fragmented detection conclusions. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing recurrent copy number variation (CNV) detection technologies by proposing a deep learning-based method for detecting CNVs in gene fragments. This method overcomes the limitations of traditional statistical methods in terms of model assumptions, detection scale, and complex pattern expression. The invention proposes a method that transforms genomic copy number data into a structured representation suitable for deep neural network processing, and automatically identifies CNVs through an end-to-end trained deep learning model. This method jointly models the continuity, local morphology, and cross-sample consistency of copy number variations in genomic space, enabling the model to simultaneously capture large-scale continuous variations and small-scale focal abnormalities. This allows the detection of both arm-level and focal CNVs within the same framework.

[0005] To achieve the above objectives and solve the aforementioned technical problems, this invention proposes a method for detecting recurrent copy number variations in gene fragments based on deep learning. This method includes the following steps:

[0006] (1) The acquired gene data were preprocessed by grouping, classifying and numerical transformation;

[0007] (2) Perform data modeling on the preprocessed data to convert the original segmented data into matrix form;

[0008] (3) Perform multi-scale sliding window sampling on the obtained matrix to obtain the dataset;

[0009] (4) Label the dataset based on the visual features of the data;

[0010] (5) Train the constructed neural network using the labeled dataset;

[0011] (6) Collect gene data, process it through steps (1) to (3), input it into the trained neural network, and output the recurrent copy number variation region.

[0012] Furthermore, in step (1), the original input for obtaining gene data is a copy number variation segment file, which contains at least 5 columns of data: sample number, column name is arbitrary, type is string; chromosome number, column name is Chromosome, type is string, format is optional chr prefix and chromosome number; fragment start position, column name is Start, type is integer; fragment end position, column name is End, type is integer; copy number, column name is CopyNumber, type is integer or floating point number.

[0013] Furthermore, in step (1), the specific methods for grouping, classifying, and numerically transforming the acquired gene data are as follows:

[0014] First, the data is grouped by chromosome, meaning data from different chromosomes are cached in separate files. Chromosomal targets are categorized into copy number deletion variants (copy number c less than the normal value of 2) and copy number amplification variants (copy number c more than the normal value of 2). In the case of copy number deletion variants, fragments with copy numbers greater than 2 are filtered out and deleted, and the copy number of the remaining data items is replaced with the absolute value of the difference between the original value and 2, so that the copy number value correctly reflects the extent of deletion during subsequent data overlay and compression. No processing is performed in the case of amplification.

[0015] Furthermore, the specific method for step (2) is as follows:

[0016] (2.1) Suppose that the input dataset contains N samples S1-S N For any chromosome chr, collect the start and end genomic coordinates of all samples on that chromosome, i.e., the contents of the Start and End columns in the input data, to form a genomic coordinate set P. chr ={Start1~Start N End1~End N}; Sort and remove duplicates from this set to obtain an ordered sequence B composed of genomic coordinates. chr ={b1,b2,…,b M},bi <b i+1 For any two adjacent genomic coordinates b in the sequence i and b i+1 form a genomic interval, dividing the chromosome into M - 1 consecutive and non - overlapping genomic intervals;

[0017] (2.2) For sample S i , construct an array containing M - 1 elements to store the copy numbers of sample S i in the M - 1 genomic intervals obtained in step (2.1) as follows:

[0018] For any segment (Start, End, c) in sample S i , match the ordered sequence B chr , determine the covered genomic intervals p~q, and set the corresponding elements x[p]~x[q] in the array to c, where c is the copy number; for the genomic intervals not covered by any segment of sample S i , set the corresponding array values to a constant value c0 = 2, which is used to represent the state of no copy number variation. After the above processing, sample S i obtains an array containing M - 1 elements ;

[0019] (2.3) After performing step (2.2) on all samples, multiple equally - long arrays containing M - 1 elements are obtained: { }, and the arrays obtained from all samples are concatenated by taking each array as a row of a matrix to form an N - row M - 1 - column matrix , where each row of this matrix stores all the copy number information of a certain sample on this chromosome;

[0020] (2.4) To ensure the consistency of the input dimension of the deep - learning model, convert the matrix obtained in (2.3) into a K - row M - 1 - column matrix with a fixed number of rows K. According to the cases where the number of rows N of the matrix obtained in (2.3) is greater than K and less than K, the matrix is processed as follows:

[0021] When N < K, supplement K - N rows of padding arrays in the matrix X (chr) to fill the original matrix into a K - row M - 1 - column matrix; all values in the padding rows are the constant c0 = 2, indicating no variation;

[0022] When N > K, process the arrays exceeding the row - number limit according to the cyclic merging strategy, specifically as follows:

[0023] For the (K + q)-th row array Merge it with the array in row ((qmodK)+1) by averaging the nth elements of the two arrays and using the average of the nth elements of the merged matrix.

[0024] After completing the above steps, the resulting matrix is ​​standardized by row to obtain a matrix with a fixed number of K rows.

[0025] Furthermore, the method for step (3) is as follows:

[0026] After processing the data of each chromosome in step (3), a K-row, M-1-column matrix is ​​obtained. Three sampling matrices with different column numbers but the same row number are then taken, symmetrical to each column of this matrix. For cases where a sampling matrix cannot be obtained with the boundary column as the center of symmetry, the missing data in the sampled matrix is ​​filled along the row direction, with each row filled with the mean of that row in the original matrix. For example, 50, 250, or 2000 columns can be selected.

[0027] Furthermore, the method for step (4) is as follows:

[0028] When constructing the dataset, each column of the chromosome matrix obtained in step (3) is labeled as a positive or negative example, resulting in a labeled array containing M-1 elements. The specific method is as follows:

[0029] For each sampling matrix, the matrix is ​​first summed along the column direction to compress it into a one-dimensional copy number array along the row direction. A window with a width of 10% of the array width is then taken as the center window, centered on the array's center element. To prevent the center signal from leaking into the background estimation, a window with a width of 20% of the array width is taken as the guard window, centered on the array's center element. The areas on either side of the guard window are defined as the background region. The average copy number within the center window is then calculated. This average is subtracted from the median copy number of the background region to obtain the final result, which is then normalized using the median absolute deviation of the background region. Finally, the sigmoid function is used to transform the result into probability space to obtain the center contrast index, which measures the prominence of the center position relative to background fluctuations. For the three sampling matrices corresponding to a column of the chromosome matrix, the index is calculated for each sampling matrix, and the maximum of the three is taken as the index for that column of the chromosome matrix.

[0030] When labeling positive examples in a dataset, select columns with an index > 0.5 as positive examples.

[0031] For the selection of negative examples, columns with the above indicators <0.5 are considered negative examples. However, since the number of negative examples is significantly greater than that of positive examples in reality, in order to avoid the impact of class imbalance on model performance, in actual model training, an equal number of negative examples are randomly selected from the negative examples as the negative examples that actually participate in model training, while all positive examples participate in training.

[0032] Furthermore, the method for step (5) is as follows:

[0033] This invention designs and employs a multi-stream convolutional neural network as a discriminant model in the detection of recurrent copy number mutations. The model contains a multi-input branch structure, with each branch corresponding to the three sampling matrices obtained by processing each column of the matrix in step (4). It can perform parallel feature extraction on multiple sampling matrices from step (4) and use an attention mechanism to achieve cross-branch information fusion, ultimately outputting the confidence score.

[0034] Model Input and Output: The model input consists of three sampling matrices obtained from sampling a certain column of the matrix in step (4), and the model output is: in This is a single logit value for each sample; during the inference phase, the logit can be converted into the final output confidence score using the Sigmoid function. A confidence score greater than or equal to 0.5 indicates that the column is within the recurrent copy number variation region, while a confidence score less than 0.5 indicates that it is not within the recurrent copy number variation region.

[0035] The model's first layer structure is a multi-branch feature extraction module: this module uses a convolutional feature extraction branch with the same structure for each matrix input. Extracting feature vectors ,in, This refers to the input branch matrix, where d=256 is the feature dimension, B is the batch size, and j is the branch number. Specifically, they include, in order:

[0036] (1) Depthwise Separable 2D Convolution is used to reduce computation and enhance local pattern modeling capabilities: First, a depthwise separable 2D convolution operation is performed on the input matrix, where the depthwise convolution performs local convolution on each channel along the spatial dimension to extract local change patterns between adjacent genomic regions; then, the channel information is linearly combined through pointwise convolution.

[0037] (2) Batch normalization and ReLU activation: Batch normalization is performed on the convolution output to alleviate the training instability caused by the difference in numerical distribution between different samples. The nonlinear expression capability is introduced through the ReLU nonlinear activation function, so that the model can characterize the nonlinear and asymmetric pattern features in the copy number variation.

[0038] (3) Max Pooling for downsampling: The feature map is downsampled by the max pooling operation, which compresses the spatial dimension and expands the receptive field, thereby enhancing the model’s ability to perceive regions with large-scale continuous copy number changes, while suppressing the influence of local noise on feature representation.

[0039] (4) Second-level residual convolutional blocks to enhance gradient propagation and multi-scale feature representation: multiple residual convolutional blocks are concatenated on the downsampled feature map. Each residual block adds the input feature to the convolutional transformed feature through skip connections. While maintaining feature continuity, higher-level and more abstract spatial pattern information is gradually extracted.

[0040] (5) The EfficientChannelAttention (ECABlock) module adaptively recalibrates the importance of channels: After the residual features are extracted, the EfficientChannelAttention module is introduced to adaptively weight the features of each channel. This module evaluates the importance of different channels in the current sample through global statistical information, thereby strengthening the feature channels that are highly correlated with recurrent copy number variations and suppressing the influence of redundant or noisy channels.

[0041] (6) Adaptive global average pooling and flattening: The weighted feature map is subjected to adaptive global average pooling to compress the spatial dimension to a fixed size, thereby obtaining a global description of the overall distribution features of the input matrix; then the result is flattened to form a one-dimensional feature vector representation.

[0042] (7) Fully connected mapping yields a fixed-dimensional embedding vector h. j The one-dimensional feature vector is mapped to an embedding space of a preset dimension through a fully connected layer, resulting in the feature representation h of the corresponding input branch. j This is used for subsequent cross-branch fusion and classification.

[0043] The second layer is a cross-branch fusion module, which fuses the features extracted from each branch in the first layer to obtain the fused intermediate features. The outputs of each branch in the previous layer are stacked according to the branch dimension to obtain the feature sequence. M represents the total number of branches, with a value of 3. Multi-head self-attention is used to model H to obtain A, in order to learn the correlation and complementary information between different branches. Subsequently, a Transformer residual structure is used for stable training and nonlinear enhancement: the input feature H and the attention output A are added to the residual and normalized to obtain Z1=LayerNorm(H+A). Then, Z1 is nonlinearly transformed through a position-wise feedforward network FFN, and the transformation result is added to the residual of Z1 and normalized to obtain Z2=LayerNorm(Z1+FFN(Z1)).

[0044] The third layer is the pooling and classification head, which transforms the intermediate features output from the second layer into a probability distribution. Specifically, it first performs mean pooling along the branch dimension on the fused sequence features to obtain the global representation. And input it into the multilayer perceptron classification head to output a single logit: The logit is ultimately converted into a confidence score by the Sigmoid function. As the final output of the model.

[0045] Furthermore, in step (5):

[0046] This invention employs Binary Cross-Entropy with Logits Loss (BCE with Logits Loss) for supervised learning of the model output and labels; it optimizes the storage and computational resource consumption of training by using automatic mixed precision and dynamic loss scaling, and prunes the gradients to a ℓ2 norm not exceeding 0.9; the optimizer uses Adam, with an initial learning rate set to 1×10⁻⁶. -5 The weight decays to 3×10 -2 To dynamically adjust the learning rate, a performance-driven decay scheduler (ReduceLROnPlateau) is introduced to monitor the validation set loss, with a decay factor of 0.5 and a minimum learning rate of 1×10⁻⁶. -7 Each training session runs for 50 rounds, with a batch size of 8.

[0047] During the evaluation phase, leave-one-out cross-validation across datasets was used to verify the rationality and generalization of the scheme, while k-fold cross-validation was used when training the final model. Based on the validation set AUC (area under the ROC curve (recall-false positive rate)), the optimal model weights were selected, and the AUC, F1 score (a combined metric of precision and recall), accuracy, and precision and recall were reported on the leave-out items. Simultaneously, an ROC curve was plotted based on the validation prediction results to evaluate the model's discriminative ability. Both positive and negative samples used in training and validation followed the aforementioned labeling strategy; their specific quantities are detailed in Tables 1 and 2.

[0048] Furthermore, the method for step (6) is as follows:

[0049] For the collected gene data, after obtaining a chromosome matrix in step (2), each column of the chromosome matrix is ​​traversed and a set of sampling matrices obtained by sampling each column in step (3) is input into the neural network model in step (5) for processing. After processing each column, a confidence sequence is obtained, from which columns with a confidence > 0.5 are selected. As known from step 2.1, each column corresponds to a genomic region (e.g., Figure 6 In the matrix, the second column corresponds to interval B1, and the corresponding genomic interval is chr1:3-35. Adjacent intervals in these columns are spliced ​​and merged (for example, in Figure 6, B2 and B3 are columns with confidence > 0.5, so the genomic intervals chr1:3-35 and chr1:35-50 corresponding to the two columns are merged into the genomic interval chr1:3-50). The resulting genomic intervals are the final result.

[0050] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0051] (1) It can detect both arm-level and focal recurrent copy number variations within the same framework. This invention uses multi-scale window sampling and multi-branch convolutional neural network joint modeling to enable the model to have both a large receptive field and local fine-grained pattern recognition capabilities. It can identify both continuous amplifications / deletions across long regions and high-amplitude abnormalities in short focal areas, avoiding the problem of existing methods struggling to balance the two output preferences of "many and short" and "few and long".

[0052] (2) Reduce reliance on fixed thresholds and explicit statistical assumptions, and improve the ability to express complex nonlinear patterns. Unlike existing technologies that rely on frequency thresholds, amplitude thresholds and background permutation distributions to construct statistical frameworks for significance testing, this invention uses an end-to-end deep learning model to directly learn the discriminative features of recurrent copy number variation, which can characterize complex nonlinear features and boundary effects that are difficult to express by traditional statistical models, thereby improving the adaptability and consistency of detection.

[0053] (3) It has stronger robustness to noise and heterogeneity between samples in tumor copy number data. This invention adopts unified matrix modeling and standardization at the input level, and introduces residual structure, batch normalization and attention mechanism at the model level, so that the model can still maintain stable discrimination ability when facing noise such as chromosomal instability, fragmentation, amplitude fluctuation and boundary shift common in tumor samples, thereby reducing false positives and fragmented output.

[0054] (4) The range of output results is more stable, reducing the need for manual post-processing and integrated screening. This invention concatenates the model confidence scores of each genomic location into segments and maps them back to chromosome coordinates, making the output range more continuous and more consistent with the spatial continuity of real biological events. Compared with the method of relying on multiple tools or manual screening, this invention can obtain a more complete and structurally consistent picture of recurrent CNA in a single model.

[0055] (5) The input data format is more adaptable, supporting changes in the number of samples while maintaining a consistent input dimension. This invention uses a matrix standardization strategy with a fixed number of columns K, namely, a strategy of padding when insufficient and merging when excessive, to enable the model to maintain a consistent input dimension under different projects and sample sizes, thereby improving the deployability of software engineering and the ability to be applied across queues. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the overall process of the method of the present invention.

[0057] Figure 2 This is a schematic diagram of the model structure of the present invention;

[0058] Figure 3 A schematic diagram showing how the chromosome region is divided into several intervals based on the start and end points of all segments;

[0059] Figure 4 This is a schematic diagram illustrating how to map sample S1 fragments to intervals to obtain an element array;

[0060] Figure 5 This is a schematic diagram illustrating how the sample S2-S3 segment is mapped to an interval to obtain an element array;

[0061] Figure 6 This is a schematic diagram of an N-row, M-column matrix obtained from N samples and M intervals.

[0062] Figure 7 This is a schematic diagram of matrix sampling according to the present invention. Detailed Implementation

[0063] like Figure 1 As shown, this invention proposes a method for detecting recurrent copy number variations in gene fragments based on deep learning. This method includes the following steps:

[0064] (1) The acquired gene data were preprocessed by grouping, classifying and numerical transformation;

[0065] (2) Perform data modeling on the preprocessed data to convert the original segmented data into matrix form;

[0066] (3) Perform multi-scale sliding window sampling on the obtained matrix to obtain the dataset;

[0067] (4) Label the dataset based on the visual features of the data;

[0068] (5) Train the constructed neural network using the labeled dataset;

[0069] (6) Collect gene data, process it through steps (1) to (3), input it into the trained neural network, and output the recurrent copy number variation region.

[0070] Furthermore, in step (1), the original input for obtaining gene data is a copy number variation segment file, which contains at least 5 columns of data: sample number, column name is arbitrary, type is string; chromosome number, column name is Chromosome, type is string, format is optional chr prefix and chromosome number; segment start position, column name is Start, type is integer; segment end position, column name is End, type is integer; copy number, column name is CopyNumber, type is integer.

[0071] Furthermore, in step (1), the specific methods for grouping, classifying, and numerically transforming the acquired gene data are as follows:

[0072] First, the data is grouped by chromosome, meaning data from different chromosomes are cached in separate files. Chromosomal targets are categorized into copy number deletion variants (copy number c less than the normal value of 2) and copy number amplification variants (copy number c more than the normal value of 2). In the case of copy number deletion variants, fragments with copy numbers greater than 2 are filtered out and deleted, and the copy number of the remaining data items is replaced with the absolute value of the difference between the original value and 2, so that the copy number value correctly reflects the extent of deletion during subsequent data overlay and compression. No processing is performed in the case of amplification.

[0073] Furthermore, the specific method for step (2) is as follows:

[0074] (2.1) Suppose that the input dataset contains N samples S1-S N For any chromosome chr, collect the start and end genomic coordinates of all samples on that chromosome, i.e., the contents of the Start and End columns in the input data, to form a genomic coordinate set P. chr ={Start1~Start N End1~End N}; Sort and remove duplicates from this set to obtain an ordered sequence B composed of genomic coordinates. chr ={b1,b2,…,b M},b i i+1 The coordinates of any two adjacent genomes in the sequence, b i With b i+1 ​constitute a genomic interval, dividing the chromosome into M - 1 consecutive and non - overlapping genomic intervals;

[0075] (2.2)For sample S i , construct an array containing M - 1 elements to store the copy numbers of sample S i in the M - 1 genomic intervals obtained in step (2.1) as follows:

[0076] For any segment (Start, End, c) in sample S i , match the ordered sequence B chr , determine the covered genomic intervals p~q, and set the corresponding elements x[p]~x[q] in the array to c, where c is the copy number; for the genomic intervals not covered by any segment of sample S i , set the corresponding values in the array to the constant value c0 = 2, which is used to represent the state of no copy number variation. After the above processing, sample S i obtains an array containing M - 1 elements ;

[0077] (2.3)After performing step (2.2) on all samples, multiple equally - long arrays containing M - 1 elements are obtained: { }; Concatenate the arrays obtained from all samples with each array as a row of the matrix to form an N - row M - 1 - column matrix , where each row of this matrix stores all the copy number information of a certain sample on this chromosome;

[0078] (2.4)To ensure the consistency of the input dimension of the deep - learning model, convert the matrix obtained in (2.3) into a K - row M - 1 - column matrix with a fixed number of rows K. According to the cases where the number of rows N of the matrix obtained in (2.3) is greater than K and less than K, process the matrix as follows:

[0079] When N < K, supplement K - N rows of padding arrays in matrix X (chr) to fill the original matrix into a K - row M - 1 - column matrix; all values in the padding rows are the constant c0 = 2, indicating no variation;

[0080] When N > K, process the arrays exceeding the row - number limit according to the cyclic merging strategy as follows:

[0081] For the (K + q)-th row array , merge it with the ((q mod K)+1)-th row array. The specific method is to take the average of the n - th elements of the two arrays as the n - th element of the merged matrix;

[0082] After completing the above steps, the resulting matrix is ​​standardized by row to obtain a matrix with a fixed number of K rows.

[0083] like Figure 3 As shown, the start and end points of all segments actually divide the chromosome region into several intervals. In this example, there are 4 segments with 8 start and end points, which are divided into 7 intervals B1 to B7.

[0084] like Figure 4 As shown, taking sample s1 as an example, the two segments of s1 are mapped to these 7 intervals, resulting in an array containing 7 elements. Specifically, the first segment of s1 covers B1, B2, and B3, and its copy number is 3, so the values ​​of B1, B2, and B3 are set to 3. The second segment of s1 covers B5, B6, and B7, and its copy number is 1, so the values ​​of B1, B2, and B3 are set to 1. B4 is not covered by any segment belonging to s1, so it is set to the padding value 2. Finally, after this process, s1 is processed into a 7-element array 3,3,3,2,1,1,1.

[0085] like Figure 5 As shown, after processing s2 and s3 through the above steps, each will also obtain a 7-element array. By concatenating the arrays obtained from all the processed samples as rows, a 3x7 matrix is ​​obtained.

[0086] Furthermore, the method for step (3) is as follows:

[0087] After processing the data of each chromosome in step (3), a K-row, M-1-column matrix is ​​obtained. Three sampling matrices with different column numbers but the same row number are then taken, symmetrical to each column of this matrix. For cases where a sampling matrix cannot be obtained with the boundary column as the center of symmetry, the missing data in the sampled matrix is ​​filled along the row direction, with each row filled with the mean of that row in the original matrix. For example, 50, 250, or 2000 columns can be selected.

[0088] Furthermore, the method for step (4) is as follows:

[0089] When constructing the dataset, each column of the chromosome matrix obtained in step (3) is labeled as a positive or negative example, resulting in a labeled array containing M-1 elements. The specific method is as follows:

[0090] For each sampling matrix, the matrix is ​​first summed along the column direction to compress it into a one-dimensional copy number array along the row direction. A window with a width of 10% of the array width is then taken as the center window, centered on the array's center element. To prevent the center signal from leaking into the background estimation, a window with a width of 20% of the array width is taken as the guard window, centered on the array's center element. The areas on either side of the guard window are defined as the background region. The average copy number within the center window is then calculated. This average is subtracted from the median copy number of the background region to obtain the final result, which is then normalized using the median absolute deviation of the background region. Finally, the sigmoid function is used to transform the result into probability space to obtain the center contrast index, which measures the prominence of the center position relative to background fluctuations. For the three sampling matrices corresponding to a column of the chromosome matrix, the index is calculated for each sampling matrix, and the maximum of the three is taken as the index for that column of the chromosome matrix.

[0091] When labeling positive examples in a dataset, select columns with an index > 0.5 as positive examples.

[0092] For the selection of negative examples, columns with the above indicators <0.5 are considered negative examples. However, since the number of negative examples is significantly greater than that of positive examples in reality, in order to avoid the impact of class imbalance on model performance, in actual model training, an equal number of negative examples are randomly selected from the negative examples as the negative examples that actually participate in model training, while all positive examples participate in training.

[0093] Furthermore, the method for step (5) is as follows:

[0094] This invention designs and employs a multi-stream convolutional neural network as a discriminant model for recurrent copy number mutation detection. The model includes a multi-input branch structure, with each branch corresponding to the three sampling matrices obtained by processing each column of the matrix in step (4). It can perform parallel feature extraction on multiple sampling matrices from step (4) and use an attention mechanism to achieve cross-branch information fusion. Finally, it outputs a binary logit value for the discrimination of recurrent copy number mutations. Specifically, logit ≥ 0.5 is considered a recurrent region, and less than 0.5 is considered a non-recurrent region.

[0095] Model Input and Output: The model input consists of three sampling matrices obtained from sampling a certain column of the matrix in step (4), and the model output is: in A single logit value for each sample; during the inference phase, the logit can be converted into a probability using the Sigmoid function. The meaning of this probability is: when the probability is greater than or equal to 0.5, it means that the column is in the recurrent copy number variation region; when it is less than 0.5, it is not in the recurrent copy number variation region.

[0096] The model's first layer structure is a multi-branch feature extraction module: this module uses a convolutional feature extraction branch with the same structure for each matrix input. Extracting feature vectors Where d=256 is the feature dimension, the branch Specifically, they include, in order:

[0097] (1) Depthwise Separable 2D Convolution is used to reduce computation and enhance local pattern modeling capabilities: First, a depthwise separable 2D convolution operation is performed on the input matrix, where the depthwise convolution performs local convolution on each channel along the spatial dimension to extract local change patterns between adjacent genomic regions; then, the channel information is linearly combined through pointwise convolution.

[0098] (2) Batch normalization and ReLU activation: Batch normalization is performed on the convolution output to alleviate the training instability caused by the difference in numerical distribution between different samples. The nonlinear expression capability is introduced through the ReLU nonlinear activation function, so that the model can characterize the nonlinear and asymmetric pattern features in the copy number variation.

[0099] (3) Max Pooling for downsampling: The feature map is downsampled by the max pooling operation, which compresses the spatial dimension and expands the receptive field, thereby enhancing the model’s ability to perceive regions with large-scale continuous copy number changes, while suppressing the influence of local noise on feature representation.

[0100] (4) Second-level residual convolutional blocks to enhance gradient propagation and multi-scale feature representation: multiple residual convolutional blocks are concatenated on the downsampled feature map. Each residual block adds the input feature to the convolutional transformed feature through skip connections. While maintaining feature continuity, higher-level and more abstract spatial pattern information is gradually extracted.

[0101] (5) The EfficientChannelAttention (ECABlock) module adaptively recalibrates the importance of channels: After the residual features are extracted, the EfficientChannelAttention module is introduced to adaptively weight the features of each channel. This module evaluates the importance of different channels in the current sample through global statistical information, thereby strengthening the feature channels that are highly correlated with recurrent copy number variations and suppressing the influence of redundant or noisy channels.

[0102] (6) Adaptive global average pooling and flattening: The weighted feature map is subjected to adaptive global average pooling to compress the spatial dimension to a fixed size, thereby obtaining a global description of the overall distribution features of the input matrix; then the result is flattened to form a one-dimensional feature vector representation.

[0103] (7) Fully connected mapping yields a fixed-dimensional embedding vector h. j The one-dimensional feature vector is mapped to an embedding space of a preset dimension through a fully connected layer, resulting in the feature representation h of the corresponding input branch. j This is used for subsequent cross-branch fusion and classification.

[0104] The second layer is the cross-branch fusion module. Its main function is to fuse the features extracted from each branch in the first layer, and finally obtain the fused intermediate features. The outputs of each branch in the previous layer are stacked according to the branch dimension to obtain the feature sequence. M represents the total number of branches, with a value of 3. Multi-head self-attention is used to model H to learn the correlation and complementary information between different branches. Subsequently, a Transformer-style residual structure is used for stable training and nonlinear enhancement, including the first residual connection and layer normalization: Z1=LayerNorm(H+A) and the feedforward network (FFN) and the second residual connection Z2=LayNorm(Z1+FFN(Z1)).

[0105] The third layer is the pooling and classification head, whose main function is to transform the intermediate features output by the second layer into a probability distribution. Specifically, it first performs mean pooling on the fused sequence features along the branch dimension to obtain the global representation. And the input is fed into the Multi-Layer Perceptron Head (MLPHead) to output a single logit: The logit is ultimately converted into a probability (confidence score) by the Sigmoid function. As the final output of the model.

[0106] Furthermore, in step (5):

[0107] This invention employs Binary Cross-Entropy with Logits Loss (BCE with Logits Loss) for supervised learning of the model output and labels; it optimizes the storage and computational resource consumption of training by using automatic mixed precision and dynamic loss scaling, and prunes the gradients to a ℓ2 norm not exceeding 0.9; the optimizer uses Adam, with an initial learning rate set to 1×10⁻⁶. -5The weight decays to 3×10 -2 To dynamically adjust the learning rate, a performance-driven decay scheduler (ReduceLROnPlateau) is introduced to monitor the validation set loss, with a decay factor of 0.5 and a minimum learning rate of 1×10⁻⁶. -7 Each training session runs for 50 rounds, with a batch size of 8.

[0108] During the evaluation phase, leave-one-out cross-validation across datasets was used to verify the rationality and generalization of the scheme, while k-fold cross-validation was used when training the final model. Based on the validation set AUC (area under the ROC curve (recall-false positive rate)), the optimal model weights were selected, and the AUC, F1 score (a combined metric of precision and recall), accuracy, and precision and recall were reported on the leave-out items. Simultaneously, an ROC curve was plotted based on the validation prediction results to evaluate the model's discriminative ability. Both positive and negative samples used in training and validation followed the aforementioned labeling strategy; their specific quantities are detailed in Tables 1 and 2.

[0109] Furthermore, the method for step (6) is as follows:

[0110] For the collected gene data, after obtaining a chromosome matrix in step (2), each column of the chromosome matrix is ​​traversed and a set of sampling matrices obtained by sampling each column in step (3) is input into the neural network model in step (5) for processing. After processing each column, a confidence sequence is obtained, from which columns with a confidence > 0.5 are selected. As known from step 2.1, each column corresponds to a genomic region (e.g., Figure 6 In the matrix, the second column corresponds to interval B1, and the corresponding genomic interval is chr1:3-35. Adjacent intervals in these columns are spliced ​​and merged (for example, in Figure 6, B2 and B3 are columns with confidence > 0.5, so the genomic intervals chr1:3-35 and chr1:35-50 corresponding to the two columns are merged into the genomic interval chr1:3-50). The resulting genomic intervals are the final result.

[0111] Table 1. Validation results across datasets under amplification analysis.

[0112]

[0113] Table 2. Validation results across datasets under missing data analysis.

[0114]

[0115] Tables 1 and 2 present the cross-dataset model generalization performance validation results for both amplification and missing data analysis types. The columns represent the following: Dataset: Dataset name (taken from the corresponding TCGA dataset); LowestLoss: Minimum loss, the lowest value output by the loss function during the training process; HighestAUC: The highest AUC (area under the ROC (recall-false positive rate) curve) value in each training round during the training process, used to measure model accuracy, ranging from 0 to 1, with higher values ​​indicating higher model precision); HighestF1: The highest F1 score in each training round during the training process (used to comprehensively measure model accuracy and recall, ranging from 0 to 1, with higher values ​​indicating better model performance); TrainingSetSize: Training set size (measured by the number of data samples); ValidationSetSize: Validation set size (measured by the number of data samples, with higher values ​​indicating more representative data in the real-world scenario). In a total of 20 datasets, leave-one-out training and evaluation were used: one dataset was used as the validation set each time, and the remaining 19 datasets were used as the training set for both training and validation. The evaluation results when each dataset was used as the validation set are shown in the table. Some datasets were used as training sets only because their data size was too small, so no evaluation metrics were provided, and they are marked as "-" in the table.

[0116] The results in the two tables show that the proposed model achieved high discriminative performance on most datasets. For the amplification task, the AUC was mostly concentrated in the range of approximately 0.94–0.99, and the F1 score was mostly in the range of approximately 0.90–0.96. For the deletion task, the AUC was mostly in the range of approximately 0.91–0.97, and the F1 score was mostly in the range of approximately 0.88–0.96. These results demonstrate that the proposed method maintains stable performance under conditions of varying cancer types and sample heterogeneity, and exhibits good generalization ability and robustness in cross-cohort applications.

Claims

1. A method for detecting recurrent copy number variations in gene fragments based on deep learning, characterized in that, The method includes the following steps: (1) The acquired gene data were preprocessed by grouping, classifying and numerical transformation; (2) Perform data modeling on the preprocessed data to convert the original segmented data into matrix form; (3) Perform multi-scale sliding window sampling on the obtained matrix to obtain the dataset; (4) Label the dataset based on the visual features of the data; (5) Train the constructed neural network using the labeled dataset; (6) Collect gene data, process it through steps (1) to (3), input it into the trained neural network, and output the recurrent copy number variation region.

2. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, In step (1), the original input for obtaining gene data is a copy number variation segment file, which contains at least 5 columns of data: sample number, column name is arbitrary, type is string; chromosome number, column name is Chromosome, type is string, format is optional chr prefix and chromosome number; fragment start position, column name is Start, type is integer; fragment end position, column name is End, type is integer; copy number, column name is Copy Number, type is integer or floating point number.

3. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, In step (1), the specific method for grouping, classifying, and preprocessing the acquired gene data is as follows: First, the data is grouped by chromosome, that is, the data of different chromosomes are cached in different files. The chromosome targets are divided into copy number deletion variants, that is, the copy number c is less than the normal value of 2; and copy number amplification variants, that is, the copy number c is more than the normal value of 2. In the case of copy number deletion variants, fragments with copy numbers greater than 2 are filtered out and deleted, and the copy number of the remaining data items is replaced with the absolute value of the difference between the original value and 2, so that the copy number value can correctly reflect the deletion range when the data is superimposed and compressed in the future. No processing is done in the case of copy number amplification variants.

4. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, The specific method for step (2) is as follows: (2.1) Suppose that the input dataset contains N samples S1-S N For any chromosome chr, collect the start and end genomic coordinates of all samples on that chromosome, i.e., the contents of the Start and End columns in the input data, to form a genomic coordinate set P. chr ={Start1~Start N End1~End N }; Sort and remove duplicates from this set to obtain an ordered sequence B composed of genomic coordinates. chr ={b1,b2,…,b M },b i i+1 The coordinates of any two adjacent genomes in the sequence, b i With b i+1 This constitutes a genomic region, dividing the chromosome into M-1 consecutive and non-overlapping genomic regions;​ (2.2) For sample S i Construct an array containing M-1 elements. Store the sample S i The copy number of the M-1 genomic regions obtained in step (2.1) is determined as follows: For sample S i Given any segment (Start, End, c), match the ordered sequence B. chr Determine the covered genomic regions p~q, and store these regions in an array. The corresponding elements x[p]~x[q] in the sample are set to c, where c is the copy number; for samples not included in the sample S... i For any segment covering a genomic region, the corresponding array value is set to a constant c0=2 to represent the state where no copy number variation has occurred. Sample S i The above processing yields an array containing M-1 elements. ; (2.3) After performing step (2.2) on all samples, multiple arrays of equal length containing M-1 elements are obtained: { }, concatenate the arrays obtained from all samples, treating each array as a row of a matrix, to form an N x M-1 matrix. Each row of this matrix stores information about the total copy number of a particular sample on that chromosome; (2.4) To ensure the consistency of the input dimensions of the deep learning model, the matrix obtained in (2.3) is transformed into a K-row, M-1-column matrix with a fixed number of K rows. The matrix is ​​then processed according to whether the number of rows N of the matrix obtained in (2.3) is greater than K or less than K: When N < K, in the matrix X (chr) supplement K - N rows of padding arrays to fill the original matrix into a K-row M - 1-column matrix; all values in the padding rows are the constant c0 = 2, indicating no mutation; When N > K, arrays exceeding the row limit are processed using a circular merging strategy, as follows: For the array in row K+q Merge it with the array in row ((qmodK)+1) by averaging the nth elements of the two arrays and using the average of the nth elements of the merged matrix. After completing the above steps, the resulting matrix is ​​standardized by row to obtain a matrix with a fixed number of K rows.

5. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, The method of step (3) is as follows: After processing the data of each chromosome in step (3), a matrix of K rows and M-1 columns is obtained. Taking each column of the matrix as the center, three sampling matrices with different column numbers and the same row number are taken as the left and right sides of the symmetry center of the column. For the case where the sampling matrix cannot be taken with the boundary column as the symmetry center, the missing data of the sampled matrix is ​​filled along the row direction, and each row is filled with the mean of the row of the original matrix.

6. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, The method for step (4) is as follows: When constructing the dataset, each column of the chromosome matrix obtained in step (3) is labeled as a positive or negative example, resulting in a labeled array containing M-1 elements. The specific method is as follows: For each sampling matrix, first sum along the column direction to compress the matrix into a one-dimensional copy number array along the row direction. On this copy number array, take a window with a width of 10% of the array width centered on the array's center element as the center window, and take a window with a width of 20% of the array width centered on the array's center element as the guard window. The parts on both sides of the guard window are defined as the background region. Calculate the average copy number within the center window, subtract the median copy number of the background region from the average to obtain the calculation result, and normalize the calculation result using the median absolute deviation of the background region. Finally, use the sigmoid function to transform to the probability space to obtain the center contrast index. For the three sampling matrices corresponding to a column of the chromosome matrix, calculate the index for each sampling matrix and take the maximum of the three to obtain the index of that column of the chromosome matrix. When labeling positive examples in the dataset, columns with an index > 0.5 are selected as positive examples, and columns with an index < 0.5 are selected as negative examples. Furthermore, an equal number of negative example columns as positive examples are randomly selected from the negative examples as negative examples to actually participate in model training, while all positive examples participate in training.

7. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 1, characterized in that, In step (5), the neural network model contains a multi-input branch structure. Each branch corresponds to the three sampling matrices obtained by processing each column of the matrix in step (4). Parallel feature extraction is performed on the multiple sampling matrices from step (4), and cross-branch information fusion is achieved using the attention mechanism, and finally the confidence score is output. The neural network model takes three sampling matrices obtained from sampling a certain column of the matrix in step (4) as input, and outputs the following: B is the batch size, where, A single logit value for each sample; during the inference phase, the logit is converted into a confidence score using the Sigmoid function. ; A confidence level of 0.5 or higher indicates that the column is within the recurrent copy number variation region; a confidence level of less than 0.5 indicates that it is not within the recurrent copy number variation region.

8. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 7, characterized in that, The first layer of the neural network model is a multi-branch feature extraction module: this module uses a convolutional feature extraction branch with the same structure for each matrix input. Extracting feature vectors ,in, This refers to the input branch matrix, where d=256 is the feature dimension, B is the batch size, and j is the branch number. Specifically, they include, in order: (1) Depth-separable two-dimensional convolution: First, a depth-separable two-dimensional convolution operation is performed on the input matrix, where the depth convolution performs local convolution on each channel along the spatial dimension to extract the local change patterns between adjacent genomic regions; then, the channel information is linearly combined through pointwise convolution. (2) Batch normalization and ReLU activation: Batch normalization is performed on the convolution output, and nonlinear expression is introduced through the ReLU nonlinear activation function, so that the model can characterize the nonlinear and asymmetric pattern features in the copy number variation; (3) Downsampling using max pooling: The feature map is downsampled using max pooling. (4) Second-level residual convolutional blocks to enhance gradient propagation and multi-scale feature representation: Multiple residual convolutional blocks are concatenated on the downsampled feature map, and each residual block adds the input feature to the convolutional transformed feature through a skip connection; (5) The channel attention module adaptively recalibrates the importance of channels: After the residual features are extracted, the channel attention module is introduced to adaptively weight the features of each channel; (6) Adaptive global average pooling and flattening: Adaptive global average pooling is performed on the weighted feature map to compress the spatial dimension to a fixed size and obtain a global description of the overall distribution features of the input matrix; then the result is flattened to form a one-dimensional feature vector representation. (7) Fully connected mapping yields a fixed-dimensional embedding vector h. j The one-dimensional feature vector is mapped to an embedding space of a preset dimension through a fully connected layer to obtain the feature representation h of the corresponding input branch. j This is used for subsequent cross-branch fusion and classification. The second layer is a cross-branch fusion module, which fuses the features extracted from each branch in the first layer to obtain the fused intermediate features. The outputs of each branch in the previous layer are stacked according to the branch dimension to obtain the feature sequence. M represents the total number of branches, which takes the value 3. A multi-head self-attention pair is used. Modeling is performed to obtain A, which learns the correlation and complementary information between different branches; then, a Transformer residual structure is used for stable training and nonlinear enhancement: the input feature H and the attention output A are added together and normalized to obtain Z1=LayerNorm(H+A), and then Z1 is nonlinearly transformed through a position-wise feedforward network FFN, and the transformation result is added together with Z1 and normalized to obtain Z2=LayerNorm(Z1+FFN(Z1)); The third layer is the pooling and classification head, which transforms the intermediate features output from the second layer into a probability distribution. Specifically, it first performs mean pooling along the branch dimension on the fused sequence features to obtain the global representation. And input it into the multilayer perceptron classification head to output a single logit: The logit is ultimately transformed into a confidence score by the Sigmoid function. As the final output of the model.

9. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 7, characterized in that, Supervised learning of the model output and labels is performed using binary cross-entropy log-odds loss; automatic mixed precision and dynamic loss scaling are employed to optimize the storage and computational resource consumption of training, and gradients are pruned to a ℓ2 norm not exceeding 0.9; the optimizer used is Adam, with an initial learning rate set to 1×10⁻⁶. -5 The weight decays to 3×10 -2 To dynamically adjust the learning rate, a performance-driven decay scheduler is introduced to monitor the validation set loss. The decay factor is 0.5, and the minimum learning rate is 1×10⁻⁶. -7 Each training session runs for 50 rounds, with a batch size of 8.

10. The method for detecting recurrent copy number variations in gene fragments based on deep learning according to claim 7, characterized in that, In step (6), for the collected gene data, a chromosome matrix obtained in step (2) is traversed through each column of the chromosome matrix and a set of sampling matrices obtained by sampling in step (3) of each column is input into the neural network model in step (5) for processing. After processing each column, a confidence sequence is obtained. Columns with confidence > 0.5 are selected from them. All the genomic intervals corresponding to these columns are spliced ​​and merged to obtain the final result, namely the recurrent copy number variation region.