Abstract
Nanopore sequencing enables real-time access to raw signal data, which brings new possibilities for rapid genomic diagnostics. However, current workflows still primarily rely on basecalling, a computationally intensive step that slows subsequent analysis and limits real-time use. In addition, most current approaches that work with raw signals focus on simple read-level classification tasks and are not designed to detect and localize specific genes, particularly complex genomic features such as antibiotic resistance genes (ARGs). Here, we show that the hybrid convolutional-transformer model, NanoResFormer, can detect clinically relevant ARGs directly from raw nanopore signals without basecalling. The model captures both local and long-range signal patterns and employs a floating-window strategy to process inputs of varying lengths efficiently. In proof-of-concept experiments, NanoResFormer achieved a sensitivity of 92.6% and a precision of over 93%, with short latency, enabling real-time resistome profiling already during sequencing. The proposed approach, therefore, provides rapid access to crucial information, accelerating decision-making in clinical diagnostics and pathogen surveillance.