Resistance gene discovery method and system based on graph neural network

By constructing a resistance gene neighborhood graph and utilizing graph neural networks for information exchange and feature collaboration, the sensitivity and accuracy issues in antibiotic resistance gene discovery in existing technologies have been resolved. This enables reliable identification of low-abundance and novel variants, avoids information loss, and improves the overall effectiveness of resistance gene discovery.

CN121838893APending Publication Date: 2026-04-10HUGOBIOTECH BEIJING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient sensitivity and limited accuracy in the discovery of antibiotic resistance genes, especially in the detection of low abundance and novel variants, and the failure of genome assembly leads to information loss.

Method used

A graph neural network-based approach was used to construct a neighborhood graph of resistance genes. Information exchange and feature collaboration were achieved through the graph neural network, connected subgraphs were identified, and features were extracted using a DNA language model. Combined with a classifier, resistance genes were discovered.

Benefits of technology

It significantly improves the sensitivity and accuracy of resistance gene discovery, can identify low abundance and novel variants, avoids information loss caused by genome assembly, and the results are more consistent with biological logic and have strong robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121838893A_ABST
    Figure CN121838893A_ABST
Patent Text Reader

Abstract

The invention discloses a resistance gene discovery method based on a graph neural network, and relates to the technical field of bioinformatics and artificial intelligence crossing, and the method comprises the following steps: obtaining metagenome sequencing data, and loosely comparing the metagenome sequencing data with a resistance gene database to obtain candidate sequences; constructing an undirected graph; extracting an initial vector feature of the candidate sequence by using a DNA language model, and inputting the undirected graph and the initial vector feature into a graph neural network to obtain a context sensing feature vector of each node; identifying connected sub-graphs in the undirected graph; aggregating the context sensing feature vectors of the nodes in each connected sub-graph into global feature vectors; and inputting the global feature vector into a classifier, and determining a connected subgraph belonging to the drug-resistant gene. According to the novel method, limitation of genome assembly can be avoided, fragmented sequence information can be effectively integrated, and reliable discovery of drug-resistant genes, especially low-abundance and novel drug-resistant genes, is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of bioinformatics and artificial intelligence, in particular to a method for processing metagenomic sequencing data, and more particularly to a method for improving the sensitivity and accuracy of resistance gene discovery by constructing a resistance gene proximity graph without genome assembly. BACKGROUND

[0002] The rapid and accurate discovery of antibiotic resistance genes is crucial to addressing global public health challenges. Metagenomic next-generation sequencing (mNGS) technology has become an important tool for discovering resistance genes due to its advantages of not requiring cultivation and being able to comprehensively screen all genetic material in the sample.

[0003] However, mNGS technology generates highly fragmented short sequence reads by randomly breaking nucleic acids. Existing resistance gene discovery methods mainly face the following technical bottlenecks: (1) Direct alignment-based method: This method directly aligns short sequence reads with a resistance gene database. Although fast, its sensitivity is limited by the length of the short sequence. A resistance gene may be covered by multiple incomplete short sequences, and a single short sequence may be too short or contain sequencing errors to meet the alignment threshold, resulting in false negative results. In addition, this method cannot distinguish between closely related resistance gene subtypes, and the accuracy is limited.

[0004] (2) Genome assembly-based method: This method attempts to first assemble short sequences into longer continuous sequences, and then perform gene discovery on the long sequences. However, in clinical samples, the abundance of pathogens is usually low, resulting in poor genome assembly results. A large number of short sequences containing resistance genes are discarded directly because they cannot be assembled, resulting in a serious waste of critical information.

[0005] (3) Poor detection of new resistance genes: The above methods rely heavily on accurate matching of known sequences. When faced with new, highly variable drug-resistant gene variants generated by gene mutation or horizontal gene transfer, it is easy to miss detection due to the lack of matching templates in the database.

[0006] Therefore, there is an urgent need in the art for a new method that can bypass the limitations of genome assembly, effectively integrate fragmented sequence information, and have strong generalization ability to reliably discover drug-resistant genes, especially low-abundance and new drug-resistant genes. SUMMARY

