Construction method and equipment of bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, medium and program product
By combining nanopore adaptive sampling and deep learning, a bacterial pathogen detection model was constructed, which solved the problems of slow detection speed and high cost of pathogens in water, and achieved efficient identification and accurate classification of low-abundance pathogens, thereby improving the prevention and control capabilities of waterborne diseases.
Patent Information
- Application Number
- CN202511521285.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-23
AI Technical Summary
Existing technologies for detecting pathogens in water suffer from problems such as slow detection speed, high cost, difficulty in detecting low-abundance pathogens, and difficulty in distinguishing between live and dead pathogens, which poses a significant challenge, especially in the monitoring of waterborne diseases.
A bacterial pathogen detection model was constructed by combining nanopore adaptive sampling with deep learning. By acquiring sequencing data of target pathogens and control bacterial species, feature extraction and classification were performed using natural language processing and hybrid neural networks. Customized reference files were created for adaptive sampling, and low-abundance pathogens were identified through deep learning algorithms.
It significantly improves the sensitivity and accuracy of pathogen detection, enabling the identification of low-abundance pathogens in a short time, thereby enhancing the prevention and control capabilities of waterborne diseases, especially improving the resolution accuracy and assembly integrity in the detection of waterborne pathogens.
Smart Images

Figure CN121393545A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nanopore sequencing technology, and more specifically, to a method, apparatus, medium, and program product for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning. Background Technology
[0002] Water resources are vital to global economic development, social well-being, and the essential supply of food and healthcare. Untreated water can contain pathogens such as Salmonella, Shigella, and Vibrio cholerae, leading to diseases such as diarrhea, dysentery, typhoid fever, and cholera. Waterborne diseases impose a heavy economic burden by increasing healthcare costs, reducing productivity, and increasing the burden on healthcare systems.
[0003] Traditional pathogen detection methods include culture-based techniques and molecular techniques. Culture-based techniques require culturing pathogens on selective media, but are typically time-consuming and ineffective for unculturable organisms. Molecular techniques, such as real-time quantitative PCR (qPCR), DNA microarrays, digital droplet PCR (ddPCR), and loop-mediated isothermal amplification (LAMP), are faster and more specific. However, these techniques also have limitations, such as the inability to distinguish between live and dead pathogens and sensitivity to environmental factors.
[0004] Advances in DNA sequencing technology have revolutionized pathogen detection, enabling identification based on genetic material. Next-generation sequencing (NGS), such as amplicon sequencing and whole-genome sequencing, has proven invaluable in detecting waterborne pathogens. However, NGS also faces numerous challenges, including high costs, complex data, and the need for specialized knowledge. Furthermore, the low abundance and high microbial diversity of pathogens in environmental samples make it difficult to detect rare pathogens. Due to their short read lengths, NGS also struggles to assemble complete pathogen genomes and identify serotypes.
[0005] Nanopore sequencing is a third-generation DNA sequencing technology that addresses some of its limitations. It supports direct DNA sequencing without PCR amplification and can produce longer reads. Its real-time analysis and high-throughput capabilities make it a promising tool for detecting waterborne pathogens. Adaptive sampling is an advanced nanopore feature that allows selective sequencing of target DNA, improving efficiency and speed. This method holds promise for detecting low concentrations of pathogens in water, advancing public health and environmental surveillance. Despite these innovations, detecting low-abundance species remains challenging due to signal masking by high-abundance microorganisms, sequence similarity between evolutionarily similar species, and reliance on the integrity of reference databases. Summary of the Invention
[0006] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention provides a method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, and the application of this model in water sample detection.
[0007] The first aspect of this application discloses a method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, the method comprising:
[0008] S101, Obtain sequencing data of the target pathogen and sequencing data of the control bacterial strain;
[0009] S102, using natural language processing (NLP) to tokenize and embed the sequencing data of the target pathogen and the sequencing data of the control bacterial strain to obtain sequence features;
[0010] S103, the sequence features are input into the hybrid neural network architecture to obtain the predicted classification result, which is compared with the classification label. The loss function is optimized based on the comparison result to obtain the prediction model. The hybrid neural network architecture includes a context-aware unit and a hierarchical feature extraction unit. The context-aware unit uses a Transformer encoder to capture long program sequence dependencies. The hierarchical feature extraction unit is composed of 9 stacked Conv1D modules, which include 8 Conv1D modules and a classification output layer.
[0011] In some embodiments, each Conv1D module includes: an extension layer (512→1024 channels) for extracting high-dimensional features through multi-scale one-dimensional convolution, a compression layer (1024→512 channels) for feature dimensionality reduction and information focusing, and an activation and normalization layer that combines the SiLU activation function with a batch normalization layer; the classification output layer is the final Conv1D that maps the features to the target classification space.
[0012] In some embodiments, the target pathogen sequencing data is adaptive sampling sequencing data, and the acquisition method includes: collecting DNA data of the target pathogen and assembling it to obtain an assembled pathogen genome; obtaining reference sequences of Vibrio cholerae, Salmonella and Shigella from a public database, combining the reference sequences with the assembled pathogen genome to create a custom reference file for nanopore adaptive sampling; and performing nanopore sequencing based on the custom reference file to obtain the adaptive sampling sequencing data.
[0013] Optionally, the reference sequence can be combined with the assembled pathogen genome by removing redundancy and taking the union of the genomes;
[0014] Optionally, the target pathogen is created by mixing equal amounts of DNA from at least two pathogen species with environmental bacterial DNA at different dilutions;
[0015] In some embodiments, the target pathogen includes one or more of the following: Vibrio cholerae, Salmonella, and Shigella;
[0016] Optionally, control strains include non-target pathogens, environmental strains, and human sequences. Non-target pathogens include one or more of the following: Klebsiella pneumoniae, Acinetobacter baumannii, Staphylococcus aureus, Pseudomonas aeruginosa, and Escherichia coli. Environmental strains include one or more of the following: Pseudomonas putida, Stenotrophomonas maltophilia, and Flavobacterium.
[0017] In some embodiments, the tokenization and embedding method in S102 includes: converting the original sequence in the sequencing data into N-dimensional discrete tokens through 6-mer frequency analysis, and mapping them to an M-dimensional latent feature space using a trainable embedding matrix, where M is less than N.
[0018] In some embodiments, between S101 and S102, the method further includes: preprocessing the target pathogen sequencing data and the control bacterial sequencing data, wherein the preprocessing method includes: establishing a dual threshold filtering mechanism and adopting a quality control standard of Q-score ≥ 10 (phred-scale) and sequence length > 1 kbp;
[0019] Optionally, the preprocessing method further includes: implementing a dynamic subsampling strategy on the sequencing data to ensure standardized processing of the input data.
[0020] A second aspect of this application discloses a method for detecting bacterial pathogens, the method comprising:
[0021] S201, Obtain the water sample to be tested;
[0022] S202, input the water sample to be tested into the detection model constructed by the method described in the first aspect of this application, and obtain the detection result of the water sample to be tested;
[0023] Optionally, the detection results include: pathogen type and pathogen serotype;
[0024] Optionally, the sources of the water samples to be tested include: Haihe River, Tuanbo Lake, hospital sewage, and urban sewage.
[0025] A third aspect of this application discloses a computer device, the device comprising: a memory and a processor; the memory being used to store a computer program; and the processor executing the computer program to implement the steps of the above-described method.
[0026] The fourth aspect of this application discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0027] The fifth aspect of this application discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0028] This application offers the following advantages: 1. This application innovatively discloses a method for constructing a bacterial pathogen detection model (DeepPathogen) based on nanopore adaptive sampling and deep learning. By creating a customized reference file for nanopore adaptive sampling, a library is constructed to obtain high-quality sequencing data. Based on this high-quality sequencing data, a hybrid neural network architecture is built, utilizing a pre-trained embedding model Tokenizer + Embedding + basic Conv1D framework. This allows for the development of a DeepPathogen model for metagenomic pathogen identification while maintaining high-speed inference with minimal training resources. The DeepPathogen model can distinguish highly similar pathogenic bacterial sequences, significantly improving the resolution accuracy (Shigella classification accuracy reaches 96.1%), addressing the high misclassification rate of traditional alignment tools (such as Kraken2) in classifying closely related species (such as Shigella and E. coli). Accurate identification of pathogenic bacterial sequences from long metagenomic sequencing data significantly improves subsequent assembly integrity, which is crucial for downstream analysis, including pathogenicity assessment, antibiotic resistance analysis, and mutation detection.
[0029] 2. This study developed an adaptive sampling (AS) sequencing scheme based on pathogenic bacterial reference genomes and evaluated its advantages over non-adaptive (batch) sequencing. Furthermore, we designed a deep learning algorithm for identifying low-abundance pathogen genomes and established a method for determining the serotypes of low-abundance pathogens in water samples. Our research significantly improves the sensitivity and accuracy of pathogen detection, contributing to the prevention and control of waterborne diseases. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of the method flow provided in the first aspect of the present invention;
[0032] Figure 2 This is a schematic diagram of the method flow provided in the second aspect of the present invention;
[0033] Figure 3This is a schematic diagram of a computer device provided in an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of the architecture of an exemplary computing device provided in an embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram of the storage medium provided in an embodiment of the present invention;
[0036] Figure 6 This is a comparison chart of pathogen detection results between adaptive sampling sequencing and batch sequencing provided in this embodiment of the invention; Figure 6 A represents the sequencing depth. Figure 6 B indicates the length of the reading. Figure 6 C represents 30 times the coverage depth. Figure 6 D represents the relative abundance of species;
[0037] Figure 7 This refers to the sensitivity of AS sequencing for detecting pathogenic bacteria provided in the embodiments of the present invention; Figure 7 A represents the length of the reading. Figure 7 B represents the sequencing depth. Figure 7 C represents 30 times the coverage depth. Figure 7 D represents relative abundance;
[0038] Figure 8 This invention provides a pathogen read prediction workflow using NTM and CNN classification. This method combines NLP techniques for tokenization and embedding with a CNN architecture for robust feature extraction and classification, providing a powerful tool for selecting pathogen reads from genomic data.
[0039] Figure 9 This is the data characteristics and performance evaluation of the DeepPathogen model provided in the embodiments of the present invention. Figure 9 A represents the N50 distribution of pathogen sequencing data from the SRA database. Figure 9 B is a visualization of the UMAP of the embedded training data. Figure 9 C represents the precision and recall curve, which shows the classification performance of cross-validation. Figure 9 D represents the receiver operating characteristic (ROC) analysis of the model's discriminative power. Figure 9 E represents the distribution of read counts in the training data. Figure 9 F represents the model's performance on training data of different read lengths;
[0040] Figure 10 This is a verification result diagram of DeepPathogen provided in an embodiment of the present invention; wherein, Figure 10 A represents the prediction accuracy for positive samples. Figure 10 B represents the prediction accuracy for negative samples. Figure 10C represents the number of pathogenic bacteria identification reads in the actual sample. Figure 10 D represents the assembly integrity of the pathogenic bacteria in the actual sample. Detailed Implementation
[0041] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0042] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Figure 1 This is a schematic flowchart of a method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, provided by an embodiment of the present invention. Specifically, the method includes the following steps:
[0045] S101, Obtain sequencing data of the target pathogen and sequencing data of the control bacterial strain;
[0046] In some embodiments, the target pathogen sequencing data is adaptive sampling sequencing data, and the acquisition method includes: collecting DNA data of the target pathogen and assembling it to obtain an assembled pathogen genome; obtaining reference sequences of Vibrio cholerae, Salmonella, and Shigella from a public database, combining the reference sequences with the assembled pathogen genome to create a custom reference file for nanopore adaptive sampling; performing nanopore sequencing based on the custom reference file to obtain the adaptive sampling sequencing data; the adaptive sampling sequencing data is ≥1kb;
[0047] Optionally, the reference sequence can be combined with the assembled pathogen genome by removing redundancy and taking the union of the genomes;
[0048] Optionally, the target pathogen is created by mixing equal amounts of DNA from at least two pathogen species at different dilutions with an appropriate amount of environmental bacterial DNA;
[0049] Optionally, the method further includes: generating a BED file according to the name and length of each sequence indicated in the customized reference file; importing the customized reference file and the BED file into MinKNOW software and configuring an adaptive sampling sequencing workflow.
[0050] In some embodiments, the target pathogen includes one or more of the following: Vibrio cholerae, Salmonella, and Shigella;
[0051] Optionally, control strains include non-target pathogens, environmental strains, and human sequences. Non-target pathogens include one or more of the following: Klebsiella pneumoniae, Acinetobacter baumannii, Staphylococcus aureus, Pseudomonas aeruginosa, and Escherichia coli. Environmental strains include one or more of the following: Pseudomonas putida, Stenotrophomonas maltophilia, and Flavobacterium.
[0052] In some embodiments, between S101 and S102, the method further includes: preprocessing the target pathogen sequencing data and the control bacterial sequencing data, wherein the preprocessing method includes: establishing a dual threshold filtering mechanism and adopting a quality control standard of Q-score ≥ 10 (phred-scale) and sequence length > 1 kbp;
[0053] Optionally, the preprocessing method further includes: implementing a dynamic subsampling strategy on the sequencing data (automatically triggered when the sample data volume is >200 MB) to ensure standardized processing of the input data.
[0054] S102, using Natural Language Processing (NLP) to tokenize and embed the target pathogen sequencing data and control bacterial sequencing data to obtain sequence features; tokenization and embedding are two key technologies used to convert text data into a form that machine learning models can understand and process. The controls include sequence data from other bacterial species and human sequence data;
[0055] In some embodiments, tokenization involves breaking down text into tokens for easier subsequent processing. Embedding maps the tokens to vectors, capturing semantic information. In this embodiment, tokenization and embedding use the Nucleotide-Transformer-2.5b multi-species model, a deep learning model based on the Transformer architecture designed specifically for genomics, capable of extracting features from DNA sequences and predicting molecular phenotypes.
[0056] In some embodiments, the tokenization and embedding method in S102 includes: converting the original sequence in the sequencing data into N (4015) dimensional discrete tokens (numerical range 0-4,103) by 6-mer frequency analysis, and mapping them to an M (512) dimensional latent feature space using a trainable embedding matrix, where M is less than N.
[0057] S103, the sequence features are input into the hybrid neural network architecture to obtain the predicted classification result, which is compared with the classification label. The loss function is optimized based on the comparison result to obtain the prediction model. The hybrid neural network architecture includes a context-aware unit and a hierarchical feature extraction unit. The context-aware unit uses a Transformer encoder to capture long program sequence dependencies. The hierarchical feature extraction unit is composed of 9 stacked Conv1D modules, which include 8 Conv1D modules and a classification output layer.
[0058] In some embodiments, each Conv1D module includes: an expansion layer (512→1024 channels) for extracting high-dimensional features through multi-scale one-dimensional convolution, a compression layer (1024→512 channels) for feature dimensionality reduction and information focusing, and an activation and normalization layer using a combination of SiLU activation function and batch normalization layer; the classification output layer is the final Conv1D that maps features to the target classification space. In this embodiment, model optimization is also performed by integrating label smoothing technology (smoothing factor α=0.1) into the cross-entropy loss function to effectively suppress overfitting in multi-class prediction.
[0059] A second aspect of this application discloses a method for detecting bacterial pathogens, the method comprising:
[0060] S201, Obtain the water sample to be tested; the sources of the water sample to be tested include: Haihe River, Tuanbo Lake, hospital sewage, and urban sewage.
[0061] S202, the water sample to be tested is input into the detection model constructed by the method described in the first aspect of this application to obtain the detection result of the water sample to be tested; the detection result includes: pathogen type and pathogen serotype; wherein the pathogen serotype needs to be further analyzed by other software to obtain.
[0062] Figure 3 This is a schematic diagram of a computer device provided in an embodiment of the present invention, such as... Figure 3 As shown, the device 2000 may include: one or more processors 2010 and one or more memories 2020; wherein the memories store computer-readable code that, when run by the one or more processors, can perform the methods described above.
[0063] The processor in this embodiment can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, operations, and logic block diagrams disclosed in this embodiment. The general-purpose processor can be a microprocessor or any conventional processor, and can be based on an x86 or ARM architecture.
[0064] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0065] For example, the method or apparatus according to embodiments of this disclosure can also be used by means of Figure 4 The architecture of the computing device 3000 shown is used for implementation. For example... Figure 4 As shown, the computing device 3000 may include a bus 3010, one or more CPUs 3020, a read-only memory (ROM) 3030, a random access memory (RAM) 3040, a communication port 3050 connected to a network, an input / output component 3060, a hard disk 3070, etc. The storage devices in the computing device 3000, such as the ROM 3030 or the hard disk 3070, may store various data or files used for processing and / or communication of the methods provided in this disclosure, as well as program instructions executed by the CPU. The computing device 3000 may also include a user interface 3080. Of course, Figure 4 The architecture shown is merely exemplary and can be omitted as needed when implementing different devices. Figure 4 One or more components in the computing device shown.
[0066] This invention also includes a computer-readable storage medium, such as... Figure 5The diagram illustrates a storage medium 4000 provided in an embodiment of the present invention. The computer storage medium 4020 stores computer-readable instructions 4010. When the computer-readable instructions 4010 are executed by a processor, the method described above according to embodiments of the present disclosure can be performed. The computer-readable storage medium in the embodiments of the present disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Synchronous Link Dynamic Random Access Memory (SLDRAM), and Direct Memory Bus Random Access Memory (DR RAM). It should be noted that the memory used in the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0067] This disclosure also provides a computer program product or system, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0068] In some embodiments, this embodiment also discloses a system for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, the system comprising:
[0069] Sequencing data acquisition module, used or configured to acquire sequencing data of the target pathogen and sequencing data of the control bacterial strain;
[0070] A sequence feature extraction module is used or configured to use natural language processing to tokenize and embed the target pathogen sequencing data and control bacterial sequencing data to obtain sequence features;
[0071] The model training module is used or configured to input sequence features into a hybrid neural network architecture to obtain predicted classification results, compare them with classification labels, optimize the loss function based on the comparison results, and obtain a predictive model. The hybrid neural network architecture includes a context-aware unit and a hierarchical feature extraction unit. The context-aware unit uses a Transformer encoder to capture long program sequence dependencies. The hierarchical feature extraction unit consists of 9 stacked Conv1D modules, which include 8 Conv1D modules and a classification output layer.
[0072] In some embodiments, this embodiment also discloses a bacterial pathogen detection system, the system comprising:
[0073] A water sample acquisition module, used or configured to acquire water samples to be tested;
[0074] The detection result output module is used or configured to input the water sample to be tested into the detection model constructed by the method described in the first aspect of this application to obtain the detection result of the water sample to be tested. Specific implementation examples:
[0076] Materials and methods:
[0077] 1. Pathogen Preparation: Vibrio cholerae (ATCC 17802) was purchased from the American Type Culture Collection (ATCC). Salmonella (CMCC 50312) and Shigella (CMCC 51515) were purchased from the China Medical Microbial Culture Collection (CMCC). All bacterial samples were stored at -80°C. Strains were cultured in lysogenic broth (LB, BD Difco, USA) at 37°C for 24 hours. For quantitative analysis of specific strains, suitable selective media were used: thiosulfate-citrate-cholesterol / sucrose agar (TCBS, Beijing Luqiao Technology Co., Ltd.) for Vibrio cholerae; and xylose-lysine-deoxycholic acid (XLD) agar (Beijing Luqiao Technology Co., Ltd.) for the isolation of Salmonella and Shigella. These cultures were incubated at 37°C for 24 hours.
[0078] 2. Water Sample Collection and Bacterial Enrichment: A total of 10 liters of wastewater samples were collected from the Haihe River, Tuanbo Lake, and the hospital for analysis. Heterotrophic bacteria counting (HPC) was performed using LB agar plates, while Vibrio cholerae, Salmonella, and Shigella were detected on TCBS and XLD agar plates, respectively. Following the laboratory's established bacterial enrichment protocol, samples were filtered through a mica membrane using a peristaltic pump at a constant flow rate of 100 mL / min. After filtration, the mica membrane was rinsed with 100 mL of elution buffer, which consisted of 15 g / L NaCl, 30 g / L tryptone, 15 g / L beef extract, 0.05 mol / L glycine (Gly), and 15 mmol / L Tris buffer (pH 6.0). The eluent was collected, and HPC was reassessed using LB agar plates. Vibrio cholerae, Salmonella, and Shigella were also assessed on their respective selective media. On a suitable selective culture medium, the plate count method was used to perform quantitative bacterial analysis on the effluent and eluent samples.
[0079] 3. Bacterial DNA Extraction and Simulated Sample Construction: 100 mL of eluent was centrifuged at 12000 × g for 3 minutes to form a bacterial cell pellet, which was then washed with 0.85% NaCl solution. Bacterial DNA was extracted using the EZNA Bacterial DNA Rotation Kit (Omega Bio-Tek, USA) according to the manufacturer's instructions. The concentration of the extracted DNA was measured using a Qubit4 fluorometer (Thermo Fisher Scientific, USA), and purity and quality were assessed using a Nanodrop spectrophotometer (Thermo Fisher Scientific, USA). Simulated samples were created by mixing equal volumes of DNA from three pathogen species at different dilutions (2.5%, 0.25%, and 0.025% of each species) with appropriate amounts of environmental bacterial DNA. The DNA from the simulated samples was prepared for library construction using the SQK-LSK114 ligation sequencing kit (Oxford Nanopore).
[0080] 5. Construction of the Adaptive Sampling Reference File: Reference sequences for Vibrio cholerae, Salmonella, and Shigella were selected from the FDA-ARGOS Microbial Sequence Database (https: / / www.fda.gov / ) and stored in separate FASTA files. These sequences were combined with the pathogen genomes assembled in our laboratory sequencing work to create a custom reference file for nanopore adaptive sampling. The reference file was further optimized to facilitate the output of detailed passage or expulsion data for each nanopore during sequencing. Additionally, a BED file was generated to indicate the name and length of each sequence according to the reference file. Both the reference file and the BED file were imported into MinKNOW software (v5.5.9) to configure the adaptive sampling sequencing workflow.
[0081] 6. Library preparation and nanopore sequencing:
[0082] DNA sequencing was performed using a GridION nanopore sequencer. Sequencing libraries were prepared for each sample using a genomic DNA ligation kit (SQK-LSK114), depending on the amount of DNA extracted. Each library was sequenced for 12 hours in a single FLOMIN114 (R10.4.1) flow cell according to the manufacturer's guidelines. Batch sequencing and adaptive sampling both lasted 12 hours. Sequencing data was transferred to a server and processed using Guppy (v6.5.7) within MinKNOW software (v5.5.9) to convert the data into base sequences in high-precision (HAC) mode. Filtlong (v0.2.0) was used to filter out sequencing fragments shorter than 1 kb or with a quality score below 90 from the FASTQ files, resulting in high-quality sequencing data with sequences ≥1 kb.
[0083] 7. Development of DeepPathogen: A Hybrid Neural Architecture for Metagenomic Pathogen Identification: Pathogen sequencing data was systematically retrieved from the NCBI Sequence Reads Archive (SRA), containing high-quality reads from three key genera: Salmonella, Shigella, and Vibrio. Negative controls included clinically prevalent non-target pathogens (Klebsiella pneumoniae, Acinetobacter baumannii, Staphylococcus aureus, Pseudomonas aeruginosa, Escherichia coli) and environmental bacteria (Pseudomonas putida, Stenotrophomonas maltophilia, Flavobacterium), introduced to simulate a complex microbiome background (detailed stratified counts are shown in Table 1). Raw sequencing reads were rigorously preprocessed using Filtlong v0.2.1 with a dual threshold: Q value ≥ 10 (phred-scale) and minimum sequence length > 1 kbp. Samples exceeding 200 MB were downsampled to ensure computational tractability. Training of the DeepPathogen model followed a structured process. Sequences were labeled using a tagger and embeddings from the Nucleotide-Transformer-2.5b multi-species model, pre-trained on 850 genomes. Based on 6-mer frequency analysis, sequences were converted to numerical symbols (ranging from 0 to 4103), identifying 4015 unique motifs. These labeled embeddings were then projected into a 512-dimensional latent space using a trainable embedding matrix. The model architecture integrates a hybrid structure combining a Transformer-based context encoder with nine hierarchical Conv1D blocks. Each Conv1D block consists of two convolutional layers: the first layer (expansion layer) increases the number of channels from 512 to 1024, facilitating multi-scale feature extraction; the second layer (compression layer) reduces the number of channels back to 512 to ensure dimensionality recovery. Both layers employ the SiLU activation function and undergo batch normalization. The final Conv1D layer maps the feature representations to the target output class number, performing a classification operation. During training, the model was optimized using cross-entropy loss and label smoothing techniques (α=0.1) to mitigate overfitting and enhance generalization ability for multi-class predictions. Model performance was evaluated using standard metrics such as accuracy, recall, F1 score, and ROC-AUC. Figure 8 ). Figure 8The module includes: a data preprocessing module, which establishes a dual-threshold filtering mechanism, adopts a quality control standard of Q-score ≥ 10 (phred-scale) and sequence length > 1 kbp, and implements a dynamic subsampling strategy (automatically triggered when the sample data volume > 200 MB) to ensure standardized processing of the input data. A feature encoding module, based on a pre-trained Nucleotide-Transformer-2.5b multi-species model, constructs a sequence feature extraction unit, transforms the original sequence into a 4,015-dimensional discrete label (numerical range 0-4,103) through 6-mer frequency analysis, and maps it to a 512-dimensional latent feature space using a trainable embedding matrix. Hybrid Neural Network Architecture: Context-Aware Unit: Employs a Transformer encoder to capture long program sequence dependencies; Hierarchical Feature Extraction Unit: Composed of 9 stacked Conv1D modules, each module includes: an expansion layer (channel count 512→1,024): extracts high-dimensional features through multi-scale one-dimensional convolution; a compression layer (channel count 1,024→512): achieves feature dimensionality reduction and information focusing; an activation and normalization component: uses a combination of SiLU activation function and batch normalization layers; a classification output layer: maps features to the target classification space through the terminal Conv1D layer. Model Optimization Method: Integrates label smoothing technology (smoothing factor α=0.1) into the cross-entropy loss function to effectively suppress overfitting in multi-class prediction. NTM is a process that maps nucleotide sequences (i.e., DNA or RNA sequences) to specific taxonomic units (such as species, genus, family, etc.). This step is commonly used in pathogen detection and metagenomic analysis to identify the microbial species corresponding to the sequence. NTM classifies sequences by comparing the sequenced reads with known microbial reference genome databases.
[0084] 8. Data Analysis: To perform metagenomic analysis on the obtained sequences, we used Centrifuge software and applied the grep command to selectively extract results associated with Vibrio cholerae, Salmonella, and Shigella, thereby quantifying the number of reads for each bacterium in the sequencing data. Kraken2 was used for species annotation of the selected data, and Krona was used to visualize the species composition. Reference genomes for Vibrio cholerae, Salmonella, and Shigella were downloaded from NCBI. Minimap2 was used to construct an index for each bacterium, and then Samtools and Bedtools were used to align the index with the selected sequencing data to identify the number of reads aligned to each target bacterium. The sequencing depth for each bacterium was calculated using the "depth" command in Samtools. For de novo sequence assembly, we used Flye (v2.9.2) and the --meta option to assemble the selected sequencing data, and Medaka (v1.7.2) was used for error correction. Salmonella serotype prediction (Seqsero2) was used to perform Salmonella serotype classification on the screened sequencing data, and the Salmonella InSilico Typing Resource (SISTR) command-line tool was used to analyze the assembled data for Salmonella serotype classification.
[0085] 9. Statistical Analysis: Data are expressed as mean ± standard deviation (SD). Statistical analysis was performed using t-tests, F-tests, one-way ANOVA, and multiple comparisons. A p-value less than 0.05 was considered statistically significant. All analyses and data visualizations were performed using GraphPad Prism 8.3.0 (GraphPad Software, LLC), Origin 9.5 (OriginLab Corporation, USA), RStudio 2022.12.0.353 (Posit Software, PBC), and R 4.2.2.
[0086] result:
[0087] 1. Enrichment effect of AS sequencing on pathogen sequences in simulated communities: Table 1 Quality control results of raw sequencing data from adaptive sampling sequencing and batch sequencing
[0088]
[0089] After 12 hours of sequencing, AS sequencing yielded 5.14 GB of data, totaling 1,404,169 reads with an average read length of 5.5 kbp. Bulk sequencing yielded 5.21 GB of data, totaling 1,276,169 reads with an average read length of 6.53 kbp. Simultaneously, AS sequencing rejected 483,114 reads within 12 hours, demonstrating its high rejection rate and rapid decision-making process (Table 1).
[0090] The microbial reads were then classified to analyze pathogen composition. After 12 hours of AS sequencing, the sequencing depth of Salmonella, Shigella, and Vibrio cholerae in the raw reads increased by 287.26 times, 223.95 times, and 122.00 times, respectively, compared to batch sequencing (48.75 times, 51.63 times, and 36.56 times). Figure 6 A). Metagenomic analysis after centrifugation showed significant read amplification in these pathogens: Salmonella amplified 8.9-fold, Shigella amplified 8.0-fold, and Vibrio cholerae amplified 15.5-fold, indicating that AS sequencing can enhance the amount of data on the target pathogens. Figure 6 B). The sequencing coverage (≥30-fold) of spiked pathogens obtained by AS sequencing was significantly improved, with coverage of Salmonella, Shigella, and Vibrio cholerae reaching 95.62%, 78.17%, and 61.99%, respectively, which were significantly improved compared with conventional sequencing (49.35%, 48.68%, and 15.07%). Figure 6 C), indicating that AS sequencing can produce higher quality pathogen data. Furthermore, species annotation using Kraken2 shows that these pathogens have low prevalence in conventional sequencing data (Salmonella 1.75%, Shigella 0.57%, Vibrio cholerae 1.90%). Figure 6 (D). However, after using AS sequencing, these proportions significantly increased to 15.01%, 3.71%, and 10.75%, highlighting the effectiveness of AS sequencing in increasing pathogen concentration in sample datasets.
[0091] 2. Sensitivity of AS sequencing for detecting pathogenic bacteria
[0092] To evaluate the sensitivity of AS sequencing in detecting pathogens, we added a concentration of 10... 4 Water samples containing pathogens at concentrations of 10³, 10², and 10 CFU / L were analyzed. The spike concentrations were validated by qPCR analysis and pure plate counting (Table 2). Results showed that sequencing depth and read length were positively correlated with both the abundance concentration of spiked pathogens and sequencing time. Figure 7 A, 7B). The average length of spiked bacterial reads obtained by AS sequencing was significantly shorter compared to reads obtained by batch sequencing. Twelve hours after sequencing, the relative abundance of spiked pathogens increased by an average of 6.0-fold compared to the corresponding batch sequencing. Figure 7 C, 7D), and the presence of spiked Salmonella, Shigella, and Vibrio cholerae was detectable at concentrations as low as 10² CFU / L, accounting for 0.17%, 0.04%, and 0.05% of relative abundance, respectively. Furthermore, serotyping of pathogens plays a crucial role in disease diagnosis. Therefore, the effectiveness of AS sequencing for Salmonella serotyping was evaluated using Seqsero2 and SISTR. For Salmonella at a concentration of 10³ CFU / L, AS sequencing accurately identified the serotype within just 3 hours, consistent with serological agglutination assays, with a minimum sequencing depth of 32.88-fold (Table 2). At 10 4 At higher concentrations of CFU / L, serotyping can be completed via AS sequencing in just 2 hours, with a sequencing depth of 31.53-fold. However, for lower concentrations of 10² and 10 CFU / L, even after 12 hours of AS sequencing, accurate serotyping is not possible. In contrast, batch sequencing requires 8 hours to resolve 10 CFU / L concentrations. 4 The correct serotype at CFU / L concentration requires a sequencing depth of 24.24 times. These results highlight the higher sensitivity and quality of AS sequencing in pathogen detection, marking a significant advance in pathogen surveillance in aquatic environments.
[0093] Table 2. Serological typing of Salmonella using adaptive sampling sequencing and batch sequencing.
[0094]
[0095] 3. DeepPathogen enables high-fidelity pathogen characterization in nanopore sequencing:
[0096] To address the inherent signal-noise problem in nanopore sequencing, we developed DeepPathogen—a hybrid architecture integrating NTM and CNN. The training dataset contains sequences from Salmonella, Shigella, and Vibrio cholerae. Analysis of the training data shows that the average N50 distribution varies across different classes, with the highest N50 (18.4 kbp) for the negative class and the lowest (11.4 kbp) for Shigella. Figure 9 A). Initial UMAP projection of the embedded data showed significant overlap between data for Salmonella, Shigella, and negative categories. Figure 9 B). After training, the model performed excellently, with the mean area under the receiver operating characteristic curve (AUROC) for all pathogens and their folds reaching 1.0 (B). Figure 9 D). Furthermore, even with sequencing read fragmentation, the model maintained robust performance, achieving an F1 score of 0.941 ± 0.008 (D). Figure 9C). The robustness of DeepPathogen across read segments of different lengths was further evaluated. Figure 9 (E and 9F). Notably, over 90% of the total read lengths were in the 1k-5k range. For Salmonella and Shigella, prediction accuracy improved with increasing read length, stabilizing at a high accuracy (above 92%) for reads between 1k and 50k. In contrast, Vibrio cholerae consistently demonstrated high classification performance, with accuracy exceeding 98.8% across all read lengths. These results collectively underscore the effectiveness of DeepPathogen in overcoming the challenges of pathogen identification in nanopore sequencing data, exhibiting high accuracy and robustness across various sequencing conditions. N50 refers to the length of the last sequence added when all assembled sequences (such as contigs or scaffolds) are arranged in descending order of length during genome assembly and their lengths are sequentially summed. In short, N50 reflects the proportion of longer sequences in the assembled genome. N50 is a key genome assembly metric; a higher value indicates better assembly quality and higher genome coverage. In pathogen detection, N50 is not only used to evaluate sequencing and assembly efficiency, but also provides important support for subsequent functional gene analysis and pathogen identification. By optimizing the N50 value, researchers can complete pathogen genome analysis more efficiently, thereby contributing to the diagnosis and treatment of infectious diseases.
[0097] 4. DeepPathogen classification performance verification:
[0098] To evaluate the classification performance of DeepPathogen, we conducted validation experiments using a local strain library and the publicly available SRA dataset. Nanopore sequencing was performed on isolates from the local library, including 24 Salmonella, 14 Shigella, and 22 Vibrio cholerae strains. After Filtlong processing, the mean read lengths of the local strains were: Salmonella 5,094±312 bp, Shigella 6,263±428 bp, and Vibrio 9,290±601 bp. DeepPathogen achieved classification accuracies of 95.8%, 95.7%, and 97.5% for the local Salmonella, Shigella, and Vibrio cholerae strains, respectively. Figure 10 A). When tested on SRA-derived samples, the model achieved accuracies of 92.4%, 94.4%, and 94.7%, respectively, demonstrating its high sensitivity and generalization ability in diverse and heterogeneous datasets. The specificity of the model was further evaluated using nine negative controls, with an average classification accuracy of 88.6% (…). Figure 10(B) Notably, despite the over 95% genomic homology between Shigella and Escherichia coli, DeepPathogen successfully resolved the classification ambiguity between them. In contrast, Kraken2 misclassified 87.8% of Shigella reads as Escherichia coli, highlighting DeepPathogen's superior ability to extract discriminative genomic features compared to traditional sequence alignment methods.
[0099] To evaluate its practical application, spiked water samples were analyzed using DeepPathogen and compared with a Kraken2-based classification method. At higher spike concentrations (10³ and 10⁻⁶), the analysis was successful. 4 At concentrations of 100 CFU / mL, there was no significant difference in the read counts of Salmonella and Vibrio cholerae between the two methods (p>0.05, t-test). However, at these concentrations, DeepPathogen detected 3.88-fold and 5.39-fold higher Shigella-specific reads than Kraken2, respectively. Surprisingly, at low abundance conditions (100 CFU / mL), DeepPathogen performed 9.95-fold and 6.45-fold better than Kraken2 in detecting Shigella and Vibrio cholerae, respectively. Figure 10 C). This performance demonstrates the robustness of the model's enhancement in high-noise, low-biomass scenarios, where Kraken2 struggles to achieve accurate identification. Genome assembly was also evaluated using Flye; both methods showed comparable assembly performance for Salmonella and Vibrio cholerae at higher concentrations, achieving >90% genome coverage (p>0.05). However, DeepPathogen significantly improved genome coverage in Shigella detection. At 10³ and 10⁻⁶, [the following data is missing from the original text]. 4 At CFU / mL concentrations, DeepPathogen achieved 26% and 93% genome coverage, respectively, while Kraken2-derived assemblies achieved only 0.09% and 6.4% coverage (p<0.001). Figure 10 D). DeepPathogen significantly improves assembly integrity, which is crucial for downstream analyses, including pathogenicity assessment, antibiotic resistance analysis, and mutation detection.
[0100] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0101] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0104] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0105] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0106] The exemplary embodiments of this disclosure described in detail above are merely illustrative and not restrictive. Those skilled in the art will understand that various modifications and combinations of these embodiments or their features can be made without departing from the principles and spirit of this disclosure, and such modifications should fall within the scope of this disclosure.
Claims
1. A method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning, characterized in that, The method includes: S101, Obtain sequencing data of the target pathogen and sequencing data of the control bacterial strain; S102, using natural language processing to tokenize and embed the target pathogen sequencing data and control bacterial sequencing data to obtain sequence features; S103, the sequence features are input into the hybrid neural network architecture to obtain the predicted classification result, which is compared with the classification label. The loss function is optimized based on the comparison result to obtain the prediction model. The hybrid neural network architecture includes a context-aware unit and a hierarchical feature extraction unit. The context-aware unit uses a Transformer encoder to capture long program sequence dependencies. The hierarchical feature extraction unit is composed of 9 stacked Conv1D modules, which include 8 Conv1D modules and a classification output layer.
2. The method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning according to claim 1, characterized in that, Each Conv1D module includes: an extension layer that extracts high-dimensional features through multi-scale one-dimensional convolution, a compression layer for feature dimensionality reduction and information focusing, and an activation and normalization layer that combines the SiLU activation function with a batch normalization layer; the classification output layer is the final Conv1D that maps features to the target classification space.
3. The method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning according to claim 1, characterized in that, The target pathogen sequencing data is adaptive sampling sequencing data, and the acquisition method includes: collecting DNA data of the target pathogen and assembling it to obtain an assembled pathogen genome; obtaining reference sequences of Vibrio cholerae, Salmonella and Shigella from public databases, combining the reference sequences with the assembled pathogen genome to create a custom reference file for nanopore adaptive sampling; and performing nanopore sequencing based on the custom reference file to obtain the adaptive sampling sequencing data. Optionally, the adaptive sampling sequencing data is ≥1 kb; Optionally, the reference sequence can be combined with the assembled pathogen genome by removing redundancy and taking the union of the genomes; Optionally, the target pathogen is created by mixing equal amounts of DNA from at least two pathogen species with environmental bacterial DNA at different dilutions.
4. The method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning according to claim 1, characterized in that, The target pathogens include one or more of the following: Vibrio cholerae, Salmonella, and Shigella; Optionally, control strains include non-target pathogens, environmental strains, and human sequences. Non-target pathogens include one or more of the following: Klebsiella pneumoniae, Acinetobacter baumannii, Staphylococcus aureus, Pseudomonas aeruginosa, and Escherichia coli. Environmental strains include one or more of the following: Pseudomonas putida, Stenotrophomonas maltophilia, and Flavobacterium.
5. The method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning according to claim 1, characterized in that, The tokenization and embedding methods in S102 include: converting the raw sequences in the sequencing data into N-dimensional discrete tokens through 6-mer frequency analysis, and mapping them to an M-dimensional latent feature space using a trainable embedding matrix, where M is less than N.
6. The method for constructing a bacterial pathogen detection model based on nanopore adaptive sampling and deep learning according to claim 1, characterized in that, Between S101 and S102, the method further includes: preprocessing the sequencing data of the target pathogen and the sequencing data of the control bacterial strain. The preprocessing method includes: establishing a dual threshold filtering mechanism and adopting a quality control standard of Q-score ≥ 10 and sequence length > 1 kbp. Optionally, the preprocessing method further includes: implementing a dynamic subsampling strategy on the sequencing data to ensure standardized processing of the input data.
7. A method for detecting bacterial pathogens, characterized in that, The method includes: S201, Obtain the water sample to be tested; S202, input the water sample to be tested into the detection model constructed by the method of any one of claims 1-6, and obtain the detection result of the water sample to be tested; Optionally, the detection results include: pathogen type and pathogen serotype; Optionally, the sources of the water samples to be tested include: Haihe River, Tuanbo Lake, hospital sewage, and urban sewage.
8. A computer device, characterized in that, The device includes: a memory and a processor; the memory is used to store a computer program; the processor executes the computer program to implement the steps of the method according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-7.
Citation Information
Cited By
Deep learning-based pathogen DNA detection optimization method
CN122135789A