A method for identifying abnormal structures of genome assembly based on deep learning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-08-11
AI Technical Summary
[0006]综上所述,现有基因组组装质量评估技术普遍存在结构性错误检测能力不足、高度依赖外部原始数据或参考基因组、缺乏针对染色体支架构建阶段错误的独立验证手段等缺陷
通过获取转座元件注释数据并构建一维密度序列,引入一维卷积自编码器网络计算重构误差,该方案将LTR逆转录转座子在正常染色体上呈现进化保守的分布规律作为数字指纹,利用无监督学习自动习得正常分布流形。无需预定义错误标签,即可将数十Kb至Mb级的大片段倒装、易位等隐蔽性结构错误转化为可计算的重构误差特征,以分布百分位数作为流形偏离边界进行初筛,填补了现有评估体系在染色体空间拓扑结构验证上的行业空白。
Smart Images

Figure CN122551885A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for identifying abnormalities in genome assembly structure based on deep learning. Background Technology
[0002] Genome assembly quality assessment is a core component of bioinformatics, involving a comprehensive review of the integrity, continuity, base accuracy, and structural correctness of genome sequences to determine whether the assembly results accurately reflect the organism's genome. With the rapid development of long-read sequencing and assembly technologies, obtaining high-quality genomes, even at the telomere-to-telomere (T2T) level, has become increasingly convenient, leading to higher demands on assembly quality assessment methods and highlighting the limitations of traditional assessment systems.
[0003] Currently, existing genome assembly quality assessment technologies have the following limitations: The first category consists of assessment methods based on gene integrity or sequence continuity, such as the BUSCO and N50 indices. BUSCO measures genome integrity by detecting the integrity of conserved single-copy orthologous genes, while N50 is used to assess sequence continuity. However, the design logic of these methods does not directly verify the correctness of the genome's spatial structure. As long as the local sequence of the target gene itself is intact or unbroken, even if there are large-scale structural errors such as inversions or translocations on the chromosome at the level of tens of kb to Mb, BUSCO and N50 cannot detect them, leading to misjudgments of assembly quality.
[0004] The second category is evaluation methods based on back-alignment with raw sequencing data, such as Merqury, CRAQ, and Inspector. Merqury assesses base accuracy based on k-mer differences between the raw high-precision sequencing reads and the assembled sequences; CRAQ and Inspector identify potential errors through anomalous signals such as alignment quality, soft shearing information, and read coverage depth. These methods heavily rely on raw sequencing reads or high-quality closely related reference genomes. For research groups that rely on commercial sequencing services for assembly, the raw data may not be stored locally, and closely related reference genomes may not be available; furthermore, the computational cost of back-alignment with large-scale data is enormous, making these methods impractical in real-world applications.
[0005] The third category is assessment methods based on transposon element integrity, such as the LAI index. LAI mainly assesses the assembly quality of repetitive sequence regions, but its design logic is primarily aimed at plant genomes, and its applicability to other biological groups such as animals is questionable. Furthermore, it has not been specifically validated for large-segment spatial topological errors introduced during chromosome scaffold construction.
[0006] In summary, existing genome assembly quality assessment technologies generally suffer from shortcomings such as insufficient ability to detect structural errors, high dependence on external raw data or reference genomes, and lack of independent verification methods for errors in the chromosome scaffold construction stage. Summary of the Invention
[0007] This invention provides a method for identifying abnormalities in genome assembly structure based on deep learning, which can accurately capture local breakpoint mutations in sequences.
[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a method for identifying genome assembly structural anomalies based on deep learning includes: Obtain transposon element annotation data of the target genome, divide continuous sliding windows along the one-dimensional sequence direction of the chromosome, count the LTR retrotransposon density in each window, and construct a one-dimensional density sequence; A one-dimensional density sequence is input into a pre-trained one-dimensional convolutional autoencoder network, which outputs a reconstructed density sequence and calculates the reconstruction error between the one-dimensional density sequence and the reconstructed density sequence. The percentile of the reconstruction error in the normal sample training set is used as the manifold deviation boundary, and the target window whose reconstruction error exceeds the manifold deviation boundary is marked as an initial screening abnormal subset. The one-dimensional density sequence is divided into multiple segments along the sequence extension direction, including two end segments and a middle segment. The ratio between the density mean of the two end segments and the density mean of the middle segment is calculated. A preset ratio threshold is used as the morphological antagonism boundary. Segments with ratios exceeding the morphological antagonism boundary are marked as morphological abnormal subsets. Along the extension direction of the one-dimensional density sequence, the density difference between adjacent windows is calculated and the density difference is standardized; using a preset standardization threshold as the gradient mutation boundary, windows whose standardized density difference exceeds the gradient mutation boundary are marked as outlier subsets. According to the preset priority fusion path, the initial screening abnormal subset, morphological abnormal subset and outlier abnormal subset are fused and judged step by step; if the target window belongs to the outlier abnormal subset, the region where the target window is located is directly judged as structural abnormal; otherwise, the multi-level structural abnormality judgment result of the target genome is output by combining the labeling status of the initial screening abnormal subset and the morphological abnormal subset.
[0009] Secondly, a system for identifying genome assembly structural anomalies based on deep learning includes: The data preprocessing module is used to obtain transposon element annotation data of the target genome, divide the chromosome into continuous sliding windows along the one-dimensional sequence direction, count the LTR retrotransposon density in each window, and construct a one-dimensional density sequence. The deep learning anomaly detection module is used to input a one-dimensional density sequence into a pre-trained one-dimensional convolutional autoencoder network, output a reconstructed density sequence, and calculate the reconstruction error. The distribution percentile is used as a marker of manifold deviation from the boundary to initially screen anomaly subsets. The shape anomaly recognition module is used to divide the one-dimensional density sequence into multiple segments including two end segments and a middle segment, calculate the ratio of the density mean of the two end segments to the middle segment, and use the ratio threshold as the morphological antagonism boundary to mark the morphological anomaly subset. The statistical analysis module is used to calculate the density difference between adjacent windows and perform standardization processing, using the standardized threshold as the gradient mutation boundary to mark outlier subsets. The fusion decision module is used to perform step-by-step fusion judgment on the initial screening abnormal subset, morphological abnormal subset and outlier abnormal subset according to the preset priority fusion path, and output multi-level structural abnormal judgment results.
[0010] The above-described solution of the present invention has at least the following beneficial effects: By acquiring transposon element annotation data and constructing a one-dimensional density sequence, a one-dimensional convolutional autoencoder network is introduced to calculate the reconstruction error. This scheme uses the evolutionarily conserved distribution pattern of LTR retrotransposons on normal chromosomes as a digital fingerprint, and automatically learns the normal distribution manifold using unsupervised learning. Without predefined error labels, it can transform large-segment inversions, translocations, and other hidden structural errors (tens of kb to Mb) into computable reconstruction error features. Distribution percentiles are used as the manifold deviation boundary for initial screening, filling the industry gap in the verification of chromosome spatial topology in existing evaluation systems.
[0011] Building upon the reconstruction error from deep learning, the standardization process further calculates the ratio of the mean density of segments and the density difference between adjacent windows. The ratio of the mean density of segments effectively identifies valley-shaped global distribution anomalies (morphological anomaly subsets) with high density at both ends and low density in the middle; while the Z-score standardization of the density difference between adjacent windows accurately captures local breakpoint mutations in the sequence (outlier anomaly subsets). This multi-dimensional feature extraction method perfectly complements the reconstruction residuals from deep learning, comprehensively covering various complex assembly error patterns ranging from global morphological distortions to localized drastic fluctuations.
[0012] By employing a pre-defined priority fusion path, the initial screening subset of anomalies, the subset of morphological anomalies, and the subset of outliers are fused and judged step by step. This mechanism assigns the highest priority to local gradient mutations (outliers), directly determining structural anomalies; for other cases, it performs multi-level classification by combining the joint voting results of global morphological anomalies and deep reconstruction anomalies. This multi-modal feature fusion logic effectively filters out background noise interference that may be generated by a single detection method, accurately locates large fragment assembly errors, and provides a high-confidence reference for subsequent manual review or assembly correction.
[0013] Independent evaluation can be achieved solely based on the intrinsic biological characteristics of the assembly results, completely solving the quality control dilemma in extreme data loss scenarios such as loss of original data or lack of close references. Furthermore, the one-dimensional convolutional autoencoder network employed in this invention features a lightweight design (incremental convolutional kernels and adaptive pooling), enabling efficient processing of hundreds of genomes on standard servers without GPU acceleration. This significantly reduces computational resource requirements and technical application barriers, possessing extremely high data reuse value and industrial transformation potential. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating a method for identifying abnormal genome assembly structures based on deep learning in one embodiment of the present invention.
[0015] Figure 2 This is a schematic diagram of a system for identifying abnormal genome assembly structures based on deep learning in one embodiment of the present invention. Detailed Implementation
[0016] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0017] This embodiment provides a method for identifying abnormalities in genome assembly structure based on deep learning, referring to... Figure 1 As shown, the method specifically includes the following steps S1 to S8.
[0018] Step S1: Input file preparation and transpose element annotation Step S1 specifically includes: annotating the target genome with transposable elements (TEs). Users can choose either of the following two annotation methods according to their actual needs: Method 1: Use EDTA (Extensive de-novoTE Annotator) for whole-genome transposon element annotation. This method provides comprehensive annotation types, simultaneously recognizing various transposon types such as LTR retrotransposons (long terminal repeat retrotransposons), LINE elements (long scattered nuclear elements), SINE elements (short scattered nuclear elements), DNA transposons, and unknown transposons. Annotation results are output in GFF format, including the start position, end position, strand direction, and classification information of each transposon element on the chromosome or scaffold sequence.
[0019] Method 2: Use Combination This method only annotates LTR-type transposons. It specifically identifies LTR retrotransposons, runs quickly, and is suitable for rapid analysis scenarios that only focus on LTR distribution characteristics. By identifying structural features of long terminal repeats (LTRs), such as sequence similarity between LTR pairs and target site repeats (TSRs), candidate regions for LTR retrotransposons are searched across the entire genome. The candidate results are then filtered and categorized, false positive annotations are removed, and a high-confidence set of LTR retrotransposon annotations is output.
[0020] After annotating transposable elements, the accompanying script is used to calculate the density distribution of various transposable elements. Specifically, each chromosome or scaffold sequence is divided into consecutive sliding windows of fixed size along the one-dimensional sequence direction (i.e., from the 5′ end to the 3′ end), and the density values of various transposable elements are calculated within each window. As a concrete example, each sequence is divided into 100 consecutive sliding windows, and the span of each window is determined by dividing the total sequence length by the number of windows. For example, for a chromosome of approximately 300 Mb (megabase pairs), each window span is approximately 3 Mb. The windows are numbered sequentially along the sequence extension direction as Window 1, Window 2, ..., Window N. Within each window, the density of LTR retrotransposons, LINE elements, SINE elements, DNA transposons, and unknown transposons are calculated, with LTR retrotransposon density being the most crucial analytical indicator. The density of transposable elements is calculated by dividing the total number of base pairs covered by a certain type of transposable element within the window by the window span, and then normalizing it to Kb (kilobase pairs) or Mb.
[0021] In a preferred implementation, scaffold sequences are filtered according to preset minimum window counts and minimum sequence length thresholds. Specifically, only scaffold sequences with a window count greater than or equal to the preset minimum window count (e.g., 50 windows) and a total sequence length greater than or equal to the preset minimum sequence length threshold (e.g., 1 Mb) are retained, while excessively short scaffold sequences are filtered out to avoid statistical bias caused by insufficient window counts. Furthermore, chromosome or scaffold sequence identifiers from different data files are standardized to avoid identifier conflicts caused by different batch annotations. Finally, using LTR retrotransposon density as the core, a comprehensive transposon element density index is generated as a one-dimensional density sequence for use by the subsequent deep learning anomaly detection, shape anomaly recognition, and statistical analysis modules.
[0022] Step S2: Program Run Configuration In step S2, TEADS (Transposable Element Abnormal Distribution Detection System) is used via the Linux command line. Users must first download and install the software and its dependencies. TEADS depends on a series of bioinformatics software and Python scientific computing libraries. It is recommended to create a virtual environment and install the dependencies using the conda command.
[0023] The TEADS program is essentially a Python script file (.py format), which users can download directly to their local machine. The program greatly simplifies its use by defaulting to most of the operating parameters, while users can also adjust the parameters to suit different species or genomes with varying assembly quality.
[0024] The main operating parameters include: The following parameters are used for different types of detection methods: window number (window_num): default value is 100, controlling the number of consecutive sliding windows for each sequence; percentile threshold (cnn_threshold): default value is 85, controlling the manifold deviation boundary based on reconstruction error; ratio threshold (pattern_threshold): default value is 1.2, controlling the morphological antagonism boundary based on quartile distribution patterns; Z-score threshold (zscore_threshold): default value is 4.5, controlling the normalized gradient abrupt change boundary based on the density difference between adjacent windows; minimum window number filtering threshold (min_windows): default value is 50; minimum sequence length filtering threshold (min_length): default value is 1,000,000 (i.e., 1 Mb).
[0025] Step S3: Data Preprocessing In step S3, TEADS reads the genome distribution data file containing chromosome locations, window start and end coordinates, and the density of various types of transposon elements. The data preprocessing workflow includes the following steps S31 to S33 in sequence.
[0026] Step S31: Stent sequence screening and filtering The input stent sequences are filtered according to preset minimum window counts and minimum sequence length thresholds. Specifically, all stent sequences in the input data are traversed, and the number of valid windows for each stent sequence is counted. If the number of valid windows for a stent sequence is less than the preset minimum window count (default 50), or the total length of the stent sequence is less than the preset minimum sequence length threshold (default 1Mb), the stent sequence is removed from subsequent analysis. The purpose of this filtering step is to eliminate statistical bias caused by insufficient window counts in excessively short stent sequences, ensuring the reliability of subsequent analysis. For example, for a short stent sequence with a length of only 500Kb, if divided into 100 windows by default, each window is only 5Kb. The random fluctuation of transposable element density at this scale is large and cannot effectively reflect the true distribution pattern, therefore it is filtered out.
[0027] Step S32: Identifier naming normalization Chromosome or scaffold sequence identifiers from data files of different sources are standardized in their nomenclature. In practice, different genome annotation tools or different versions of genome assembly files may use different chromosome nomenclature rules. For example, some use Chr1, Chr2 format, some use the pure number 1, 2 format, and some use RefSeq accession numbers. TEADS uses preset mapping rules or regular expression matching to unify various naming conventions into a standard format, avoiding identifier conflicts and data analysis misalignments caused by inconsistent naming.
[0028] Step S33: Construction of one-dimensional density sequence After screening and nomenclature standardization, for each retained scaffold sequence, the LTR retrotransposon density values of each window were extracted along the one-dimensional sequence direction of the chromosome (5′ to 3′ end) according to the window numbering order, constructing a one-dimensional density sequence. Specifically, for sequences containing... The one-dimensional density sequence of the support sequence for each window is represented as follows: ;in Indicates the first The LTR retrotransposon density values within a window. This one-dimensional density sequence serves as shared input data for three subsequent deep learning anomaly detection modules: anomaly detection, shape anomaly recognition, and statistical analysis.
[0029] Step S4: Deep Learning Anomaly Detection Based on One-Dimensional Convolutional Autoencoders Step S4 uses a pre-trained one-dimensional convolutional autoencoder (1D-CAE) network to perform anomaly detection based on reconstruction error. This step innovatively uses the evolutionarily conserved distribution pattern of LTR retrotransposons on normal chromosomes as a digital fingerprint, and automatically learns the normal distribution manifold (i.e., the distribution subspace of normal samples in the latent space) using unsupervised learning. Any sequence distribution that significantly deviates from this manifold is marked as an anomaly. Step S4 specifically includes three parts: network architecture design, model training process, and anomaly detection inference.
[0030] One-dimensional convolutional autoencoder network architecture: A one-dimensional convolutional autoencoder network consists of two parts: an encoder and a decoder, and adopts an asymmetric structure design.
[0031] The encoder employs a one-dimensional convolutional neural network (1D-CNN) structure, performing convolution operations along the sequence extension direction (i.e., one-dimensional spatial dimension) to capture LTR density distribution patterns at different scales. The encoder contains multiple convolutional layers; as a preferred implementation, it includes three one-dimensional convolutional layers, with the specific structure as follows: First convolutional layer: Input channel number 1 (single-channel one-dimensional density sequence), output channel number 16, convolution kernel size ( The sequence length is 8, the stride is 1, the padding method is "same" to maintain the sequence length, and the activation function is ReLU (Rectified Linear Unit, defined as...). This is followed by an adaptive max pooling layer with a pooling factor of 2.
[0032] The second convolutional layer has 16 input channels, 32 output channels, a kernel size of 12, a stride of 1, a padding method of "same", an activation function of ReLU, and is followed by an adaptive max pooling layer with a pooling factor of 2.
[0033] The third convolutional layer has 32 input channels, 8 output channels, an 8-kernel size, a stride of 1, the same padding method, ReLU activation function, followed by an adaptive max pooling layer with a pooling factor of 2.
[0034] The design of increasing kernel size along network depth (8→12→8) has the following technical significance: shallow convolutional layers (kernel size 8) can capture short-range density fluctuations within a local area, such as LTR density fluctuations between adjacent windows; deep convolutional layers (kernel size 12) have a larger receptive field, enabling them to capture long-range spatial distribution patterns at the chromosome arm scale, such as the overall morphological features of LTR density across the entire chromosome. Adaptive pooling is performed after each convolutional layer to reduce feature dimensionality, preserving key distribution features while reducing feature map size, effectively reducing computational complexity. After encoder processing, the input one-dimensional density sequence is mapped to a latent representation in a low-dimensional latent space, which encodes the projection position of the original sequence onto the normal distribution manifold.
[0035] The decoder employs a fully connected neural network structure, reconstructing the original input sequence from latent variables through multiple layers of linear transformations. As a preferred implementation, the decoder contains three fully connected layers: the first fully connected layer expands the latent variable dimension (e.g., the encoder output dimension) to an intermediate dimension of 64; the second fully connected layer further expands it to a higher dimension of 128; and the third fully connected layer (i.e., the output layer) maps the features back to the length of the original one-dimensional density sequence. Consistent dimensions. ReLU activation function is used across all fully connected layers. The output layer does not use an activation function to preserve continuous values in the output. The decoder output is a reconstructed density sequence. Its dimension is the same as the one-dimensional density sequence of the input. length Maintaining strict consistency allows reconstruction errors to be calculated at the window-by-window granularity.
[0036] As a lightweight design consideration, the number of channels in the convolutional layers of the encoder gradually increases from 1 to 32 and then decreases to 8, while the dimension of the fully connected layers in the decoder is controlled within the hundreds, and the number of parameters of the entire network is controlled within the tens of thousands (for example, for...). The input sequence has a total of approximately 20,000 to 30,000 parameters. This design allows the model to run efficiently on standard servers (such as personal workstations equipped with ordinary CPUs) without the need for GPU (graphics processing unit) acceleration, greatly reducing the computational resource requirements and technical application barriers.
[0037] Model training process The training of one-dimensional convolutional autoencoder networks employs an unsupervised learning strategy, using only one-dimensional density sequences of normal samples (i.e., chromosomes confirmed by manual verification or other reliable evaluation methods to be free of large-segment assembly errors) as training data. This allows the model to be trained without predefined error labels or anomalous samples. The training process specifically includes the following steps: (a) Training set construction Chromosomal scaffold sequences with known good assembly quality and manually verified to be free of large-fragment structural errors are selected from existing genomic datasets. Their LTR retrotransposon one-dimensional density sequences are extracted to serve as the normal sample training set. The training set should cover different chromosome types (e.g., autosomes, sex chromosomes) and different sequence length ranges to ensure the model learns diverse normal distribution patterns. As an example configuration, the training set can contain normal chromosome density sequences from more than 50 known high-quality genomes, with a total sample size ranging from hundreds to thousands of scaffold sequences. For example, one-dimensional density sequences of normal chromosomes can be extracted from known high-quality reference genomes of model organisms such as Saccharomyces cerevisiae, Arabidopsis thaliana, rice, and humans, covering different chromosome length ranges from tens of Mb to hundreds of Mb.
[0038] (b) The loss function is defined with the goal of minimizing the mean squared error (MSE) between the input one-dimensional density sequence and the reconstructed density sequence. For a sequence containing... One-dimensional density sequence of windows and its corresponding reconstruction sequence The mean squared error loss function is defined as: ; This loss function measures the average deviation between the original sequence and the reconstructed sequence at the window-by-window granularity: when the model can accurately learn the normal distribution manifold, normal samples can be reconstructed with high quality and small reconstruction error. (Approaching 0); when the distribution pattern of the input sequence deviates from the normal manifold (e.g., due to assembly errors causing an abnormal distribution of LTR density), the model's decoder cannot accurately reconstruct the abnormal pattern, thus generating a large reconstruction error. It is this characteristic that enables unsupervised training of convolutional autoencoders to distinguish between normal and abnormal sequences.
[0039] (c) Training hyperparameter settings As a preferred configuration, the Adam optimizer (a gradient descent optimization algorithm based on adaptive moment estimation) is used, with an initial learning rate set to... (i.e., 0.001), weight decay is set to... (i.e., 0.00001) to prevent overfitting; the batch size is set to 16 or 32 depending on the size of the training set; the number of training epochs is usually set to 100 to 200 epochs, and is combined with an early stopping mechanism: if the validation set loss no longer decreases within 20 consecutive training epochs, the training is terminated early and the model parameters with the minimum validation set loss are restored.
[0040] (d) Validation set monitoring and overfitting prevention Randomly allocate 10% to 20% of the samples from the normal training set as the validation set. Calculate the mean squared error loss of the model on the validation set after each training round. By monitoring the trend of the validation set loss curve, determine if the model is overfitting: if the training set loss continues to decrease while the validation set loss begins to increase (i.e., the two curves show a divergence), it indicates that the model has begun to memorize specific patterns in the training data rather than learning a general normal distribution manifold. In this case, an early stopping mechanism should be triggered or the regularization strength adjusted. After training, a one-dimensional convolutional autoencoder network model is obtained that can accurately reconstruct the density sequence of normal samples but produces a large reconstruction error for abnormal samples. Save the model parameters (including the weights and biases of each convolutional layer and the weights and biases of each fully connected layer) to a model file (e.g., .pth or .h5 format) for loading in the subsequent detection stage.
[0041] Anomaly detection reasoning: For the target genome to be detected, the one-dimensional density sequence of each scaffold sequence is input into a trained one-dimensional convolutional autoencoder network. The reconstructed density sequence is calculated through forward propagation, and the reconstruction error between the original one-dimensional density sequence and the reconstructed density sequence is calculated. The calculation method for the reconstruction error is consistent with that in the training phase, using the mean squared error formula: ; The percentile of the reconstruction error distribution in the normal training set is used as the manifold deviation boundary. Specifically, after model training is completed, all normal training samples (total...) are... The reconstruction error values of each sequence are calculated using the model to obtain the empirical distribution of reconstruction error for normal samples: This The reconstruction error values are sorted in ascending order, and the nth value is taken. The reconstruction error value corresponding to the percentile (recommended range 85 to 90, default value 85) is used as the manifold deviation boundary threshold. For example, if there are 1000 reconstruction error values in the normal training set, after sorting them from smallest to largest, the reconstruction error value corresponding to the 85th percentile (i.e., the 850th value after sorting) is taken as the threshold. .
[0042] During the detection phase, for the target stent sequence to be detected, if its reconstruction error... Exceeding the manifold deviation boundary (Right now If the entire window covered by the one-dimensional density sequence corresponding to the scaffold sequence is marked as the initial screening abnormal subset, it indicates that the LTR density distribution pattern of the sequence deviates significantly from the distribution manifold of normal chromosomes.
[0043] Specific example: Assume the 85th percentile of the reconstruction error on the normal training set is 0.025. The reconstruction error of a certain stent sequence to be detected is obtained through the model. The value is 0.042, exceeding the threshold of 0.025. Therefore, all windows involved in the one-dimensional density sequence corresponding to this sequence are marked as an initial screening anomaly subset. Conversely, if the reconstruction error of another sequence... If the value is 0.018, which is below the threshold of 0.025, then the window will not be marked as abnormal.
[0044] The above-mentioned percentile threshold-based strategy has adaptive characteristics: as the sample size of the normal training set increases, the statistical stability of the threshold is enhanced; at the same time, the strategy does not rely on prior assumptions about the absolute size of the reconstruction error value, but only on the distribution characteristics of the normal samples themselves, which conforms to the basic paradigm of unsupervised anomaly detection.
[0045] Step S5: Shape anomaly identification based on quartile distribution pattern Step S5 identifies a valley-shaped abnormal distribution pattern caused by large-segment assembly errors by analyzing the global distribution morphology of one-dimensional density sequences across different segments of the chromosome. The biological basis of this step is as follows: On normal chromosomes, the density distribution of LTR retrotransposons along the chromosome extension direction typically exhibits a specific evolutionarily conserved pattern, such as lower density near the centromere and higher density in the middle of the chromosome arm. However, large-segment inversions or translocations during the scaffolding stage (i.e., the scaffold construction stage) disrupt this natural distribution pattern, resulting in a valley-shaped abnormal distribution with high density at both ends and low density in the middle. This is precisely the core abnormal pattern that Step S5 of this invention aims to identify. Step S5 specifically includes the following steps S51 to S53.
[0046] Step S51: Calculation of equal segment division and mean density The one-dimensional density sequence of each stent sequence is divided into four equal segments along the sequence extension direction (i.e., from the 5′ end to the 3′ end), denoted as Q1 (the first segment, corresponding to the first 25% of the sequence, i.e., window 1 to window 2). Q2 (the second segment, corresponding to the 25% to 50% portion of the sequence, i.e., the window) To the window Q3 (the third segment, corresponding to the 50% to 75% portion of the sequence, i.e., the window) To the window Q4 (the fourth segment, corresponding to the last 25% of the sequence, i.e., the window) and Q4 (the fourth segment, corresponding to the last 25% of the sequence). To the window For each segment, calculate the arithmetic mean of the LTR retrotransposon densities of the windows it contains. For example, if a scaffold sequence contains 100 windows, then Q1 corresponds to the mean density of windows 1 through 25. Q2 corresponds to the average density of windows 26 to 50. Q3 corresponds to the average density of windows 51 to 75. Q4 corresponds to the average density of windows 76 to 100. .
[0047] Step S52: Calculation of the density ratio between the two ends and the middle Calculate the ratio between the mean density of the two end segments (Q1 and Q4, corresponding to the first and last 25% of the sequence) and the mean density of the middle segments (Q2 and Q3, corresponding to the 25% to 75% of the sequence). As a specific calculation method, this ratio... Defined as: ;in, and The mean density of the two segments represents the LTR density level in the regions at both ends of the sequence. and This is the mean density of the middle segment, representing the LTR density level in the middle region of the sequence. This ratio... This intuitively reflects the morphological distribution characteristics of LTR density along the longitudinal extension direction of the chromosome: when When the value is close to 1.0, it indicates that the density levels at both ends and in the middle are relatively balanced, showing a flat or normal distribution pattern; when... When significantly greater than 1.0 (e.g.) This indicates that the density at both ends is significantly higher than that in the middle, exhibiting a typical valley-shaped distribution pattern.
[0048] Step S53: Determining the Morphological Antagonism Boundary and Performing Three-Level Classification A preset ratio threshold is used as the morphological antagonism boundary, and segments with ratios exceeding this boundary are marked as morphologically abnormal subsets. The preset range for the ratio threshold is 1.1 to 1.3, and a preferred default value of 1.2 is used. When the ratio of a certain stent sequence... When the morphological antagonism boundary is exceeded (i.e. The sequence is determined to have a valley-shaped abnormal pattern, and the window it covers is marked as a morphologically abnormal subset.
[0049] According to the ratio For levels exceeding the threshold, further classification into three levels is performed. The specific classification rules are as follows: like If judged as normal level; - if The sequence was classified as suspicious (indicating a weak valley-shaped distribution trend, possibly due to normal biological variation or a marginal assembly error); if It was classified as an anomaly (indicating that the sequence exhibits a significant valley-shaped distribution, which strongly suggests the presence of large-fragment assembly errors).
[0050] Specific testing example: The calculated average density of the two end segments of a certain stent sequence... , The average density of the middle section , Substitute into the ratio formula: The ratio of 1.76 is greater than the threshold of 1.2 and exceeds the abnormality level judgment line of 1.5. Therefore, the stent sequence is judged to be of the abnormality level of morphological abnormality, and all its windows are marked as a subset of morphological abnormalities.
[0051] In addition to the valley-shaped distribution, the shape anomaly recognition module can also detect the following two types of distribution anomalies: flat distribution with indistinct density changes (i.e., the density mean differences in the four segments are small, and the LTR density of the entire sequence is approximately horizontally distributed), and irregular distribution without obvious patterns (i.e., there is no inductively predictable regularity among the density mean values of the four segments). These anomalous distribution patterns may all indicate different forms of structural errors in the stent sequence during assembly, but their correlation with assembly errors is lower than that of the valley-shaped distribution pattern, and therefore they are assigned different weights in subsequent fusion decisions.
[0052] Step S6: Statistical analysis based on density difference between adjacent windows Step S6 identifies local mutation points (i.e., outlier windows) in the sequence by analyzing the gradient of transposon element density changes between adjacent windows. This step is based on the following principle: On a correctly assembled normal chromosome, the change in transposon element density along the sequence extension direction (from the 5′ end to the 3′ end) should be gradual and smooth, and the density difference between adjacent windows should generally remain within a small, finite range; however, large-segment assembly errors (such as contig mis-splicing caused by inversions or translocations) introduce drastic, discontinuous density mutations near the erroneous splicing point because the two incorrectly spliced sequences come from different regions of the chromosome, and their respective LTR density backgrounds have significant differences, forming density breakpoints at the splicing boundary. Such local density mutations manifest as statistically significant outliers in the density difference sequences between adjacent windows. Step S6 specifically includes the following steps S61 to S63.
[0053] Step S61: Calculate the density difference sequence between adjacent windows Along the extension direction of the one-dimensional density sequence, the density difference of the transpose element between each pair of adjacent windows is calculated sequentially to construct a density difference sequence. Specifically, for those containing One-dimensional density sequence of windows Its density difference sequence , of which Individual differences , indicating the first The window and the first The density change between windows. A positive value indicates that the LTR density increases along the sequence extension direction. A negative value indicates a decrease in density. This difference sequence retains the local variation information in the original density sequence, but compared with the original density value, the difference sequence can better highlight the local abrupt changes (because the gradual changes in the background are weakened by the difference operation, and the abrupt changes are represented in the difference sequence as extreme values that are much larger than the background fluctuations).
[0054] Step S62: Z-score normalization Density difference sequence for each stent sequence Z-score normalization is performed to eliminate the dimensional effects caused by differences in overall density levels and variations between different stent sequences, ensuring the comparability of test results from different stent sequences. The Z-score normalization formula is: ; in, For stent sequence density difference sequence The arithmetic mean of all (mean) For stent sequence density difference sequence Standard deviation (i.e., all) The standardized Z-score reflects the degree of deviation of each density difference from the average change level of the sequence, and its unit is standard deviation. Specifically: a Z-score close to 0 indicates that the density change in that window is close to the average change level of the sequence, which is a normal gradual change; a large positive Z-score (e.g., above +3) indicates that a positive abrupt change in density has occurred at that window, far exceeding the normal fluctuation range; a large negative Z-score (e.g., below -3) indicates a negative abrupt change that has occurred, far exceeding the normal fluctuation range. Both extreme positive and negative Z-score values indicate that there may be a density breakpoint at that window location due to assembly errors.
[0055] Step S63: Gradient mutation boundary determination and outlier labeling Using a preset standardized threshold as the gradient mutation boundary, windows whose absolute Z-score exceeds the gradient mutation boundary are identified as statistically significant outliers, and the corresponding windows are marked as outlier subsets. The preset range of the standardized threshold (i.e., the Z-score threshold) is 4.0 to 5.0, and 4.5 is chosen as a preferred default value.
[0056] When the absolute value of the Z-score corresponding to a certain window exceeds 4.5 (i.e. This indicates that the density variation at this window exceeds 4.5 times the standard deviation of the normal fluctuation level of the sequence. Under the assumption of a standard normal distribution, the probability of the absolute value of the Z-score exceeding 4.5 is approximately... Such outliers are extremely rare events, almost impossible to occur under normal biological variation. Therefore, once such extreme outliers appear, it can be determined with high confidence that there is a density breakpoint at that window location due to assembly errors.
[0057] Specific testing example: A stent sequence contains 100 windows. After Z-score normalization, the Z-score value between window 47 and window 48 is... The absolute value of the value exceeds the default threshold of 4.5, so windows 47 and 48 are marked as outlier subsets, and this location is identified as a suspected assembly error breakpoint location.
[0058] Outlier detection has the following advantages over deep learning and morphological detection: it is highly sensitive to local mutation points in the sequence (capturing mutations at the single window level), has extremely low computational complexity (involving only adjacent difference operations and simple mean and standard deviation statistics, without the need for model training or iterative calculations), and can efficiently and quickly locate target regions containing significant density breakpoints from thousands of scaffold sequences, making it very suitable for high-throughput batch screening scenarios.
[0059] Step S7: Multi-method fusion decision. Step S7 is the key step in achieving high-precision anomaly determination in this invention. This step performs a step-by-step fusion determination on the initial screening anomaly subset obtained in Step S4 (based on deep learning reconstruction error, corresponding to deep reconstruction residual features), the morphological anomaly subset obtained in Step S5 (based on quartile distribution pattern, corresponding to global morphological features), and the outlier anomaly subset obtained in Step S6 (based on adjacent window density difference, corresponding to local mutation features), according to a preset priority fusion path. Finally, the multi-level structural anomaly determination result for each stent sequence is output.
[0060] The fusion decision logic is designed based on multimodal feature fusion rules. Three detection methods characterize the degree of anomaly in the sequence from different feature dimensions, complementing each other. Specifically: the density difference between adjacent windows (normalized by Z-score) is used as a local mutation feature, which has extremely high sensitivity and statistical confidence for mutations at single breakpoints in the sequence; the ratio of the mean density of the two end segments to the middle segment is used as a local mutation feature. As a global morphological feature, this feature can characterize the morphological aberrations of the sequence along the longitudinal extension of the chromosome as a whole; it can also represent the reconstruction error. As a deep reconstruction residual feature, this feature, based on the deep learning model's learning of the normal distribution manifold, can adaptively capture any complex anomalous signals deviating from the normal pattern. The multi-method fusion decision specifically includes the following steps S71 to S74.
[0061] Step S71: Determine the highest priority of outlier anomalies In the priority fusion path, outlier subsets (i.e., local mutation features based on the Z-score of the density difference between adjacent windows) are assigned the highest priority. If the target window belongs to an outlier subset (i.e., the window corresponding to...), then... If the target window region is found to be structurally abnormal (abnormality level), then the results of the morphological abnormality subset and the initial screening abnormality subset are directly determined, without needing to refer to them. This highest priority design is based on the following statistical reasoning: the probability of extreme outliers with an absolute Z-score exceeding 4.5 occurring under a standard normal distribution is approximately [missing information]. Such outliers are almost impossible to occur in normal biological variation; moreover, local density mutations directly correspond to density discontinuities between two physical locations on a chromosome, which is highly consistent with the physical nature of assembly errors (mis-splicing). Therefore, once such extreme outliers are detected, it can be directly determined that there is an abnormality in the assembly structure.
[0062] Step S72: Three-level classification of morphological abnormalities For scaffold sequences not directly identified by outlier subsets (i.e., all windows) (None of them exceeded the threshold), and the results of the morphologically abnormal subset were classified into three levels. Based on the ratio... The degree of deviation between the mean density of the two end segments and the mean density of the middle segment and the morphological antagonistic boundary (default 1.2) is determined by the following three-level classification criteria: like It is classified as a normal level. This indicates that the LTR density distribution of the stent sequence does not exhibit a clear valley-shaped distribution pattern; if It was classified as suspicious. This indicates that the scaffold sequence exhibits a certain degree of valley-shaped distribution trend, but the signal intensity is weak, which may be a normal biological variation or a marginal assembly error; if It is classified as an abnormal level ( The presence of a significant valley-shaped distribution in the scaffold sequence indicates a high likelihood of large-segment assembly errors.
[0063] Step S73: Deeply reconstruct the residual three-level classification For scaffold sequences not directly identified by the outlier subset, the initial outlier subset identification results are classified into three levels based on reconstruction error. Based on the percentile relationship with the reconstruction error distribution of the normal training set, the following three-level classification criteria are established: like The 85th percentile (i.e., the 85th percentile value of the training set, which is the default threshold for manifold deviation from the boundary) is judged as normal. This indicates that the LTR density distribution of the stent sequence matches the normal manifold, and the model's decoder can reconstruct the sequence with high quality. If the 85th percentile The 95th percentile is classified as suspicious. This indicates that the distribution pattern of the stent sequence deviates from the normal manifold to some extent, but the degree of deviation is limited; like The 95th percentile is classified as an abnormal level. The ), indicates that the distribution pattern of the stent sequence deviates significantly from the normal manifold, and the model cannot accurately reconstruct the sequence.
[0064] Step S74: Joint Voting and Confirmation Mechanism The three-level classification results of the comprehensive morphological anomaly subset ( ) and the three-level classification results of the initial screening of abnormal subsets ( The system executes a joint voting logic, combining global morphological features and deep reconstruction residual features to perform a joint vote, outputting the final anomaly determination result. The specific rules for the joint voting are as follows: Large fragment assembly error confirmation rule: When a subset with abnormal morphology is determined to be abnormal (i.e. Furthermore, the deep reconstruction residual determination is also abnormal (i.e.) When both global morphological features and deep reconstruction residual features simultaneously indicate a severe anomaly, a large-fragment assembly error confirmation mechanism is triggered, ultimately classifying the stent sequence as an anomaly and labeling it as "Both pattern and CNN detected anomaly" in the anomaly type description. Statistical validation with large-scale real-world data shows that when this confirmation mechanism is triggered, the confidence level for large-fragment assembly errors in the stent sequence is extremely high, with an extremely low false positive probability, making it the highest-confidence classification in the output results of this invention.
[0065] Highly Suspicious Rule: When one of the morphologically abnormal subset and the deep reconstruction residual is judged as abnormal (Label=2) and the other is judged as suspicious (Label=1), the scaffold sequence is finally judged as suspicious. It is recommended that users conduct manual verification in conjunction with other information (such as Hi-C contact matrix map, original sequencing read re-alignment, etc.).
[0066] Unilateral anomaly rule: When only a subset of morphological anomalies is judged as anomaly while the deep reconstruction residual is judged as normal (i.e. and ), or when only the deep reconstruction residual is judged as abnormal while the morphological abnormal subset is judged as normal (i.e. and The scaffold sequence was ultimately classified as suspicious. In this case, the possibility of a false positive cannot be ruled out, because the LTR density distribution patterns of different species or different chromosome types have their own biological diversity background. Abnormal signals from a single detection method may originate from real biological variations (such as the existence of abnormal LTR distributions that are not caused by assembly errors) rather than technical errors in the assembly process. Therefore, it is recommended that users pay attention to the original data and perform manual identification to confirm the cause of the abnormality.
[0067] Normal rule: When both the morphologically abnormal subset and the deep reconstruction residual are judged to be normal or suspicious (but do not simultaneously meet the conditions of rules 1 to 3 above), the stent sequence will be ultimately judged to be normal.
[0068] The design philosophy of the aforementioned multimodal feature fusion rules can be summarized as follows: local mutation features (outliers) have the highest priority due to their highest statistical confidence, and are directly identified as anomalies upon their appearance; global morphological features and deep reconstruction residual features independently characterize the degree of sequence anomaly from different dimensions (macroscopic distribution morphology and nonlinear manifold learning), and the two are jointly voted to achieve cross-validation. Only when both independent detection dimensions give strong anomalous signals is the existence of large-segment assembly errors confirmed. This multimodal fusion logic effectively filters out background noise interference and false positive signals that may be generated by single detection methods, accurately locates the real large-segment assembly errors, and provides a high-confidence reference for subsequent manual review or assembly correction.
[0069] Step S8: Result Output. In step S8, TEADS outputs the multi-level structural anomaly determination results in various formats, providing users with a comprehensive reference that can be directly used for subsequent manual review or assembly correction. The result output includes the following five aspects: The abnormality classification results are output for each scaffold sequence, categorized into three levels: abnormal, suspicious, and normal. For each analyzed scaffold sequence, the output includes its unique identifier (chromosome or scaffold sequence ID), total sequence length (in bp, i.e., base pairs), effective window size, and specific intermediate scoring metrics for each detection method (including deep learning reconstruction error). Value, morphology ratio These intermediate metrics (such as the maximum Z-score absolute value, etc.) and the final fusion judgment result help users trace the source and intensity of abnormal signals during subsequent manual review.
[0070] The anomaly type description outputs specific text describing the anomaly type for detected abnormal regions, helping users quickly understand the nature of the anomaly. When the large fragment assembly error confirmation mechanism is triggered (i.e., Both pattern and CNN detected anomaly), the anomaly type description is "valley-shaped distribution anomaly (suspected large fragment assembly error)," indicating to the user that the scaffold sequence is highly likely to have structural errors such as large fragment inversions or translocations introduced during the scaffolding stage, and recommends prioritizing manual review or assembly correction. When only outlier subsets trigger direct judgment, the anomaly type description is "local density breakpoint anomaly," and the specific breakpoint window number and location information are given (e.g., the abnormal breakpoint is located between window 47 and window 48), making it easier for users to locate the specific physical region of the chromosome.
[0071] The result is a data table file, generating two structured data table files: The first results table (default output file name is te_anomaly_results.csv or te_anomaly_results.xlsx) contains complete detection information for all analyzed scaffold sequences. Each row in this table corresponds to one scaffold sequence and includes the following fields: Genome ID, Chromosome or Scaffold Sequence ID, Sequence Length (in bp), Number of Effective Windows (WindowCount), Reconstruction Error (ReconstructionError), CNN Classification Result (CNNLabel, value 0 / 1 / 2), and Pattern Ratio (PatternRatio). The results include: the three-level classification result of the pattern (PatternLabel, with values of 0 / 1 / 2), the maximum absolute Z-score (Max|Z-score|), the outlier detection result (OutlierLabel), the final fusion result (FinalLabel, with values of normal / suspicious / abnormal), and the anomaly type description (AnomalyTypeDescription).
[0072] The second result table (the default output file name is anomalous_scaffolds.csv or anomalous_scaffolds.xlsx) only includes stent sequences that are ultimately judged to be abnormal or suspicious (i.e., a subset after filtering the first result table). In addition to including all the fields in the first result table, it also includes more detailed intermediate calculation indicators and specific window number ranges for abnormal areas, making it easier for users to focus on reviewing stent sequences with potential structural problems.
[0073] This PDF file visualizes the distribution of abnormal scaffold sequences on the chromosome (default filename: anomaly_all_scaffolds.pdf), presenting a one-dimensional density sequence curve for each scaffold sequence. The distribution plot is presented as a line graph or bar chart: the horizontal axis represents the window number (arranged sequentially along the chromosome extension direction from the 5′ end to the 3′ end), and the vertical axis represents the LTR retrotransposon density value (expressed as the number or percentage of LTR-covered base pairs per Mb base pair). Normal regions are drawn in gray or blue, while windows identified as abnormal regions are highlighted in red, with the abnormality type (e.g., valley-shaped distribution abnormality, local density breakpoints, etc.) labeled on the plot. Users can quickly understand the LTR density distribution morphology and spatial location of abnormal signals for all abnormal scaffold sequences by browsing this PDF file.
[0074] Logs and statistics are provided throughout the entire program's operation. This includes information on the reading and processing of all input files (including the total number of stent sequences read, the number of valid stent sequences after filtering, and the source information of each data file), detection rate statistics for each detection method (including the number and percentage of anomaly detection windows for deep learning anomaly detection, the number and percentage of anomaly detected stent sequences for morphological anomaly detection, the number and percentage of anomaly detection windows for outlier anomaly detection, and the final number and percentage of anomaly and suspicious stent sequences after fusion decision), and a detailed list of anomaly stent sequences. All of these are printed in real-time to the standard output (terminal screen) and simultaneously written to the log file. Users can view the log information to gain a comprehensive understanding of the entire detection process's operational status and intermediate statistical results, enabling them to optimize detection parameters or conduct traceability analysis of anomaly signals.
[0075] A system for identifying genome assembly structural anomalies based on deep learning, comprising: The data preprocessing module is used to obtain transposon element annotation data of the target genome, divide the chromosome into continuous sliding windows along the one-dimensional sequence direction, count the LTR retrotransposon density in each window, and construct a one-dimensional density sequence. The deep learning anomaly detection module is used to input a one-dimensional density sequence into a pre-trained one-dimensional convolutional autoencoder network, output a reconstructed density sequence, and calculate the reconstruction error. The distribution percentile is used as a marker of manifold deviation from the boundary to initially screen anomaly subsets. The shape anomaly recognition module is used to divide the one-dimensional density sequence into multiple segments including two end segments and a middle segment, calculate the ratio of the density mean of the two end segments to the middle segment, and use the ratio threshold as the morphological antagonism boundary to mark the morphological anomaly subset. The statistical analysis module is used to calculate the density difference between adjacent windows and perform standardization processing, using the standardized threshold as the gradient mutation boundary to mark outlier subsets. The fusion decision module is used to perform step-by-step fusion judgment on the initial screening abnormal subset, morphological abnormal subset and outlier abnormal subset according to the preset priority fusion path, and output multi-level structural abnormal judgment results.
[0076] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles described in the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for identifying abnormalities in genome assembly structure based on deep learning, characterized in that, include: Obtain transposon element annotation data of the target genome, divide continuous sliding windows along the one-dimensional sequence direction of the chromosome, count the LTR retrotransposon density in each window, and construct a one-dimensional density sequence; A one-dimensional density sequence is input into a pre-trained one-dimensional convolutional autoencoder network, which outputs a reconstructed density sequence and calculates the reconstruction error between the one-dimensional density sequence and the reconstructed density sequence. The percentile of the reconstruction error in the normal sample training set is used as the manifold deviation boundary, and the target window whose reconstruction error exceeds the manifold deviation boundary is marked as an initial screening abnormal subset. The one-dimensional density sequence is divided into multiple segments along the sequence extension direction, including two end segments and a middle segment. The ratio between the density mean of the two end segments and the density mean of the middle segment is calculated. A preset ratio threshold is used as the morphological antagonism boundary. Segments with ratios exceeding the morphological antagonism boundary are marked as morphological abnormal subsets. Along the extension direction of the one-dimensional density sequence, the density difference between adjacent windows is calculated and the density difference is standardized; using a preset standardization threshold as the gradient mutation boundary, windows whose standardized density difference exceeds the gradient mutation boundary are marked as outlier subsets. According to the preset priority fusion path, the initial screening abnormal subset, morphological abnormal subset and outlier abnormal subset are fused and judged step by step; among them, if the target window belongs to the outlier abnormal subset, the area where the target window is located is directly judged to be structurally abnormal. Otherwise, by combining the labeling status of the initial screening abnormal subset and the morphological abnormal subset, the multi-level structural abnormality determination result of the target genome is output.
2. The method as described in claim 1, characterized in that, A one-dimensional convolutional autoencoder network consists of an encoder and a decoder; The encoder uses a one-dimensional convolutional neural network structure, which contains multiple convolutional layers. The size of the convolutional kernel increases along the network depth, and ReLU activation function and adaptive pooling are used. The decoder uses a fully connected neural network structure to reconstruct the input sequence through multiple linear transformations, and the output dimension is consistent with the length of the one-dimensional density sequence.
3. The method as described in claim 2, characterized in that, The training process of a pre-trained one-dimensional convolutional autoencoder network includes: Unsupervised training is performed using a one-dimensional density sequence of normal samples; The optimization objective is to minimize the mean square error loss between the one-dimensional density sequence and the reconstructed density sequence. By monitoring overfitting using the validation set, a trained one-dimensional convolutional autoencoder network is obtained.
4. The method as described in claim 3, characterized in that, Obtain transposon element annotation data of the target genome, divide the chromosome into continuous sliding windows along the one-dimensional sequence direction, calculate the LTR retrotransposon density within each window, and construct a one-dimensional density sequence, including: Transposon element annotation was performed on the target genome to obtain distribution information of LTR retrotransposons, LINE elements, SINE elements, DNA transposons, and unknown transposons; Each chromosome or scaffold sequence is divided into a fixed-size sliding window, and the density values of various transposon elements are calculated within each window; The stent sequences are filtered according to the preset minimum number of windows and minimum sequence length threshold, and the identifiers of data files from different sources are normalized to generate a comprehensive transposition element density index as a one-dimensional density sequence.
5. The method as described in claim 4, characterized in that, The one-dimensional density sequence is divided into multiple segments along the sequence extension direction, including end segments and middle segments. The ratio between the mean density of the end segments and the mean density of the middle segment is calculated, including: Each stent sequence is divided into four equal segments, and the average density value of each segment is calculated. Calculate the ratio between the average density values of the two end sections and the average density value of the middle section; The preset ratio threshold range for the morphological antagonism boundary is 1.1 to 1.3; when the ratio exceeds the morphological antagonism boundary, it is determined to be a valley-shaped abnormal pattern and marked as a morphological abnormal subset.
6. The method as described in claim 5, characterized in that, Along the extension direction of the one-dimensional density sequence, the density difference between adjacent windows is calculated, and the density difference is standardized, including: Calculate the sequence of transpose element density differences between adjacent windows; The density difference sequence is Z-score normalized. The preset normalization threshold range for gradient mutation boundaries is 4.0 to 5.0; windows where the density difference after Z-score normalization exceeds the gradient mutation boundary are identified as statistically significant outliers and marked as outlier subsets.
7. The method as described in claim 6, characterized in that, According to the preset priority fusion path, the initial screening abnormal subset, morphological abnormal subset, and outlier abnormal subset are fused and judged step by step, including: If an anomaly is detected in the outlier subset, the corresponding region is directly determined to be a structural anomaly. The morphologically abnormal subset is classified into three levels—normal, suspicious, and abnormal—based on pattern scoring. The initial screening of abnormal subsets is classified into three levels: normal, suspicious, and abnormal, based on the reconstruction error relative to the threshold of the training data. When a stent sequence is simultaneously identified as an anomaly in both the morphological anomaly subset and the initial screening anomaly subset, it is confirmed that there is a large segment assembly error.
8. The method as described in claim 1, characterized in that, Output the results of multi-level structural anomaly determination of the target genome, including: Output the abnormal status classification results for each stent sequence. The abnormal status classification results include three levels: abnormal, suspicious, and normal. Output an anomaly type description for the detected abnormal areas, including valley-shaped distribution anomalies; Generate a first result table containing analysis information for each chromosome, and a second result table containing detailed information for each abnormal chromosome, and output a distribution map of abnormal scaffold sequences on the chromosomes.
9. The method as described in claim 1, characterized in that, The judgment logic for multi-level structural anomaly detection results is based on multi-modal feature fusion rules, which include: The density difference between adjacent windows is used as a local mutation feature, the ratio of the mean density of the two end segments to the middle segment is used as a global morphological feature, and the reconstruction error is used as a deep reconstruction residual feature. In the priority fusion path, local mutation features have the highest priority, while global morphological features and deep reconstruction residual features are jointly voted on. When both global morphological features and deep reconstruction residual features indicate anomalies, a mechanism for confirming large fragment assembly errors is triggered.