[0007] The embodiments of the present application provide a resistance gene discovery method and system based on a graph neural network to solve the above problems existing in the prior art.

[0008] In one aspect, the embodiment of the present application provides a resistance gene discovery method based on a graph neural network, comprising: obtaining metagenomic sequencing data of a sample to be tested, performing loose alignment of the metagenomic sequencing data with a resistance gene database, and obtaining candidate sequences; constructing an undirected graph based on the candidate sequences wherein V represents a node representing a candidate sequence, E represents a connection relationship between candidate sequences; extracting an initial vector feature of the candidate sequence by using a DNA (deoxyribonucleic acid) language model, inputting the undirected graph and the initial vector feature into a graph neural network, and enabling nodes connected to each other in the undirected graph to exchange information and cooperate features through an iterative message passing mechanism of the graph neural network, so as to obtain a context-aware feature vector of each node fused with neighbor information; identifying a connected subgraph composed of nodes connected to each other in the undirected graph; aggregating context-aware feature vectors of all nodes in each connected subgraph into a global feature vector; inputting the global feature vector into a classifier to determine the connected subgraph belonging to a drug-resistant gene.

[0009] In another aspect, the embodiment of the present application further provides a resistance gene discovery system based on a graph neural network, comprising: a candidate sequence extraction module, which obtains metagenomic sequencing data of a sample to be tested, performs loose alignment of the metagenomic sequencing data with a resistance gene database, and obtains candidate sequences; a graph construction module, configured to construct an undirected graph based on the candidate sequences wherein V represents a node representing a candidate sequence, E represents a connection relationship between candidate sequences; a node information fusion module, configured to extract an initial vector feature of the candidate sequence by using a DNA language model, input the undirected graph and the initial vector feature into a graph neural network, and enable nodes connected to each other in the undirected graph to exchange information and cooperate features through an iterative message passing mechanism of the graph neural network, so as to obtain a context-aware feature vector of each node fused with neighbor information; a subgraph identification module, configured to identify a connected subgraph composed of nodes connected to each other in the undirected graph; a feature aggregation module, configured to aggregate context-aware feature vectors of all nodes in each connected subgraph into a global feature vector; a classification module, configured to input the global feature vector into a classifier to determine the connected subgraph belonging to a drug-resistant gene.

[0010] In another aspect, the embodiments of the present application also provide a computer storage medium, which stores a plurality of computer instructions for causing a computer to execute the method described above.

[0011] The method and system for discovering resistance genes based on a graph neural network have the following advantages: Significantly improve the discovery sensitivity: By constructing a proximity graph, multiple individual low alignment scores can be "combined" to judge short sequences that are continuous on the sequence. A weak signal may be ignored, but a group of weak signals associated with each other can be reliably identified after being enhanced by GNN (graph neural network), effectively reducing the false negative rate, especially for low abundance samples.

[0012] Strong generalization ability: Through GNN, the abstract relationship pattern between drug-resistant gene fragments is learned, rather than relying on specific sequence matching. Combined with the generalization features provided by the pre-trained DNA language model, even if it is a new drug-resistant gene variant that has never appeared in the training set, as long as it shows a proximity relationship consistent with biological logic, it can still be effectively identified.

[0013] Robust analysis results and more consistent with biological logic: A subgraph classification strategy is adopted, and the entire connected subgraph (i.e., a potential complete gene) is used as the judgment unit, rather than a single node. This method makes full use of the overall information of the gene, can smooth out individual node abnormalities, has stronger robustness to sequencing errors and noise, and its judgment results are more consistent with biological facts.

[0014] No genome assembly, all information retained: Directly analyze at the short sequence level, completely avoid the information loss problem caused by assembly failure, and maximize the use of sequencing data. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0016] Figure 1 A flowchart of a method for discovering resistance genes based on a graph neural network is provided for the embodiments of the present application.

