A nanopore signal event analysis method and system
By adaptively selecting computational methods and using bidirectional recursive CUSUM scanning to dynamically determine parameters, a complete analytical pipeline for nanopore signal events was constructed. This solved the problems of difficult parameter setting and unstable results in existing technologies, and achieved efficient and reliable analysis of nanopore signal events.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU INSIGHT TECH CO LTD
- Filing Date
- 2026-04-15
- Publication Date
- 2026-07-21
AI Technical Summary
Existing methods for analyzing nanopore signal events suffer from problems such as a lack of adaptability in parameter settings, sensitivity to signal outliers, limited scanning direction, lack of results stability verification mechanisms, and a lack of a complete Omega event analysis workflow.
An adaptive robust computation method or an online computation method is adopted, combined with a bidirectional recursive CUSUM scan and an iterative optimization mechanism, to dynamically determine the offset and decision threshold parameters. By merging change points through bidirectional scanning and introducing a masking mechanism, a complete analysis pipeline is constructed.
Automatic parameter calculation was achieved, improving the completeness and accuracy of change point detection, enhancing the reliability and stability of analysis results, and constructing an end-to-end automated analysis pipeline.
Smart Images

Figure CN122432735A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biosensor signal processing and analysis technology, specifically to a method and system for analyzing nanopore signal events. Background Technology
[0002] Nanopore sensing technology is a single-molecule-level electrical detection method. Its basic principle is as follows: an electrolyte solution is filled across a thin film containing nanoscale pores (the pores can be biological protein pores embedded in a lipid bilayer, such as α-hemolysin or MspA; or solid nanopores fabricated on solid films such as silicon nitride or graphene), and a bias voltage is applied. Ions pass through the nanopores under the drive of the electric field, forming a stable ionic current, the level of which is the "open-pore baseline current." When a molecule to be detected (such as a DNA strand, RNA strand, or protein) enters the nanopore under the drive of electrophoresis, its physical volume partially blocks the ion pathway, causing a momentary drop in the ionic current, forming a "blocking event" or "translocation event." Each event carries an electrical fingerprint about molecular size, charge distribution, shape, and even sequence information. Due to its advantages such as no need for fluorescent labeling, single-molecule resolution, and support for real-time detection, this technology has shown broad application prospects in DNA / RNA sequencing, protein analysis, and clinical molecular diagnostics.
[0003] In nanopore current recordings, some blocking events exhibit complex, multi-level nested structures. One typical type of complex event, due to its overall waveform profile resembling the Greek letter "Ω," is called an "Omega event." A typical Omega event has the following hierarchical structural characteristics: a stable baseline phase before and after the event; the first level of blocking, formed by the current drop after the molecule enters the nanopore, typically corresponding to the basic blocking caused by the molecule's passage through the pore channel; a second or deeper level of blocking sub-events, formed by a further drop in current at the first-level blocking plateau, typically corresponding to additional channel blockage caused by special structural regions on the molecular chain (such as DNA double strands, G-quadruplexes, chemical modification sites, etc.) passing through the nanopore; and a recovery phase after the event ends. Accurate detection and extraction of sub-event features within Omega events are crucial for analyzing the fine internal structure of molecules using nanopore technology.
[0004] Currently, the main techniques used for nanopore signal event analysis include: The fixed threshold method pre-sets one or more fixed current threshold lines. When the signal is below the threshold, it is marked as inside the event; when it is above the threshold, it is marked as outside the event or the boundary of a sub-event. This method is the simplest to implement, but it has serious limitations: the threshold needs to be manually adjusted for each set of experimental data and even for each event, and it cannot cope with baseline drift and natural variations in signal amplitude; moreover, it lacks effective recursive segmentation capability for nested multi-level structures.
[0005] The sliding window statistical method calculates the local mean and standard deviation of a signal within a fixed-length sliding window. A data point is considered a change point when it deviates from the window statistic by more than a preset multiple. This method is highly sensitive to the selection of window size and multiple threshold, lacks general applicability across events with different characteristics, and window boundary effects may lead to inaccuracies in locating change points.
[0006] The Cumulative Sum Control Chart (CUSUM) method, which originated in the field of statistical process control, detects process deviations by accumulating the deviations of observed values relative to the target mean. Some open-source nanopore analysis tools have attempted to introduce it into signal segmentation analysis.
[0007] However, directly applying the existing CUSUM method to sub-event segmentation of nanopore Omega events still has the following shortcomings: First, parameter setting is difficult and lacks adaptability. The offset (representing the desired signal offset amplitude) and decision threshold (controlling the trade-off between detection sensitivity and false positive rate) of the CUSUM algorithm usually need to be fixed in advance. However, the signal amplitude, noise level, and time scale of nanopore events vary significantly, and fixing the parameters can easily lead to over-segmentation of large-amplitude signals or under-segmentation of small-amplitude signals. Second, mean and variance estimates are sensitive to outliers. Existing implementations mostly use the arithmetic mean and standard deviation as estimates of the position and dispersion of signals within a segment. However, transient noise spikes (such as capacitor discharge, environmental electromagnetic interference, etc.) and brief artifacts common in nanopore signals can significantly skew these estimates, leading to false or missed detections of change points. Third, unidirectional scanning has inherent limitations. Most CUSUM implementations only perform point-by-point scanning in one direction, and their detection results are direction-dependent, which may miss some change points or be insufficiently accurate in temporal localization of change points. Fourth, there is a lack of a mechanism for verifying the stability of the results. The standard CUSUM performs only one scan under given parameters, making it unable to distinguish whether detected changes are genuine structural changes or accidental detections caused by noise. Fifth, there is a lack of a complete Omega event analysis pipeline. Existing tools typically only provide basic signal segmentation functions and have not built a complete processing flow for Omega event characteristics, including event front-end truncation preprocessing, accurate estimation of first-level blocking levels, and Omega event filtering and determination based on multi-dimensional features.
[0008] Therefore, there is an urgent need to provide a method and system for analyzing nanopore signal events to solve the technical problems in existing technologies, such as lack of adaptability in parameter setting, sensitivity to signal anomalies, single scanning direction, lack of result stability verification mechanism, and lack of a complete analysis process for Omega events.
[0009] The above background information is provided only to aid in understanding the concept and technical solution of this application. It does not necessarily belong to the prior art of this application, nor does it necessarily provide technical guidance. In the absence of clear evidence that the above information was disclosed before the filing date of this application, the above background information should not be used to evaluate the novelty and inventiveness of this application. Summary of the Invention
[0010] The purpose of this invention is to provide a novel method and system for analyzing nanopore signal events.
[0011] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a method for analyzing nanopore signal events, comprising the following steps: (1) Acquire the current signal data generated when the target molecule passes through the nanopore sensor, and identify the blocking events from them to form a blockage event set; (2) Pre-screen the blocking events in the blocking event set to exclude abnormal events and extract the valid signal segments of the blocking events that have not been excluded; (3) Based on the relationship between the data length of the effective signal segment and the length threshold, adaptively select a robust calculation method or an online calculation method; (4) Based on the calculation method selected in step (3), extract the baseline level statistics and fluctuation degree statistics from the effective signal segment. The offset parameter is dynamically determined based on the signal variation amplitude of the effective signal segment. The decision threshold parameter is dynamically determined based on the preset average running length, the fluctuation statistic, and the offset parameter. (5) Perform a first scan and a second scan on the effective signal segment along two opposite time directions respectively, and use the reference level statistics, offset parameters and decision threshold parameters to detect the falling edge change point corresponding to the first scan and the rising edge change point corresponding to the second scan; (6) Merge the detected falling edge change points and rising edge change points in chronological order to form a change point sequence, and extract sub-events within the effective signal segment according to the type pairing relationship of adjacent change points in the change point sequence; (7) Using a masking mechanism, the sub-events are removed from the corresponding valid signal segments, and the baseline level is recalculated for the remaining background signal to correct the baseline level statistics; (8) Gradually increase the preset average running length and repeat steps (4) to (7) until the number of detected sub-events reaches a stable convergence state; (9) Restore the local index of the sub-event within the effective signal segment to the global time index in the original current signal data, and perform multi-dimensional feature filtering on the record containing the sub-event.
[0012] This invention abandons the traditional method of relying on manual experience to set fixed parameters. It constructs an automatic calculation method for core parameters by extracting the statistical features of event signals and introduces an iterative optimization mechanism based on the average running length. The convergence of the number of detection results is used as the automatic termination condition, realizing the fully automatic and data-driven determination of core parameters. This completely eliminates the need for manual parameter tuning and significantly improves the method's generalization ability to different experimental data.
[0013] This invention also effectively addresses the challenges of large-scale data under high sampling rates by adaptively selecting robust or online computation methods, while ensuring the robustness of the algorithm.
[0014] In terms of change point detection, this invention breaks through the limitations of traditional unidirectional scanning. For each event signal, a first scan and a second scan in opposite time directions are performed sequentially. By merging and sorting all change points obtained from the two scans and performing pairing fusion of falling and rising edges, the complementary characteristics of bidirectional scanning are fully utilized, which significantly improves the completeness of change point detection and the accuracy of time positioning.
[0015] Furthermore, this invention incorporates a stability verification function for detection results through an iterative optimization mechanism based on average run length. This effectively identifies and filters out accidental detections caused by random noise, retaining only the change points that can be stably reproduced at different sensitivity levels, thereby significantly improving the reliability and confidence of the final analysis results.
[0016] Ultimately, this invention constructs a complete end-to-end analysis pipeline for Omega event structures, covering raw data input and blocking event identification, blocking event pre-screening and effective signal segment extraction, adaptive selection of calculation mode, automatic parameter calculation, bidirectional recursive scanning, change point pairing and sub-event extraction, first-level blocking level correction based on masking to exclude sub-event intervals, iterative parameter optimization, and multi-level Omega feature filtering, ensuring full automation and standardization from raw signals to high-quality analysis results.
[0017] In some implementations, the first scan is a forward recursive CUSUM scan, which calculates the log-likelihood ratio of the sampling points sequentially in the time-increasing direction and updates the forward cumulative sum and the forward decision statistic. When the forward decision statistic exceeds a preset threshold, it is determined that a falling edge change point has been detected, and the time of occurrence of the positive change is located according to the maximum value of the forward cumulative sum. For each falling edge change point detected, the forward cumulative sum and the forward decision statistic are reinitialized from the falling edge change point in the remaining valid signal segment, and the recursive scan continues until the detection of the entire valid signal segment is completed.
[0018] In some implementations, the second scan is a reverse recursive CUSUM scan, which calculates the log-likelihood ratio of the sampling points sequentially in the decreasing direction of time, and updates the reverse cumulative sum and the reverse decision statistic. When the reverse decision statistic exceeds the preset threshold, it is determined that a rising edge change point has been detected, and the time of the reverse change is located according to the maximum value of the reverse cumulative sum. After each rising edge change point is detected, the reverse cumulative sum and the reverse decision statistic are reinitialized in the remaining valid signal segment before the rising edge change point, and the recursive scan continues until the detection of the entire valid signal segment is completed.
[0019] Furthermore, the forward recursive CUSUM scan and the reverse recursive CUSUM scan are two independent scanning processes, each maintaining its own cumulative sum and decision statistics, and do not share the detection state.
[0020] In some implementations, the type pairing relationship includes pairing a falling edge change point with a rising edge change point that immediately follows it in time sequence to form a sub-event.
[0021] In some implementations, in step (3), when the data length of the effective signal segment is less than or equal to the length threshold, the robust calculation method is used; when the data length of the effective signal segment is greater than the length threshold, the online calculation method is used.
[0022] In some implementations, the dynamic determination of the offset parameter includes: calculating the absolute value of the difference between the maximum value and the average value of the current intensity in the effective signal segment, and the absolute value of the difference between the minimum value and the average value, and then taking the larger of the two as the offset parameter.
[0023] In some implementations, the decision threshold parameter is calculated using the following formula: h=(σ 2 / δ)×ln(ARL), Where h is the decision threshold parameter; σ is the fluctuation statistic; δ is the offset parameter; and ARL is the preset average running length, with an initial value of 1.
[0024] In some implementations, step (2) further includes: performing secondary screening on the unremoved blocking events, performing front-end truncation processing on the blocking events that pass the secondary screening, dynamically searching and removing unstable rapid descent transition regions, locating the true starting point of the current signal entering the first level of blocking, and extracting the truncated signal segment as the effective signal segment.
[0025] In some implementations, the secondary screening includes: reading the data of the unexcluded blocking event intervals, calculating the bottom standard deviation of its current segment, and filtering low-quality events according to the quantile threshold, wherein the low-quality events are events with approximately horizontal lines; introducing a leader chain detection algorithm, and determining whether there is a leader chain characteristic current groove by analyzing whether the current value of the event starting region falls within the characteristic range formed by the difference between the baseline and the blocking current, thereby identifying and screening events with leader chain signal characteristics.
[0026] Furthermore, the front-end truncation process specifically includes: searching backward from the event start position, skipping the initial falling segment; locating the inflection point where the current begins to rise after the current reaches its lowest point, and using this as the truncation start position; extracting the signal segment starting from the truncation start position, wherein the initial falling segment refers to the falling edge region between the event start position and the current lowest point, and the inflection point refers to the starting position where the current value begins to rise continuously from the lowest point.
[0027] In some implementations, the abnormal events include: a blocking event where the degree of congestion does not meet a preset condition, and a blocking event where the signal duration does not meet a preset window condition.
[0028] In some implementations, the multi-dimensional feature filtering includes a comprehensive determination of the following conditions: The Level 1 blocking rate is greater than or equal to the Level 1 blocking rate threshold; The secondary blocking rate is greater than or equal to the secondary blocking rate threshold. The difference between the level 2 blocking rate and the level 1 blocking rate is greater than or equal to the threshold value for the difference between the two levels of blocking rate. The duration of a sub-event is less than or equal to the duration threshold.
[0029] In some implementations, a multi-threaded pool architecture is used to parallelize the analysis tasks of each independent blocking event.
[0030] In some implementations, the fine-structure parameters of the valid events and their internal sub-events after being filtered by the multi-dimensional features are output as a standardized report.
[0031] Another aspect of the present invention provides a nanopore signal event analysis system, comprising: The data acquisition and preprocessing module is configured to perform steps (1) to (2) described above. The adaptive analysis module is configured to perform steps (3) to (5) described above. The sub-event parsing module is configured to execute steps (6) to (7) described above. The iterative verification and output module is configured to perform steps (8) to (9) described above.
[0032] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art: This invention's method adaptively determines core parameters, completely eliminating the need for manual parameter tuning, while effectively resisting abnormal noise interference and ensuring computational efficiency while maintaining robustness. Through bidirectional scanning and pairing strategies, it significantly improves the completeness of change point detection and temporal positioning accuracy. This invention also incorporates a stability verification mechanism based on average runtime iterations, enhancing the reliability of the analysis results.
[0033] Furthermore, this invention constructs a complete end-to-end automated analysis pipeline, covering key steps such as event pre-screening, signal preprocessing, sub-event extraction, and multi-dimensional feature filtering, which can realize automated output from raw signals to structured results. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the local current signal collected in an embodiment of the present invention. The red box shows the current signal of the omega event. Figure 2 This is a diagram of the Omega event list generated for an embodiment of the present invention. Detailed Implementation
[0035] In this invention, the "first-order blocking rate" characterizes the degree of basic blockage of the ion current by a target molecule passing through a nanopore sensor, relative to an open pore state where no molecules pass through. This blocking rate corresponds to the decrease in the first-order blocking plateau current relative to the open pore baseline current when the target molecule stably passes through the nanopore in a linear, unfolded state without internal secondary structure interference. The formula for calculating the first-order blocking rate is as follows: Blocking rate 一级 =1-I 一级平台 / I 基线 , Among them, I 基线 The baseline current for the open pore is extracted from the signal fragment in the unblocked state before or after the target molecule enters the nanopore; I 一级平台 The first-level blocking platform current is the stable current level extracted from the remaining valid signal segments after excluding the sub-event (second-level blocking) region.
[0036] In this invention, the "secondary blocking rate" characterizes the additional, deeper transient blocking degree caused by the internal molecular structure (such as hairpin structures, folded states, base modifications, homopolymers, etc.) during the first-level blocking plateau of the target molecule passing through the nanopore. This blocking rate corresponds to the proportionate decrease in current level within the sub-event (secondary blocking) interval relative to the open-pore baseline current, reflecting the further impediment of ion current by the internal molecular structure. The formula for calculating the secondary blocking rate is as follows: Blocking rate 二级 =1-I 二级平台 / I 基线 , Among them, I 基线 The baseline current for the open orifice is the same baseline value used in the first-stage blockage rate calculation at the same time; I 二级平台 The second-level blocking platform current is estimated using statistics adapted to the calculation model, based on the stable current level extracted within the corresponding sub-event interval.
[0037] The present invention will be further described below with reference to embodiments. However, the present invention is not limited to the following embodiments. The implementation conditions used in the embodiments can be further adjusted according to different requirements of specific use, and the implementation conditions not specified are conventional conditions in the industry. The technical features involved in the various embodiments of the present invention can be combined with each other as long as they do not conflict with each other. Unless otherwise specified, the reagents and instruments used in the following embodiments and comparative examples are commercially available products or can be prepared with reference to existing technology.
[0038] Example 1: A method for analyzing nanopore signal events includes the following steps: (1) Acquire the current signal data generated when the target molecule passes through the nanopore sensor, and identify the blocking events from them to form a blockage event set; (2) Pre-screen the blocking events in the blocking event set to exclude abnormal events and extract the valid signal segments of the blocking events that have not been excluded; (3) Based on the relationship between the data length of the effective signal segment and the length threshold, adaptively select a robust calculation method or an online calculation method; (4) Based on the calculation method selected in step (3), extract the baseline level statistics and fluctuation degree statistics from the effective signal segment, dynamically determine the offset parameter according to the signal change amplitude of the effective signal segment, and dynamically determine the decision threshold parameter according to the preset average running length, fluctuation degree statistics and offset parameter. (5) Perform the first and second scans on the effective signal segments in opposite time directions respectively, and use the baseline level statistics, offset parameters and decision threshold parameters to detect the falling edge change points corresponding to the first scan and the rising edge change points corresponding to the second scan. (6) Merge the detected falling edge change points and rising edge change points in chronological order to form a change point sequence. Based on the type pairing relationship of adjacent change points in the change point sequence, extract the sub-events inside the effective signal segment. (7) Use a masking mechanism to remove sub-events from the corresponding valid signal segments and recalculate the baseline level for the remaining background signal to correct the baseline level statistics; (8) Gradually increase the preset average running length and repeat steps (4) to (7) until the number of detected sub-events reaches a stable convergence state; (9) Restore the local index of the sub-event in the effective signal segment to the global time index in the original current signal data, and perform multi-dimensional feature filtering on the record containing the sub-event.
[0039] In step (1), a nanopore sensor refers to a device that contains a nanoscale pore structure and can sense and identify single molecules by measuring the characteristic current change generated when a target molecule passes through the pore. This invention does not impose any special limitations on the specific type of nanopore sensor; for example, it can be a solid-state nanopore sensor (such as a nanopore based on materials like silicon nitride, graphene oxide, or metal thin films), or other types of nanopore sensors. This embodiment uses a commercially available solid-state silicon nitride nanopore platform as the nanopore sensor. The experimental conditions are as follows: Ion current signals from the solid-state silicon nitride nanopore platform were recorded at a bias voltage of 200 mV. The signals were stored in PBF format, with a sampling rate of 500,000 Hz and a total recording time of 325 seconds. Calculations show that this embodiment collected approximately 162.5 million sampling points (500,000 Hz × 325 seconds = 162,500,000 sampling points). The acquired current signal data was used for subsequent analysis to identify characteristic current blocking events that occur when target molecules pass through nanopores.
[0040] In step (1), the identification of blocking events can be performed using existing signal identification methods, such as the signal segmentation module built into the official Nanopore software (MinKNOW / Albacore), or the signal segmentation scheme provided by open-source tools (Transalyzer, OpenNanopore, PyPore). Preferably, this embodiment uses the target molecule identification method disclosed in patent CN 120877911 A filed by the applicant in 2025. Specifically, refer to Embodiment 1 of patent CN 120877911 A, where the collected current signal data is filtered and event identified to extract the target via event set, which is the blocking event set described in this invention. After processing by the above identification method, this embodiment identifies a total of 1107 blocking events from the collected current signal data. The identified blocking event list can be stored, for example, in XLSX format.
[0041] Furthermore, the fundamental characteristics of each blocking event are extracted for subsequent analysis. These fundamental characteristics include, but are not limited to, one or more of the following: start position, end position, baseline current, and duration.
[0042] Since the set of blocked events may contain invalid noise signals that do not conform to physical expectations, this invention pre-screens the set of blocked events obtained in step (1), which can effectively remove invalid or low-quality events, reduce computational load, and improve the accuracy of downstream analysis. In this invention, pre-screening refers to preliminary screening based on the initial blocking rate and data length of the blocked events. Wherein, the initial blocking rate = 1 - average current during the event / baseline current; the data length refers to the duration of the event signal.
[0043] Further, in step (2), the step of pre-screening the blocking events in the blocking event set to exclude abnormal events includes: when the initial blocking rate of a blocking event is less than a set blocking rate threshold, it is determined to be an abnormal event; when the signal duration of a blocking event is greater than a first time threshold or less than a second time threshold, it is determined to be an abnormal event, and the determined abnormal events are excluded from the blocking event set. The above-mentioned blocking rate threshold, first time threshold, and second time threshold are not particularly limited and can be selected according to actual detection needs. For example, the blocking rate threshold can be 0.2, 0.19, 0.18, 0.17, or 0.16, etc.; the first time threshold can be 0.9s, 1.0s, or 1.1s, etc.; and the second time threshold can be 0.005s, 0.004s, 0.003s, or 0.002s, etc. In this embodiment, the blocking rate threshold is set to 0.18, the first time threshold is set to 1s, and the second time threshold is set to 0.003s.
[0044] Furthermore, before extracting valid signal segments, a secondary screening is performed on any unresolved blocking events to further improve the accuracy of downstream analysis. This secondary screening specifically includes: Calculate the standard deviation of the current in the bottom region (e.g., the last 50% of sampling points) within the event interval. If it is lower than a certain quantile threshold (e.g., the 0.05 quantile) of the current value distribution of the whole event, it is filtered out as a low-quality event that approximates the horizontal line. A leader chain detection algorithm is used to analyze whether the current value in the event initiation region (such as the first 20 sampling points) falls within a preset feature range formed by the difference between the baseline current and the blocking current, in order to identify events with leader chain characteristic grooves and retain such events.
[0045] For blocking events that pass the secondary screening, a front-end truncation process is performed to extract valid signal segments, including: searching backward from the event start position, skipping the initial falling segment (i.e., the falling edge region between the event start and the current minimum point); locating the inflection point where the current continues to rise from the minimum point (e.g., increasing for three consecutive sampling points and accumulating to exceed a certain threshold), as the truncation start position; and extracting the signal segment starting from this truncation start position as a valid signal segment for subsequent analysis.
[0046] Existing methods often use the arithmetic mean and variance / standard deviation as estimates of the location and dispersion of signals within a segment. However, transient noise spikes and brief artifacts commonly found in nanopore signals can skew these estimates, especially for events with short data sets, leading to false detections or omissions in change point detection. This invention adaptively selects the estimation mode of the underlying statistics based on the length of the effective signal segment of the event, thereby giving the algorithm strong resistance to outliers such as transient noise spikes, significantly reducing the detection rate of false change points, and ensuring the reliability of identifying true change points.
[0047] Specifically, in step (3), for events with short data volumes (i.e., the data length of the effective signal segment is less than or equal to the length threshold), a robust calculation method is adopted, which can achieve higher noise robustness and avoid parameter drift caused by noise in short sequences; for events with long data volumes (i.e., the data length of the effective signal segment is greater than the length threshold), an online calculation method is adopted, which can significantly reduce time complexity and improve the overall efficiency in batch or real-time processing scenarios while ensuring the feasibility of analysis and the consistency of results. The length threshold is not particularly limited and can be selected according to the actual detection needs, such as 0.25s, 0.3s, 0.35s, etc. In this embodiment, the length threshold is set to 0.3s.
[0048] Furthermore, when using a robust calculation method, the median is used to estimate the baseline level statistic, and the median absolute deviation (MAD) is used to estimate the volatility statistic. When using an online calculation method, the arithmetic mean is used to estimate the baseline level statistic, and the standard deviation is used to estimate the volatility statistic. When the amount of data for an event is short, transient noise spikes or brief artifacts account for a high proportion of the sample, easily causing a significant skew effect on the arithmetic mean and standard deviation, leading to distortion in the estimation of the baseline level and volatility. In this case, a robust calculation method is adopted, using the median and MAD as the statistics for location and dispersion. The median and MAD have a collapse point of up to 50%, meaning that even if nearly half of the data in an event segment is contaminated by outliers, the estimation results can still remain reliable, thus effectively suppressing the generation of spurious change points. Conversely, when the amount of data for an event is long enough, the proportion of transient noise spikes in the total sample is extremely low compared to a large number of normal signal points. According to the law of large numbers, the skewing effect of a few outliers on the arithmetic mean and standard deviation will be effectively averaged out, making the estimated results closer to the true values. Under this condition, switching to an online calculation method and using the arithmetic mean and standard deviation for estimation not only has statistical accuracy comparable to robust estimation, but also has engineering advantages such as high computational efficiency, constant memory usage, and support for streaming processing.
[0049] Step (4) performs adaptive calculation of event-level CUSUM parameters. Based on the statistical characteristics of the effective signal segments of each blocking event, the core parameters required by the recursive CUSUM algorithm, such as offset parameters and decision threshold parameters, are calculated automatically without manual intervention.
[0050] Specifically, dynamically determining the offset parameter includes: calculating the absolute value of the difference between the maximum and average values of the current intensity in the effective signal segment, and the absolute value of the difference between the minimum and average values, and then taking the larger of the two as the offset parameter.
[0051] The formula for calculating the decision threshold parameter is: h = (σ 2 / δ)×ln(ARL), where h is the decision threshold parameter; σ is the fluctuation statistic; δ is the offset parameter; and ARL is the preset average running length, with an initial value of 1.
[0052] Further, step (4) outputs the CUSUM parameter set {μ, σ, δ, h}, where μ is the baseline level statistic.
[0053] Step (5) overcomes the directional bias of unidirectional sequential detection by performing two bidirectional independent recursive scans. Specifically, the first scan is a forward recursive CUSUM scan, which calculates the log-likelihood ratio of the sampling points sequentially in the time-increasing direction and updates the forward cumulative sum and the forward decision statistic. When the forward decision statistic exceeds a preset threshold, it is determined that a falling edge change point has been detected, and the time of the positive change is located based on the maximum value of the forward cumulative sum. For each falling edge change point detected, the forward cumulative sum and the forward decision statistic are reinitialized from the point after the falling edge change point in the remaining valid signal segment, and the recursive scan continues until the detection of the entire valid signal segment is completed. The second scan is a reverse recursive CUSUM scan, which calculates the log-likelihood ratio of sampling points sequentially in the decreasing direction of time and updates the reverse cumulative sum and reverse decision statistic. When the reverse decision statistic exceeds a preset threshold, a rising edge change point is detected, and the time of the reverse change is located based on the maximum value of the reverse cumulative sum. After each rising edge change point is detected, the reverse cumulative sum and reverse decision statistic are reinitialized in the remaining valid signal segment before the rising edge change point, and the recursive scan continues until the entire valid signal segment is detected. The bidirectional scan utilizes the complementary sensitivity of CUSUM detection direction: the forward scan (first scan) is more sensitive to the detection of signal decline, and the reverse scan (second scan) is more sensitive to the detection of signal rise (its manifestation in the original signal). The merging of the two scan results ensures that regardless of the direction of change, it has a chance to be captured with high accuracy by at least one scan.
[0054] Furthermore, the forward recursive CUSUM scan and the reverse recursive CUSUM scan are two independent scanning processes, each maintaining its own cumulative sum and decision statistics, and do not share the detection state.
[0055] Step (6) implements change point fusion pairing and sub-event extraction. Specifically, the type pairing relationship includes: pairing the falling edge change point with the rising edge change point that immediately follows it in time sequence to form a sub-event.
[0056] Furthermore, sub-events within the effective signal segment are extracted, and the characteristics of each sub-event are calculated, including but not limited to one or more of duration, minimum valley current, and blocking rate.
[0057] Sub-events typically correspond to deep blocking sections, and their current levels differ significantly from the true background. Including these sub-event intervals in the background statistics would significantly lower the overall current average level. Therefore, step (7) can more accurately reflect the baseline state by constructing a mask to exclude the aforementioned intervals, thereby obtaining a more accurate first-level blocking platform current value to correct the baseline level statistics in step (4) and provide an accurate baseline for subsequent sub-event feature calculations and validity determination.
[0058] Step (8) introduces an adaptive iterative verification mechanism to automatically eliminate false detections caused by noise. Specifically, through an iterative optimization mechanism based on ARL (gradually reducing sensitivity from high sensitivity and observing whether the detection results are stable and convergent), the stability verification of the detection results is built-in, retaining only the change points that can be stably detected at different sensitivity levels, effectively filtering out accidental detections caused by noise. In step (8), the stable convergence state judgment condition is: the relative change rate of the number of sub-events detected in two consecutive iterations is lower than a preset threshold.
[0059] Step (9) Multi-level feature filtering and encapsulation of Omega events. An event is considered a valid Omega event only if it meets specific hierarchical nesting logic. Specific filtering dimensions include: A. The Level 1 blocking rate is greater than or equal to the Level 1 blocking rate threshold; B. The secondary blocking rate is greater than or equal to the secondary blocking rate threshold; C. The difference between the second-level blocking rate and the first-level blocking rate is greater than or equal to the threshold of the difference between the two levels of blocking rate; D. The proportion of sub-event duration is less than or equal to the duration threshold.
[0060] This invention does not impose any particular limitations on the primary blockage rate threshold, the secondary blockage rate threshold, the difference threshold between the two levels of blockage rate, or the duration threshold; these can be selected according to actual detection requirements. In this embodiment, the primary blockage rate threshold is 0.15, the secondary blockage rate threshold is 0.45, the difference threshold between the two levels of blockage rate is 0.15, and the duration threshold is 0.2s.
[0061] Furthermore, the fine-grained structural parameters of the valid events and their internal sub-events after multi-dimensional feature filtering are output as a standardized report, including but not limited to a CSV file. Figure 2 As shown, this embodiment ultimately yields 12 omega events.
[0062] As a preferred approach, a multi-threaded pool architecture is adopted to parallelize the analysis tasks of each independent blocking event, thereby adapting to different deployment scenarios from desktop workstations to high-performance computing clusters.
[0063] Furthermore, this embodiment also provides a nanopore signal event analysis system, which includes a data acquisition and preprocessing module, an adaptive analysis module, a sub-event parsing module, and an iterative verification and output module. The data acquisition and preprocessing module is configured to perform steps (1) to (2) as described above, the adaptive analysis module is configured to perform steps (3) to (5) as described above, the sub-event parsing module is configured to perform steps (6) to (7) as described above, and the iterative verification and output module is configured to perform steps (8) to (9) as described above.
[0064] The present invention has been described in detail above, with the aim of enabling those skilled in the art to understand and implement the invention. However, this description should not be construed as limiting the scope of protection of the invention. All equivalent changes or modifications made in accordance with the spirit and essence of the invention should be included within the scope of protection of the invention.
Claims
1. A method for analyzing nanopore signal events, characterized in that, Includes the following steps: (1) Acquire the current signal data generated when the target molecule passes through the nanopore sensor, and identify the blocking events from them to form a blockage event set; (2) Pre-screen the blocking events in the blocking event set to exclude abnormal events and extract the valid signal segments of the blocking events that have not been excluded; (3) Based on the relationship between the data length of the effective signal segment and the length threshold, adaptively select a robust calculation method or an online calculation method; (4) Based on the calculation method selected in step (3), extract the baseline level statistics and fluctuation degree statistics from the effective signal segment. The offset parameter is dynamically determined based on the signal variation amplitude of the effective signal segment. The decision threshold parameter is dynamically determined based on the preset average running length, the fluctuation statistic, and the offset parameter. (5) Perform a first scan and a second scan on the effective signal segment along two opposite time directions respectively, and use the reference level statistics, offset parameters and decision threshold parameters to detect the falling edge change point corresponding to the first scan and the rising edge change point corresponding to the second scan; (6) Merge the detected falling edge change points and rising edge change points in chronological order to form a change point sequence, and extract sub-events within the effective signal segment according to the type pairing relationship of adjacent change points in the change point sequence; (7) Using a masking mechanism, the sub-events are removed from the corresponding valid signal segments, and the baseline level is recalculated for the remaining background signal to correct the baseline level statistics; (8) Gradually increase the preset average running length and repeat steps (4) to (7) until the number of detected sub-events reaches a stable convergence state; (9) Restore the local index of the sub-event within the effective signal segment to the global time index in the original current signal data, and perform multi-dimensional feature filtering on the record containing the sub-event.
2. The nanopore signal event analysis method according to claim 1, characterized in that, The first scan is a forward recursive CUSUM scan, which calculates the log-likelihood ratio of the sampling points sequentially in the time-increasing direction and updates the forward cumulative sum and the forward decision statistic. When the forward decision statistic exceeds a preset threshold, it is determined that a falling edge change point has been detected, and the time of occurrence of the positive change is located according to the maximum value of the forward cumulative sum. For each falling edge change point detected, the forward cumulative sum and the forward decision statistic are reinitialized from the falling edge change point in the remaining valid signal segment, and the recursive scan continues until the detection of the entire valid signal segment is completed. The second scan is a reverse recursive CUSUM scan, which calculates the log-likelihood ratio of the sampling points sequentially in the decreasing direction of time, and updates the reverse cumulative sum and the reverse decision statistic. When the reverse decision statistic exceeds the preset threshold, it is determined that a rising edge change point has been detected, and the time of the reverse change is located according to the maximum value of the reverse cumulative sum. After each rising edge change point is detected, the reverse cumulative sum and the reverse decision statistic are re-initialized in the remaining valid signal segment before the rising edge change point, and the recursive scan continues until the detection of the entire valid signal segment is completed.
3. The nanopore signal event analysis method according to claim 2, characterized in that, The forward recursive CUSUM scan and the reverse recursive CUSUM scan are two independent scanning processes, each maintaining its own cumulative sum and decision statistics, and do not share the detection state.
4. The nanopore signal event analysis method according to claim 1, characterized in that, The type of pairing relationship includes: pairing the falling edge change point with the rising edge change point that immediately follows it in time sequence to form a sub-event.
5. The nanopore signal event analysis method according to claim 1, characterized in that, In step (3), when the data length of the effective signal segment is less than or equal to the length threshold, the robust calculation method is used; When the data length of the effective signal segment is greater than the length threshold, the online calculation method is used.
6. The nanopore signal event analysis method according to claim 1 or 5, characterized in that, When the robust calculation method is used, the median is used to estimate the baseline level statistic, and the median absolute deviation is used to estimate the volatility statistic. When using the online calculation method, the arithmetic mean is used to estimate the baseline level statistic, and the standard deviation is used to estimate the fluctuation level statistic.
7. The nanopore signal event analysis method according to claim 1, characterized in that, The dynamic determination of the offset parameter includes: calculating the absolute value of the difference between the maximum value and the average value of the current intensity in the effective signal segment, and the absolute value of the difference between the minimum value and the average value, and then taking the larger of the two as the offset parameter.
8. The nanopore signal event analysis method according to claim 1, characterized in that, The formula for calculating the decision threshold parameter is as follows: h=(σ) 2 / δ)×ln(ARL), Where h is the decision threshold parameter; σ is the fluctuation statistic; δ is the offset parameter; and ARL is the preset average running length, with an initial value of 1.
9. The nanopore signal event analysis method according to claim 1, characterized in that, Step (2) further includes: performing secondary screening on the unremoved blocking events, performing front-end truncation processing on the blocking events that pass the secondary screening, dynamically searching and removing unstable rapid descent transition regions, locating the true starting point of the current signal entering the first level of blocking, and extracting the truncated signal segment as the effective signal segment.
10. The nanopore signal event analysis method according to claim 9, characterized in that, The secondary screening includes: Read the data of the unexcluded blocking event interval, calculate the bottom standard deviation of its current segment, and filter low-quality events according to the quantile threshold, wherein the low-quality events are events that are approximately horizontal. A preleader detection algorithm is introduced to determine whether there is a preleader characteristic current groove by analyzing whether the current value in the event initiation region falls within the characteristic range formed by the difference between the baseline and the blocking current, thereby identifying and screening events with preleader signal characteristics.
11. The nanopore signal event analysis method according to claim 9, characterized in that, The front-end truncation process specifically includes: Search backward from the starting position of the event, skipping the initial descent segment; The inflection point where the current begins to rise after reaching its lowest point is used as the starting point for cutoff. Extract the signal segment starting from the truncation start position. The initial falling segment refers to the falling edge region from the start of the event to the lowest point of the current, and the inflection point refers to the starting position of the current value starting to rise continuously from the lowest point.
12. The nanopore signal event analysis method according to claim 1, characterized in that, The abnormal events include: blocking events where the degree of blockage does not meet the preset conditions, and blocking events where the signal duration does not meet the preset window conditions.
13. The nanopore signal event analysis method according to claim 1, characterized in that, The multi-dimensional feature filtering includes a comprehensive determination of the following conditions: The Level 1 blocking rate is greater than or equal to the Level 1 blocking rate threshold; The secondary blocking rate is greater than or equal to the secondary blocking rate threshold. The difference between the level 2 blocking rate and the level 1 blocking rate is greater than or equal to the threshold value for the difference between the two levels of blocking rate. The duration of a sub-event is less than or equal to the duration threshold.
14. The nanopore signal event analysis method according to claim 1, characterized in that, A multi-threaded pool architecture is used to parallelize the analysis tasks for each independent blocking event; and / or, The fine-grained structural parameters of the valid events and their internal sub-events after filtering by the multi-dimensional features are output as a standardized report.
15. A nanopore signal event analysis system, characterized in that, include: The data acquisition and preprocessing module is configured to perform steps (1) to (2) as described in any one of claims 1 to 14. An adaptive analysis module is configured to perform steps (3) to (5) of any one of claims 1 to 14; The sub-event parsing module is configured to perform steps (6) to (7) of any one of claims 1 to 14. The iterative verification and output module is configured to perform steps (8) to (9) of any one of claims 1 to 14.