A long-read sequencing structural variant detection method and system based on weakly supervised graph inference and event-level validation
By employing a method based on weakly supervised graph inference and event-level verification, the problems of signature noise and rigid clustering rules in long-read sequencing technology are solved, achieving high sensitivity and specificity in structural variation detection, adapting to different types of variations, reducing false positives, and being suitable for large-scale data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-21
AI Technical Summary
Existing long-read sequencing technologies suffer from significant signature noise, rigid clustering rules, lack of fine-grained supervision, and insufficient feature engineering in structural variation detection, leading to increased false positives and unstable detection.
We employ a method based on weakly supervised graph inference and event-level verification. Through steps such as signature extraction, node feature encoding, candidate edge construction, edge scoring, graph clustering, and event-level verification, we utilize the characteristics of long-read sequencing data to adaptively handle different types of structural variations, thereby improving detection sensitivity and specificity.
In the absence of read-level real annotations, it achieves suppression of noisy evidence, stabilizes the event-level inference process, reduces false positives, is suitable for large-scale whole-genome data processing, and has good scalability and engineering deployability.
Smart Images

Figure CN122435977A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of bioinformatics and artificial intelligence, specifically relating to a method and system for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification. Background Technology
[0002] Structural variations, including insertions, deletions, inversions, duplications, and translocations, are typically longer than 50 bp and have a significant impact on genetic diseases, tumor development, and population evolution. With the development of long-read technologies, read lengths have increased significantly, providing more direct evidence for structural variation detection. Current long-read SV detection methods mostly employ a "evidence extraction—clustering / merging—filtering output" workflow. Evidence is often extracted as read-level signatures from alignment files (BAM / CRAM) in the form of CIGAR anomalies, split alignment (SA tags), and soft-clips. These signatures are then clustered based on rules such as genomic proximity, similar length, or read consistency to form candidate events. However, current technologies still have the following shortcomings: Significant signature noise: Long read length comparisons are prone to mismatches, breakpoint drifts, and pseudo-splits in repetitive and complex structural regions, thus introducing a large number of noisy signatures and leading to an increase in false positives.
[0003] Inflexible clustering rules: relying solely on geometric distance with a fixed threshold or a simple merging strategy makes it difficult to simultaneously consider the differences in evidence under different coverage, different regional complexities, and different SV types.
[0004] Lack of fine-grained supervision: Real data usually only provides event-level truth values (VCF), lacking read-level / signature-level true annotations, making it impossible to conduct strongly supervised training on "which signatures should be merged into the same event".
[0005] Insufficient feature engineering: Existing deep learning methods typically use only simple numerical features (such as location and length), failing to fully utilize rich contextual information such as alignment quality, source type, and local coverage.
[0006] Therefore, there is an urgent need for a structural variation detection method based on weakly supervised graph inference and event-level verification that can balance scalability, robustness and interpretability in the absence of segment-level real annotations, so as to improve the ability to suppress noisy evidence and stabilize the event-level inference process. Summary of the Invention
[0007] The purpose of this invention is to address the above-mentioned problems by providing a method and system for detecting long-read sequencing structural variations based on weakly supervised graph inference and event-level verification, which fully utilizes the characteristics of long-read sequencing data, adaptively processes different types of structural variations, and has high detection sensitivity and specificity.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: a structural variation detection method based on weakly supervised graph inference and event-level verification, comprising seven processes: signature extraction, node feature encoding, candidate edge construction, edge scoring, graph clustering, event-level verification, and post-processing output. The specific steps are as follows: S1: Signature Extraction. Read the sequencing alignment file BAM and extract read-level structural variation signatures from alignment anomalies such as CIGAR information, split alignment (SA tag), and soft-clip. Each signature contains at least the following fields: chromosome, start and end positions, span / length, type, orientation / chain information, and supporting read identifiers.
[0009] S2: Node Feature Encoding. Each signature is mapped to a graph node, and a node feature vector is constructed, including genomic geometric location features, SV morphological features, support strength, and alignment quality (e.g., a 24-dimensional feature vector). Location-based features are normalized within a local window to eliminate cross-regional scale differences.
[0010] S3: Candidate edge construction. The genome is divided into several blocks of fixed length, and overlapping drift intervals are set. Candidate edges are generated only within the same block according to weak rules, including but not limited to: proximity, occurrence of the same read, support for multiple reads, and type compatibility, thereby avoiding computational explosion and misconnections across long distances caused by full connectivity.
[0011] S4: Edge Scoring (Weakly Supervised Training and Inference). For candidate edges, edge features are constructed (e.g., 7-dimensional features such as center distance, breakpoint difference, span similarity, same-reading segment indication, type compatibility indication, etc.), which are input into the edge scoring model and output edge confidence scores p∈[0,1]. The training labels of the edge scoring model are indirectly inferred through event-level ground truths: signatures are matched with ground truth events with tolerance; if two signatures match the same ground truth event, the corresponding edge is marked as a positive example; otherwise, it is marked as a negative example or ignored.
[0012] S5: Graph sparsification and clustering. Threshold filtering and Top-M mutual selection constraints are performed based on edge confidence to obtain a sparse high-confidence graph. Minimum support constraints (k-core) and dense subgraph constraints (quasi-cliquepeeling) are applied to this graph to output several signature clusters, each cluster corresponding to a candidate SV event.
[0013] S6: Event-level Validation. Extract event-level features (such as cluster size, edge score distribution, geometric consistency, breakpoint variance, graph density, etc.) for each candidate event cluster, input them into the event-level validation model, and output the event credibility; filter out untrustworthy event clusters based on a threshold to reduce false positives.
[0014] S7: Post-processing and output. Calculate breakpoints and length consensus (e.g., median or weighted median) for the retained event clusters, statistically analyze the number of support reads and quality metrics, perform filtering based on length / support / alignment quality, and finally output structural variation results in VCF format.
[0015] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S1 is as follows: The sequencing alignment file (BAM) of the sample to be tested (which may contain master and supplementary alignment information) is read, and the alignment records of each read are traversed one by one. Structural variation evidence signals are extracted using insertion / deletion operations, split alignment (e.g., segment alignment indicated by SA tags), and anomalous alignment modes such as soft-clip in CIGAR. For each read with anomalous alignment on the same chromosome, a read-level structural variation signature is constructed, and its key fields are recorded, including but not limited to: chromosome identifier, start and end coordinates (or breakpoint pairs), length estimate (span or SGLEN), SV type (DEL / INS / INV / DUP / TRA, etc.), strand orientation / breakpoint topology information, supporting read identifiers (qname), and optional alignment quality statistics (such as MAPQ, soft-clip length, alignment consistency, etc.). To ensure the stability of subsequent graph inference, obviously untrustworthy signatures can be initially screened (e.g., signatures with excessively low MAPQ, lengths below the minimum threshold, or signatures generated solely by a short single-end clip without other corroborating evidence).
[0016] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S2 is as follows: Each signature is treated as a graph node, and a fixed-dimensional node feature vector is constructed to characterize the signature's geometric location, morphological attributes, and strength of evidence. Node features may include: breakpoint coordinates and interval span (geometric location features), SVEN and type-related statistics (morphological features), number of supporting reads / local depth / support ratio (strength of evidence features), and alignment quality aggregation indicators (such as MAPQ mean or quantiles). To mitigate scale differences across different genomic regions, location features are preferably processed using a "local window normalization" approach: using statistics within the node's window (e.g., a fixed radius or block range) as a scale benchmark, coordinate differences are mapped to a finite interval, thereby improving cross-regional generalization ability. The node feature dimension can preferably be 24 dimensions or other fixed dimensions; the specific dimension does not limit the scope of this invention.
[0017] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S3 is as follows: To avoid the secondary complexity caused by global pairwise connections, each chromosome is first divided into several blocks of fixed length, with overlapping drift intervals set between adjacent blocks. Simultaneously, buffer zones (preferably not less than the maximum allowed edge distance) are set on both sides of each block to ensure that signatures near the boundary can still connect with signatures in adjacent blocks. Then, candidate edges are generated only within the candidate signature set of the same block, based on weak rules. These preferably include the following two sources: First, spatial proximity edges, where signatures within a block are sorted by their center coordinates, and each signature is only connected to a fixed number of its immediate neighbors, requiring them to be from the same chromosome and their center distance not exceeding the maximum distance threshold; optionally, consistent SV types are further required to reduce cross-type false connections. Second, same-read segment edges, where signatures are grouped by qname, and within the same read segment group, after sorting by coordinates, only adjacent or a small number of neighboring signatures are connected. This is used to express the collaborative relationship between multiple abnormally aligned segments within the same read segment; same-read segment edges allow cross-type connections to cover complex event scenarios. Duplicate edges generated by both rules are merged and deduplicated, and the source label (spatial / same reading segment / dual source) of each edge is recorded for subsequent feature calculation and weighting.
[0018] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S4 is as follows: For each candidate edge obtained in step S3, a fixed-dimensional edge feature vector (preferably 7-dimensional) is constructed to characterize the relative relationship and consistency evidence between the signatures at both ends. Edge features may include: center distance or its normalized form, breakpoint difference, length / span similarity, interval overlap, same-segment indication, same-chromosome indication, type compatibility indication, etc., and may be supplemented by the aggregation of the signature confidence scores at both ends. The "node features (both ends) + edge features" are input into the edge scoring model, and the edge confidence score is output. , which represents the probability that the signatures at both ends belong to the same real event.
[0019] During the training phase, the edge scoring model employs weakly supervised label construction: signatures are matched with ground truth events with tolerance (e.g., allowable breakpoint offset, allowable length ratio range, or center distance tolerance for insertion). If both signatures match the same ground truth event, the edge is labeled as a positive example; if they match different ground truth events or only one end matches, it is labeled as a negative example or ignored (edges with "high uncertainty" are preferably ignored to reduce noise supervision). To alleviate the imbalance between positive and negative samples, class weights, hard example mining, or negative sampling strategies can be used to ensure model convergence stability. During the inference phase, candidate edges are directly output. This data will be used for subsequent sparsification and clustering.
[0020] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S5 is as follows: First, candidate edges are thresholded based on edge confidence, eliminating low-confidence edges to reduce noisy connectivity. Then, a mutual selection Top-M constraint is applied: for each node, its adjacent edges are sorted by confidence from highest to lowest, retaining only the top M strong connections as the candidate set for that node; an edge is only retained if both its two endpoints are simultaneously selected into the top M sets, thus forming a sparse, high-confidence graph. Considering that a "graph that is too sparse or even edgeless" may occur when the threshold is too strict or the data is sparse, a fallback strategy is preferred, such as lowering the threshold and retrying, or switching the mutual selection constraint to a unidirectional Top-M (retained as long as it enters either endpoint within the top M sets), to avoid process failure.
[0021] After obtaining the sparse graph, a minimum support constraint (k-core) is first applied: nodes with a degree less than k are iteratively deleted, thus removing isolated and noisy nodes with insufficient support. Then, the remaining graph is split according to its connected components, and a dense subgraph constraint (quasi-clique peeling) is applied to each connected subgraph, i.e., insufficiently connected nodes are repeatedly peeled off until the minimum density requirement is met or the size is below the lower limit. Denseness can use a commonly used definition, such as for subgraphs... Pick
[0022] in, Subgraph The set of edges, Subgraph The set of nodes. Only retain those that satisfy... and The subgraph is used as the event candidate cluster. Finally, several signature clusters are output, each cluster corresponding to a candidate structural mutation event.
[0023] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S6 is as follows: Each candidate cluster output in step S5 is considered a candidate event. Event-level features are extracted from each cluster, and a secondary confidence assessment is performed to reduce false positives. Event-level features may include: cluster size (number of nodes), support for deduplication counting of read segments, edge confidence distribution statistics (such as median / quantile / dispersion), geometric consistency features (such as breakpoint clustering degree, coordinate span stability), and graph structure features (such as density, mean degree, etc.). These event-level features are input into the event-level validation model, and the event confidence score is output. ;when Candidate clusters below a certain threshold are deemed untrustworthy and eliminated. To improve robustness, rule backoff can be optionally introduced: clusters with excessively small size, abnormal local depth, or low support ratios can be directly classified as untrustworthy; when the model is unavailable, validation can be completed using only the rule threshold set. Event-level validation can effectively suppress pseudo-clusters formed by local noise aggregation.
[0024] In the above-mentioned method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification, the implementation process of step S7 is as follows: The final VCF event record is generated for candidate clusters that pass event-level validation. A robust aggregation strategy is preferred for breakpoint and length consensus: for example, the median or weighted median of the start / end points of signatures within a cluster is used as POS / END, and the median of the length estimate within a cluster is used as SVENEN. For insertion events, the center site can be used as POS, and END can be set to POS or POS+1 according to VCF expression rules. The number of supported reads is preferably counted by deduplication of qname to avoid duplicate contributions from the same read causing inflated support; simultaneously, alignment quality and support strength indicators (such as MAPQ aggregation, support ratio, etc.) are statistically analyzed. Necessary filtering is performed before output, including length threshold, support threshold, alignment quality threshold, and filter parameters customized according to SV type. Finally, the retained events are output in VCF format, including necessary INFO fields (SVTYPE, SVENEN, END, SUPPORT, confidence, etc.) and optional genotyping / quality fields for subsequent evaluation and downstream analysis.
[0025] Compared with existing technologies, the advantages of this invention are: 1. In the absence of segment-level true annotations, a weak supervision signal is constructed through indirect matching of event-level truth values to learn the signature association relationship and reduce the dependence on manual thresholds.
[0026] 2. The graph inference strategy of “local candidate edges + learned edge confidence + dense subgraph constraints” can maintain structural consistency and reduce false connections across events even when noisy evidence exists.
[0027] 3. An event-level verification module is introduced to perform secondary screening of candidate clusters from the perspective of overall event consistency and statistical characteristics. This can effectively suppress pseudo-events caused by local noise and improve system stability.
[0028] 4. Based on block partitioning and sparsification strategies, it can adapt to large-scale whole-genome data processing and has good scalability and engineering deployability. Attached Figure Description
[0029] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a schematic diagram of graph inference-dense subgraph-event generation of the present invention; Figure 3 This is a diagram of the EdgeNet network architecture of the present invention. Detailed Implementation
[0030] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Example 1
[0031] like Figure 1-3 As shown, this embodiment presents a method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level validation. The inputs are the sequencing alignment file (BAM) of the sample to be tested and the reference genome information, and the output is a set of structural variations in VCF format. This method includes seven processes: signature extraction, node feature encoding, candidate edge construction, edge scoring, graph sparsification and clustering, event-level validation, and post-processing output. The specific implementation is as follows.
[0032] Step S1: Signature extraction.
[0033] In this embodiment, three types of segment-level structural variation signals are extracted from the BAM alignment records to construct variation signatures: (1) CIGAR signature: Traverse the CIGAR string of each alignment record. When an insertion (I) or deletion (D) occurs and the length is not less than a preset threshold (e.g., 50bp), record the reference coordinates, query coordinates, and event length, and extract the insertion sequence (if available) for the insertion event, where I corresponds to INS and D corresponds to DEL; (2) SA tag signature: Parse Supplementary Alignment (SA) tags obtain auxiliary alignment fragment information and perform coordinate transformation and type determination: when the main alignment and auxiliary alignment are located on different chromosomes, it is determined as TRA; when the two alignments are aligned in the same direction and there is a significant gap between the reference coordinates and no gap between the query coordinates, it is determined as DEL; when the two alignments are aligned in the same direction and there is a significant gap between the query coordinates and no gap between the reference coordinates, it is determined as INS; when the two alignments are reversed, it is determined as INV; when the reference sequence has a negative gap (overlap), it is determined as DUP; (3) Soft-clip signature: when there is a long soft clipping at both ends of the read (e.g., ≥80bp) and the position is not covered by the SA tag signature, the soft clipping length is used as the potential insertion length estimate and an INS signature is generated. At the same time, the duplicate count is avoided by comparing with the SA signature position. Each signature contains at least the chromosome, start and end positions, span / length, type, chain information or topology (if available), supporting read identifier (qname), and optional alignment quality information (e.g., MAPQ).
[0034] Step S2: Node feature encoding.
[0035] In this embodiment, each signature is mapped to a graph node, and a fixed-dimensional node feature vector is constructed for subsequent edge scoring and clustering. The node features preferably include four types of information: (1) Type features: one-hot encoding of SV type and source marker; (2) Geometric features: numerical features such as signature span and length, preferably using log1p transformation to enhance robustness to SVs of different magnitudes; (3) Evidence strength features: support, local sequencing depth, support ratio (e.g., VAF); (4) Alignment quality features: MAPQ normalization, signature confidence, etc.
[0036] Step S3: Candidate edge construction.
[0037] In this embodiment, to reduce the computational complexity of global pairwise edges, the genome is divided into several blocks of fixed length, and overlapping intervals are set to cover cross-boundary events. Candidate edges are generated only within the same block according to weak rules, using a dual strategy: (1) Spatial proximity edges: Signatures within the block are sorted by their center positions, and each signature is associated with each of its preceding and following edges. Candidate edges are established from the nearest neighbors, among which Preferably 8–16; simultaneously impose constraints: the two signatures are located on the same chromosome, the center distance does not exceed the maximum distance threshold (preferably 10–100kb, e.g. 50kb), and spatial edges are only established between signatures of the same SV type to avoid mis-aggregation of different types. (2) Same-read edge: signatures from the same read are grouped by qname, and candidate edges are established within the group to express the cooperative relationship of multiple abnormally aligned segments within the same read; same-read edges allow cross-type connections to support the detection of complex mutations (e.g., INS+DEL combination at breakpoints). Merge and deduplication are performed on duplicate candidate edges, and the source type of the edge (spatial, same-read, or dual-source) is recorded for subsequent processing.
[0038] Step S4: Edge scoring (weakly supervised training and inference).
[0039] In this embodiment, to probabilistically determine whether candidate edges belong to the same real event, an edge attribute feature vector (preferably 7-dimensional) is constructed for each candidate edge to characterize the relative relationship and consistency of the signatures at both ends. This includes: interval overlap, normalized characterization of center distance, length similarity, same-segment indication, same-chromosome indication, same-type indication, and confidence aggregation. The "source node features, target node features, and edge attribute features" are input into the edge scoring model to output the edge confidence score. The edge scoring model can be implemented using the EdgeNet architecture: first, the node features are mapped to the embedding space, and then the two ends of the embedding are concatenated with the edge attributes to input the edge MLP and output the edge score; at the same time, a type-compatible header can be optionally introduced to improve the cross-type noise suppression capability.
[0040] During the weakly supervised training phase, edge rating labels are indirectly inferred from event-level ground truth values: signatures are matched with ground truth events with tolerance and assigned event affiliation. If two signatures match the same ground truth event, the corresponding edge is marked as a positive example; if they match different ground truth events, or only one edge matches, it is marked as a negative example or ignored. Matching criteria can be set according to SV type, for example, using a reciprocal overlap rate threshold for DEL / DUP / INV, and a center distance threshold and length ratio threshold for INS. Considering that negative samples far outnumber positive samples, negative sampling and weighted loss can be used to alleviate class imbalance and improve training stability.
[0041] Step S5: Graph sparsification and clustering.
[0042] In this embodiment, candidate edges are first filtered according to a confidence threshold to remove low-confidence connections; then, a mutual selection Top-M constraint is applied to obtain a sparse high-confidence graph: for each node, only the nodes with the highest confidence are retained. Strip edge ( The preferred value is 4–10 (e.g., 6), and an edge is only retained when it is selected by both endpoints simultaneously, thereby suppressing false connections caused by one-sided noise. To avoid empty results due to sparse data or overly strict thresholds in the mutual selection constraint, this embodiment preferably sets an adaptive backoff strategy: when the mutual selection pruning result is empty or too sparse, the threshold can be lowered and the process can be retried, or it can degenerate into unidirectional Top-M pruning (retained as long as it enters either endpoint before M) to ensure that subsequent clustering can be performed.
[0043] Clustering is performed on a sparse graph to obtain candidate event clusters: first, a minimum support constraint (k-core) is applied, and iterative deletions with a degree less than [a certain value] are performed. The node ( Preferably 2–5); then quasi-cliquepeeling is applied to the connected components to ensure sufficient cohesion within the cluster connections, wherein the cohesion parameter The value is preferably 0.5–0.8, and can be appropriately lowered for small clusters; finally, a minimum threshold (preferably 0.3–0.6, for example 0.4) is applied to the cluster density, and only subgraphs that meet the size and density requirements are retained as candidate event clusters.
[0044] Step S6: Event-level verification and event generation.
[0045] In this embodiment, event generation is performed for each candidate event cluster, and event-level verification is introduced to reduce false positives. The event generation phase first performs robust consistency processing: outlier filtering (preferably based on the MAD principle) is performed on the center or breakpoint positions of signatures within the cluster to remove significantly deviating noisy signatures; subsequently, a majority vote is performed on the signature types within the cluster to determine the primary event type, and preferably only primary type signatures are retained for breakpoint and length consensus estimation. Breakpoint and length consensus can be implemented using the median or weighted median: robust aggregation of the start point, end point, and length yields POS, END, and SVLEN respectively; for INS events, the position can be output as a point event and an interval representation conforming to VCF expression can be generated. Support is obtained by deduplicating and counting qnames within the cluster to avoid duplicate contributions from the same reading segment leading to artificially high support; event confidence can be obtained through robust aggregation of edge probabilities within the cluster (e.g., median).
[0046] In the event-level validation phase, event-level features (such as cluster size, edge score distribution statistics, geometric consistency index, graph density and average degree, etc.) are extracted for each candidate event cluster, input into the event-level validation model to output event credibility, and untrustworthy event clusters are filtered out according to thresholds. When the event-level model is unavailable, filtering can be completed by relying solely on the rule threshold set (such as minimum support, minimum support ratio, minimum confidence, etc.), thereby ensuring that the method can be implemented in different deployment environments.
[0047] Step S7: Post-processing and output.
[0048] In this embodiment, post-processing is performed on event clusters that pass event-level verification, and VCF results are output. Post-processing includes: setting length thresholds, support thresholds, and alignment quality thresholds according to SV type; performing neighboring event merging when necessary (e.g., merging events of the same type that are close in location and have similar lengths) to reduce redundant calls; and simultaneously completing the VCF fields for each event, including SVTYPE, END, SGLEN, support, confidence, and optional quality fields. The final output is a structural variation detection result in VCF format, which can be used for subsequent evaluation or downstream analysis. Example 2
[0049] This embodiment presents an alternative structure to the edge scoring model. Without altering the overall process of this invention, the edge scoring model can be implemented using different structures. Besides the EdgeNet structure described above, attention-based network structures can also be used, such as Transformer encoders or attention mechanisms, to more fully model the interaction between node pairs and edge attributes. The weights of the type-compatible head can be adjusted according to the data noise level or replaced with explicit type constraints. In addition to the 7-dimensional core features, edge attributes can also incorporate relationship features such as node embedding differences, concatenation, or bilinear combinations to improve the ability to discriminate complex events. All of the above alternative structures are optional implementations of this invention. Example 3
[0050] This embodiment employs a parameter adaptation and backoff strategy. Without altering the core idea of this invention, an adaptation and backoff mechanism can be introduced into key steps to improve robustness: when mutual selection Top-M pruning results in an empty or overly sparse graph, the confidence threshold can be lowered by a preset factor and pruning can be repeated, or it can degenerate into unidirectional Top-M edge preservation; when k-core decomposition results in too few remaining nodes, the remaining nodes can be... rollback to Alternatively, reduce the minimum cluster size; when the candidate cluster size is small, the alignment parameter can be adjusted. Downsampling is performed to avoid excessive stripping of small clusters. Through this adaptive strategy, stable output can be maintained under different sequencing depths, error rates, and genome complexities. Example 4
[0051] This embodiment addresses training data and regional constraints. During the training phase, a high-confidence benchmark region (e.g., a reliable region provided by the BED file) can be optionally used to constrain the training samples, reducing contamination of weakly supervised labels by low-complexity regions. Alternatively, regional constraints can be omitted, and false positives can be controlled through more stringent event-level validation and post-processing filtering. The truth event matching criterion, tolerance threshold, and negative sampling ratio can all be adjusted according to the sequencing platform, read length distribution, and error characteristics, and are optional implementations of this invention.
[0052] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
[0053] Although this paper frequently uses terms such as signature extraction module, node encoding module, candidate edge construction module, edge scoring module, graph clustering module, event verification module, and post-processing output module, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of this invention; interpreting them as any additional limitation would contradict the spirit of this invention.
Claims
1. A method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level validation, characterized in that, Includes the following steps: S1: Extract read-level structural variant signatures from sequencing alignment files. Each signature contains at least genomic location information, type information, and read identifier. S2: Treat each signature as a graph node and construct a node feature vector. The node feature vector includes the geometric location features of the signature on the genome, structural variation morphological features, support strength features, and alignment quality features. S3: Construct candidate edges between nodes based on predetermined rules, and record the edge attribute characteristics of each candidate edge; S4: Input the features of the two ends of each candidate edge and the edge attribute features into the edge scoring model to obtain the edge confidence score. The edge scoring model is trained with weak supervision. The training labels are obtained indirectly by performing tolerance matching between the signature and the real structural variation event. S5: Based on the edge confidence score, candidate edges are filtered and sparsified, and the resulting graph is clustered to obtain at least one candidate event cluster, and each candidate event cluster corresponds to a candidate structural mutation event; S6: Extract event-level features for each candidate event cluster, input them into the event-level verification model, obtain the event credibility score, and filter out untrustworthy event clusters based on the event credibility score; S7: Perform consensus calculation and post-processing on the retained event clusters, and output the structural variation detection results.
2. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, Step S3, which constructs candidate edges between nodes, specifically includes: The genome is divided into multiple blocks of fixed length, with overlapping regions set between the blocks; Candidate edges are generated only within the same block, based on spatial proximity rules and / or same-segment rules. The spatial proximity rule is as follows: signatures within a block are sorted by their center coordinates, and each signature is given a fixed number of candidate edges with its immediate neighbors. The edges are limited to those of the same chromosome, whose center distance does not exceed a threshold, and whose types are the same. The same reading segment rule is as follows: signatures are grouped according to reading segment identifiers, and candidate edges are established between adjacent signatures after sorting by coordinates within the same reading segment group, allowing cross-type connections; Duplicate candidate edges are merged and deduplicated, and the source label is recorded for each candidate edge.
3. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, The weakly supervised training labels in step S4 are constructed as follows: The signature is matched with the actual structural variation event with tolerance. The tolerance criteria are set according to the type of structural variation, including breakpoint offset tolerance, length ratio tolerance, or center distance tolerance. If both signatures match the same real event, then the corresponding candidate edge is marked as a positive example; If the two signatures match different real events, or only one end matches, the corresponding candidate edge will be marked as a negative example or ignored. Negative sampling and / or class weighting strategies are employed to mitigate the imbalance between positive and negative samples.
4. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, Step S5 involves filtering and sparsifying the candidate edges, specifically including: Low-confidence edges are removed based on edge confidence thresholds; Apply a mutual selection Top-M constraint: For each node, retain the top M edges with the highest confidence, and retain an edge only if it is retained by both of its two ends. Set an adaptive backoff strategy: when the mutual selection pruning results are empty or too sparse, lower the threshold to retry, or degenerate into a one-way Top-M constraint.
5. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, Step S5 involves clustering the obtained graph, specifically including: Apply a minimum support k-core constraint to the sparse graph and iteratively delete nodes with a degree less than k. Apply quasi-cluster stripping to the connected components after k-core processing, and repeatedly delete nodes with insufficient connectivity until the minimum density requirement or the lower limit of the size is met. Subgraphs that satisfy the minimum number of nodes and the minimum density threshold are retained as candidate event clusters.
6. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, The event-level features in step S6 include at least one of the following: number of nodes within a cluster, count of deduplication of supported read segments, statistics of edge confidence scores, geometric consistency index of breakpoints, graph density, and average degree.
7. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, The consensus calculation in step S7 includes: After filtering outliers from the breakpoint locations of signatures within the cluster, the median or weighted median is taken as the event breakpoint. The primary event type is determined by majority voting on the signature types within the cluster. Supports counting the number of read segments by deduplicating the segment identifier; Calculate the event confidence score as a robust aggregation of the edge confidence scores.
8. The method for detecting structural variations in long-read sequencing based on weakly supervised graph inference and event-level verification according to claim 1, characterized in that, The edge scoring model adopts the EdgeNet architecture and includes: The node embedding layer is used to map node features into embedding vectors; The embedding vectors of the two endpoints are concatenated with the edge attribute features, input into a multilayer perceptron, and the edge confidence score is output. A type compatibility header is introduced to output type compatibility scores to aid training.
9. A long-read sequencing structural variation detection system based on weakly supervised graph inference and event-level validation, characterized in that, include: The signature extraction module is used to extract read-level structural variation signatures from sequencing alignment files; The node encoding module is used to treat each signature as a graph node and construct a node feature vector; The candidate edge construction module is used to construct candidate edges between nodes based on predetermined rules and record edge attribute features. The edge scoring module is used to input the features of the two endpoints of the candidate edge and the edge attribute features into the edge scoring model to obtain the edge confidence score; the edge scoring model is trained with weak supervision, and the training labels are indirectly obtained by tolerance matching between the signature and the real structural variation event. The graph clustering module is used to filter and sparsify candidate edges based on edge confidence scores, and to cluster the resulting graph to obtain at least one candidate event cluster. The event verification module is used to extract event-level features for each candidate event cluster and input them into the event-level verification model to obtain an event credibility score and filter out untrustworthy event clusters. The post-processing output module is used to perform consensus calculation and post-processing on the retained event clusters and output the structural variation detection results.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for detecting long-read sequencing structural variations based on weakly supervised graph inference and event-level verification as described in any one of claims 1 to 8.