[0017] Figure 2 A schematic diagram of the undirected graph construction process is provided for the embodiments of the present application.

[0018] Figure 3This is a flowchart illustrating information exchange and feature collaboration among nodes in an undirected graph, as provided in an embodiment of this application.

[0019] Figure 4 A flowchart illustrating context-aware feature vector aggregation provided in this application embodiment.

[0020] Figure 5 This is a schematic diagram illustrating the training process of the graph neural network and classifier provided in the embodiments of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] Figure 1 This application provides a flowchart of a method for discovering resistance genes based on graph neural networks, as illustrated in this embodiment. The method includes: Step S1: Obtain metagenomic sequencing data of the sample to be tested, and perform a loose alignment between the metagenomic sequencing data and the resistance gene database to obtain candidate sequences.

[0023] For example, after quality control and host sequence removal of metagenomic sequencing data, a loose alignment is performed with an antibiotic resistance gene database to identify all possible read lengths containing antibiotic resistance gene fragments, which are denoted as the set of candidate sequences. ,in For the first N Candidate sequences, N This represents the number of candidate sequences in the set. The lenient alignment in this embodiment aims to maximize recall, allowing potentially relevant but low-confidence sequences to be included in the analysis.

[0024] Specifically, the quality control process is as follows: (1) Remove sequences containing sequencing adapters; (2) Remove sequences with N base content ≥ 5%; (3) Filter sequences in which low-quality bases (less than Q20) account for more than 20%; (4) Remove duplicate sequences; (5) Retain sequences with a length of ≥40bp.

[0025] The process of host sequence removal is as follows: The sequence is aligned with a human reference genome, and sequences that align with the human genome are removed. The human reference genome can be version hg38, t2t-chm13, etc., and the alignment algorithm can be bowtie2, bwa, SNAP (nucleic acid sequence alignment program), etc.

[0026] The process of loose comparison is as follows: Loose homology alignment was performed using short sequence alignment tools (such as bowtie2, bwa, and blast), with core parameters set according to the following criteria to maximize the capture of homologous sequences (including distantly related and short-fragment homologous sequences): (1) Homology threshold: Set the identity of the aligned sequence to ≥70% with the reference sequence to lower the screening threshold for distantly homologous sequences; (2) Effective alignment length: Set the minimum alignment length to ≥30bp to shorten the effective matching fragment requirement and capture short homologous sequences; (3) Gap penalty strategy: Set gap opening penalty ≤ 2 and gap extension penalty ≤ 1 to reduce the impact of sequence insertion / deletion variation comparison on the results; (4) Alignment mode selection: Local alignment mode is adopted to avoid missing homologous sequences due to differences at both ends of the sequence.

[0027] Step S2: Construct an undirected graph based on candidate sequences. ,in V This represents a node that represents a candidate sequence. E This indicates the connection relationship between candidate sequences.

[0028] For example, V Represented as ,in Indicates the first N There are 2 nodes. When constructing an undirected graph, if two nodes... and There are candidate sequences whose length exceeds a length threshold. The overlapping region, at the nodes representing the two candidate sequences. and Establish edges representing connections between them , i ≠ j ,and i , j ∈[1, N ]. This side weight The similarity score is calculated based on the overlapping region sequence of the candidate sequences corresponding to the nodes at both ends of an edge. The process of constructing an undirected graph is as follows: Figure 2 As shown.

[0029] Step S3: Use the DNA language model to extract the initial vector features of the candidate sequences. Input the undirected graph and the initial vector features into the graph neural network. The graph neural network uses an iterative message passing mechanism to enable the interconnected nodes in the undirected graph to exchange information and coordinate features, resulting in a context-aware feature vector for each node that incorporates information from its neighbors.

[0030] For example, the initial vector features are represented as The DNA language model described above can be implemented using DNABert. The purpose of this step is to learn a node feature representation that can incorporate local neighborhood information.

[0031] node In the graph neural network k eigenvectors of the layer Update according to the following formula:

[0032] in, It is a non-linear activation function. For nodes The set of neighboring nodes, for The nodes in Attention coefficient, used to measure the number of nodes For nodes The importance of For graph neural networks k The learnable weight matrix of the layer, For graph neural networks k Feature vectors of layer -1.

[0033] go through K After layer iterations, each node obtains a context-aware feature vector that incorporates information from its neighbors. ,in Indicates the process K The feature vector obtained after layer iteration. The process of this step is as follows: Figure 3 As shown.

[0034] Step S4: Identify the connected subgraphs formed by the interconnected nodes in the undirected graph.

[0035] For example, a connected subgraph is represented as .

[0036] Step S5: Aggregate the context-aware feature vectors of all nodes within each connected subgraph into a global feature vector.

[0037] For example, average pooling is used to convert context-aware feature vectors The aggregation is a global feature vector The global feature vector may represent the overall characteristics of the subgraph, and has a fixed dimension. The process of this step is shown in Figure 4 .

[0038] Step S6, input the global feature vector into the classifier to determine the connected subgraph belonging to the drug-resistant gene.

[0039] Exemplarily, the classifier can adopt MLP (Multi-Layer Perceptron), and the classifier outputs the probability of each connected subgraph being a "real drug-resistant gene" . A probability threshold is set, and all connected subgraphs are finally determined as discovered drug-resistant genes, and all sequence information and annotations contained therein are output.

[0040] Further, the graph neural network and the classifier are trained and optimized together through a unified and end-to-end supervised learning process. During training, the training subgraph is input into the graph neural network, the data output by the graph neural network is input into the classifier, and the parameters of the graph neural network and the classifier are optimized according to the difference between the predicted probability output by the classifier and the real label.

[0041] Specifically, the training process is as follows: Prepare training data: construct a large number of training subgraphs containing known drug-resistant genes (positive samples) and non-drug-resistant genes (negative samples), and assign corresponding labels.

[0042] Forward propagation: sequentially pass the training subgraph through steps S3-S6 to obtain the predicted probability .

[0043] Loss calculation: use a loss function, such as binary cross-entropy, to calculate the difference between the predicted probability and the real label.

[0044] Backpropagation and optimization: propagate the loss from the classifier to the graph neural network, and simultaneously update all parameters of the graph neural network and the classifier according to the gradient descent algorithm. Through this process, the model learns how to adjust the attention coefficient to generate the most beneficial node features for the final classification task. The process of this step is shown in Figure 5 .

[0045] The embodiments of the present application also provide a resistance gene discovery system based on a graph neural network, comprising: A candidate sequence extraction module acquires metagenomic sequencing data of a sample to be tested, performs a loose alignment between the metagenomic sequencing data and a resistance gene database, and obtains candidate sequences. A graph construction module is configured to construct an undirected graph based on the candidate sequences wherein V represents a node representing a candidate sequence, E represents a connection relationship between the candidate sequences; A node information fusion module is configured to extract an initial vector feature of the candidate sequences by using a DNA language model, input the undirected graph and the initial vector feature into a graph neural network, and make nodes connected to each other in the undirected graph exchange information and cooperate features through an iterative message passing mechanism of the graph neural network, so as to obtain a context-aware feature vector of each node fused with neighbor information. A subgraph identification module is configured to identify a connected subgraph composed of nodes connected to each other in the undirected graph. A feature aggregation module is configured to aggregate the context-aware feature vectors of all nodes inside each connected subgraph into a global feature vector. A classification module is configured to input the global feature vector into a classifier, and determine the connected subgraph belonging to the drug-resistant gene.

[0046] The embodiments of the present application further provide a computer storage medium, which stores a plurality of computer instructions. The computer instructions are used for causing a computer to execute the method described above.

[0047] Although the preferred embodiments of the present application have been described, those skilled in the art who are informed of the basic inventive concept can make additional changes and modifications to the embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0048] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and equivalent technologies thereof, the present application also intends to include these modifications and variations.

Claims

1. A method for discovering resistance genes based on graph neural networks, characterized in that, include: Obtain metagenomic sequencing data of the sample to be tested, and perform a loose alignment of the metagenomic sequencing data with an resistance gene database to obtain candidate sequences; An undirected graph is constructed based on the candidate sequences. ,in V This represents the node that represents the candidate sequence. E This indicates the connection relationships between the candidate sequences; The initial vector features of the candidate sequence are extracted using the DNA language model. The undirected graph and the initial vector features are then input into a graph neural network. The graph neural network uses an iterative message passing mechanism to enable the interconnected nodes in the undirected graph to exchange information and collaborate on features, resulting in a context-aware feature vector for each node that incorporates information about its neighbors. Identify the connected subgraph formed by the interconnected nodes in the undirected graph; The context-aware feature vectors of all nodes within each connected subgraph are aggregated into a global feature vector; The global feature vector is input into the classifier to determine the connected subgraphs belonging to the drug resistance gene.

2. The method for discovering resistance genes based on graph neural networks according to claim 1, characterized in that, The graph neural network and the classifier are trained and optimized together through a unified end-to-end supervised learning process. During training, the training subgraph is input into the graph neural network, and the data output by the graph neural network is input into the classifier. The parameters of the graph neural network and the classifier are optimized based on the difference between the predicted probability output by the classifier and the true label.

3. The method for discovering resistance genes based on graph neural networks according to claim 2, characterized in that, The training subgraph contains both positive and negative samples.

4. The method for discovering resistance genes based on graph neural networks according to claim 1, characterized in that, After quality control and host sequence removal, the metagenomic sequencing data is loosely compared with the resistance gene database.

5. The method for discovering resistance genes based on graph neural networks according to claim 1, characterized in that, When constructing the undirected graph, if there is an overlapping region between two candidate sequences whose length exceeds a length threshold, an edge representing the connection relationship is established between the nodes representing the two candidate sequences.

6. The method for discovering resistance genes based on graph neural networks according to claim 5, characterized in that, The weight of the edge is determined by the similarity score of the overlapping regions of the candidate sequences corresponding to the nodes at both ends of the edge.

7. The method for discovering resistance genes based on graph neural networks according to claim 1, characterized in that, node In the graph neural network k eigenvectors of the layer Update according to the following formula: in, It is a non-linear activation function. For nodes The set of neighboring nodes, for The nodes in Attention coefficient, used to measure the number of nodes For nodes The importance of For the graph neural network of the th k The learnable weight matrix of the layer, For the graph neural network of the th k Feature vectors of layer -1.

8. The method for discovering resistance genes based on graph neural networks according to claim 1, characterized in that, The context-aware feature vectors are aggregated into the global feature vectors using average pooling.

9. A system applying the graph neural network-based resistance gene discovery method according to any one of claims 1-8, characterized in that, include: The candidate sequence extraction module acquires metagenomic sequencing data of the sample to be tested, and performs a loose alignment of the metagenomic sequencing data with an resistance gene database to obtain candidate sequences. The graph construction module is used to construct an undirected graph based on the candidate sequences. ,in V This represents the node that represents the candidate sequence. E This indicates the connection relationships between the candidate sequences; The node information fusion module is used to extract the initial vector features of the candidate sequence using the DNA language model, input the undirected graph and the initial vector features into the graph neural network, and the graph neural network enables the interconnected nodes in the undirected graph to exchange information and coordinate features through an iterative message passing mechanism, so as to obtain a context-aware feature vector of each node that integrates the information of its neighbors. The subgraph recognition module is used to identify connected subgraphs formed by interconnected nodes in the undirected graph; The feature aggregation module is used to aggregate the context-aware feature vectors of all nodes within each connected subgraph into a global feature vector; The classification module is used to input the global feature vector into the classifier to determine the connected subgraphs belonging to the drug resistance gene.

10. A computer storage medium, characterized in that, The computer storage medium stores a plurality of computer instructions, which are used to cause the computer to perform the method described in any one of claims 1-8.