Method, device and medium for interpreting a pathogen
By preprocessing the initial sequencing data and comparing it with the pathogen database, combined with the random forest algorithm to identify pathogen types and detect drug-resistant genes, the problems of time-consuming pathogen detection and inaccurate results in existing technologies are solved, and efficient and accurate pathogen identification and drug resistance analysis are achieved.
Patent Information
- Application Number
- CN202510955885.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-11
AI Technical Summary
Existing pathogen detection methods such as microbial culture and immunological testing are time-consuming and have low detection rates, leading to delayed diagnosis. Data processing and result interpretation after targeted sequencing are complex and rely on manual experience, resulting in inaccurate results.
By preprocessing the initial sequencing data, removing low-quality data and redundant sequences, comparing it with the preset pathogen database, combining the random forest algorithm and sequence alignment algorithm to identify the pathogen type, detect drug-resistant genes, and generate a report.
It improves the accuracy and efficiency of pathogen identification and drug resistance analysis, reduces manual operation time and errors, and provides comprehensive and clear test results.
Smart Images

Figure CN120496636B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical detection, in particular to a pathogen identification method, device and medium. BACKGROUND
[0002] In the diagnosis and treatment of clinical infectious diseases, it is crucial to quickly and accurately determine the type of pathogen and its drug resistance characteristics. Traditional pathogen detection methods, such as microbial culture and immunological detection, usually require a long time to obtain results, and for some difficult-to-culture pathogens or special pathogens, their detection rate is low. These limitations can lead to delayed diagnosis, which in turn affects the timely treatment of patients.
[0003] In recent years, targeted sequencing technology, as a new molecular diagnostic tool, has attracted attention due to its high sensitivity and specificity. This technology can provide detailed pathogen information in a short time by sequencing specific gene regions of the pathogen. However, the data processing and result interpretation process after targeted sequencing is relatively complex, and currently relies on human experience or semi-automatic tools. This dependency not only increases the time cost of diagnosis, but also may lead to inaccurate results due to human factors. SUMMARY
[0004] In view of the above deficiencies of the prior art, the purpose of the present application is to provide a pathogen identification method to improve the accuracy and detection efficiency of pathogen identification and drug resistance analysis, and to provide a more reliable basis for clinical diagnosis.
[0005] According to an embodiment of the present application, the first scheme is provided: performing data preprocessing on the received initial sequencing data to obtain first sequence data; aligning the first sequence data with reference genome sequences in a preset pathogen database to obtain alignment results; obtaining a set of read parameters of the initial sequencing data according to the alignment results; performing pathogen identification processing on the set of read parameters to obtain a target pathogen type corresponding to the initial sequencing data; performing drug resistance gene detection on the target pathogen type to determine whether there is a target drug resistance gene corresponding to the target pathogen; if there is, analyzing the target drug resistance gene to obtain drug resistance data; and generating a target report according to the target pathogen type, the target drug resistance gene and the drug resistance data.
[0006] Further, as a more preferred embodiment of the present application, the data preprocessing on the received initial sequencing data to obtain first sequence data comprises: filtering the initial sequencing data according to a preset quality score threshold to obtain a plurality of first reads greater than the preset quality score threshold; and performing data preprocessing on the plurality of first reads according to a preset sequence alignment algorithm to obtain first sequence data.
[0007] Furthermore, as a more preferred embodiment of the present invention, before comparing the first sequence data with the reference genome sequence in the preset pathogen database to obtain the comparison result, the method also includes: obtaining reference genome sequences of multiple pathogens; indexing the reference genome sequences of the multiple pathogens to obtain a target index structure; based on the target index structure, establishing a corresponding preset pathogen database, the preset pathogen database including each pathogen, the reference genome sequence corresponding to each pathogen, the drug-resistant gene sequence, the drug-resistant mutation site information and the corresponding drug-resistant phenotype.
[0008] Further, as a more preferred embodiment of the present invention, the first sequence data is compared with the reference genome sequence in the preset pathogen database to obtain a comparison result, including: performing short sequence processing on the first sequence data to obtain multiple second reads; using each second read as a query identifier, comparing the reference genome sequence in the preset pathogen database in the preset pathogen database to obtain a matching score between each second read and the reference genome sequence; obtaining the read length of each second read; performing judgment processing on the read length and the matching score of each second read according to a preset judgment rule to obtain at least one first matching read and at least one second matching read; determining whether the first sequence data is the data to be detected based on the first number corresponding to the at least one first matching read and the second number corresponding to the at least one second matching read; when the first sequence data is the data to be detected, detecting whether the first number of the at least one first matching read meets a preset condition to obtain a comparison result.
[0009] Furthermore, as a more preferred embodiment of the present invention, the reading parameter set of the initial sequencing data is obtained based on the comparison result, including: if the comparison result is qualified, the multiple second reads are calculated according to a preset formula set to obtain the reading parameter set of the initial sequencing data.
[0010] Furthermore, as a more preferred embodiment of the present invention, the pathogen interpretation processing of the read parameter set to obtain the target pathogen type corresponding to the initial sequencing data includes: constructing a feature vector based on the read parameter set to obtain a target feature vector; analyzing the target feature vector according to a preset random forest algorithm to obtain a first pathogen type; calculating the degree of variation according to the read parameter set to obtain a target degree of variation; calculating according to the target degree of variation and the read parameter set to obtain a first score; determining a weight coefficient according to the first score; obtaining a second score according to the weight coefficient and the first score; when the second score is greater than the preset score, determining the first pathogen type as the target pathogen type corresponding to the initial sequencing data.
[0011] Further, as a more preferred implementation scheme of the present invention, determining the weight coefficient based on the first score includes: obtaining a preset first threshold and a preset second threshold; when the first score is greater than or equal to the preset first threshold, determining the weight coefficient according to a first weight strategy; or, when the first score is less than the preset first threshold and greater than or equal to the preset second threshold, determining the weight coefficient according to a second weight strategy; or, when the first score is less than the preset second threshold, determining the weight coefficient according to a third weight strategy.
[0012] Furthermore, as a more preferred embodiment of the present invention, the drug-resistant gene detection of the target pathogen type to determine whether the target drug-resistant gene corresponding to the target pathogen exists includes: obtaining the reference drug-resistant gene-related sequence corresponding to the target pathogen type from the preset pathogen database; calculating the reference drug-resistant gene-related sequence corresponding to the target pathogen type and the target drug-resistant gene-related sequence corresponding to the target pathogen type according to a preset sequence alignment algorithm to obtain target similarity and target coverage; and determining whether the target drug-resistant gene corresponding to the target pathogen exists based on the target similarity and the target coverage.
[0013] According to an embodiment of the present invention, a second scheme is provided by the present invention: a pathogen interpretation device, characterized in that the device includes a data preprocessing unit, which is used to perform data preprocessing on the received initial sequencing data to obtain first sequence data; a comparison unit, which is used to compare the first sequence data with the reference genome sequence in a preset pathogen database to obtain a comparison result; a processing unit, which is used to obtain a read parameter set of the initial sequencing data based on the comparison result; the processing unit is also used to perform pathogen interpretation processing on the read parameter set to obtain the target pathogen type corresponding to the initial sequencing data; a judgment unit, which is used to perform drug resistance gene detection on the target pathogen type to determine whether there is a target drug resistance gene corresponding to the target pathogen; the processing unit is also used to analyze the target drug resistance gene if it exists to obtain drug resistance data; the processing unit is also used to generate a target report based on the target pathogen type, the target drug resistance gene and the drug resistance data.
[0014] According to an embodiment of the present invention, a third solution provided by the present invention is: a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the program comprises instructions for the first solution.
[0015] According to an embodiment of the present invention, a fourth solution provided by the present invention is: a computer storage medium is provided, wherein the computer storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned first solution and any possible implementation method thereof.
[0016] This application improves the accuracy and efficiency of subsequent analysis by removing low-quality data and adapter / primer sequences through pre-processing; further comparing the initial sequencing data with the reference genome sequence in the preset pathogen database can accurately identify the type of pathogen in the sample; after identifying the pathogen, further testing whether it carries drug-resistant genes, thereby helping medical professionals understand the pathogen's resistance to certain drugs, thereby adjusting treatment plans and improving treatment effectiveness; analyzing the detected drug-resistant genes can obtain relevant drug resistance data, which helps to assess the drug resistance risk of the pathogen; integrating the pathogen identification results and drug resistance analysis results into a report to provide users with comprehensive and clear information. Therefore, the automated data processing and analysis process reduces the time and errors of manual operations and improves the efficiency of pathogen detection and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0018] Figure 1 A schematic diagram of a flow chart of a pathogen identification method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a pathogen identification device provided in an embodiment of the present application;
[0020] Figure 3 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of this application.
[0022] It should be noted that when an element is referred to as being “fixed on” or “set on” another component, it can be directly on the other component or indirectly set on the other component; when a component is referred to as being “connected to” another component, it can be directly connected to the other component or indirectly connected to the other component.
[0023] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.
[0024] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. Throughout the description of this application, "plurality" or "several" means two or more, unless otherwise specifically defined.
[0025] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the efficacy and purpose that can be achieved by this application.
[0026] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0027] See also Figure 1 , Figure 1 : This is a flow chart of a pathogen identification method provided in an embodiment of the present application. The method may include:
[0028] 101. Perform data preprocessing on the received initial sequencing data to obtain first sequence data.
[0029] In an optional embodiment, the data preprocessing of the received initial sequencing data to obtain first sequence data includes: filtering the initial sequencing data according to a preset quality score threshold to obtain multiple first reads greater than the preset quality score threshold; and performing data preprocessing on the multiple first reads according to a preset sequence alignment algorithm to obtain first sequence data.
[0030] The preset quality score threshold may be 30, which is not a unique limit here.
[0031] Specifically, during the filtering process of the initial sequencing data, a quality score threshold (such as Phred quality value Q≥30) is used to screen reads, and the calculation formula is: ,
[0032] Where P is the error probability, which can intuitively reflect the possibility of a base being misidentified.
[0033] The initial sequencing data is typically in FASTQ format, which contains the sequence information and quality information of the reads corresponding to the initial sequencing data. The Q value refers to the Phred quality value, and the P value refers to the error probability.
[0034] Phred quality (Q) values are calculated by the sequencing instrument during the sequencing process based on the accuracy of base calls. The instrument analyzes and evaluates various factors, including signal intensity and background noise, for each base, and then assigns a quality value representing the accuracy of the base call. In FASTQ-format sequencing data files, each base is assigned a value, stored as ASCII characters.
[0035] Among them, when the quality value Q ≥ 30, the error probability P ≤ 0.001, which means that the probability of base recognition error is very low and the data quality is high; conversely, the lower the Q value, the larger the P value, and the higher the possibility of base recognition error. Such data may introduce more errors in subsequent analysis. Therefore, setting the P value threshold during data preprocessing can effectively filter out reads with higher error rates.
[0036] In the process of preprocessing the first reads according to a preset sequence alignment algorithm to obtain first sequence data, the sequence alignment algorithm BLAST (Basic Local Alignment Search Tool) is used to locate and remove redundant adapter and primer sequences in the sequencing reads. The specific steps are as follows:
[0037] ① Build a BLAST database: Organize known adapter and primer sequences into a specific format and use the database builder included with the BLAST tool to construct a BLAST database. This database serves as the foundation for subsequent alignments, storing key information about adapters and primers to facilitate rapid retrieval using the BLAST algorithm.
[0038] ② Sequence alignment: The raw sequencing reads are used as query sequences and compared against a constructed BLAST database. The BLAST algorithm uses a heuristic search strategy, first searching for short, similar sequence fragments (called seeds) in the query and database sequences. It then extends from these seeds in both directions, evaluating sequence similarity by calculating a score. During the alignment process, BLAST considers factors such as base matches, mismatches, and sequence gaps, calculating the alignment score based on a predefined scoring matrix (such as BLOSUM62 or PAM250). For alignments of adapter and primer sequences, a strict score threshold is typically set to ensure accurate identification.
[0039] ③ Locating Redundant Sequences: After the BLAST alignment is complete, a series of alignment results are output, including information such as the matching position of each read with the adapter or primer sequence in the database, and the alignment score. By analyzing these results, the specific locations of redundant adapter and primer sequences in the sequencing reads can be determined. For example, if the alignment score of a read with the adapter sequence at a specific position exceeds a set threshold and the match length reaches a certain ratio, it can be determined that a redundant adapter sequence exists at that position.
[0040] ④ Redundant sequence removal: After determining the location of redundant sequences, programming tools (such as Python string manipulation functions or sequence processing functions in bioinformatics analysis software) are used to remove redundant adapter and primer sequences from the original sequencing reads according to the located start and end positions, thereby obtaining pure sequencing read data for subsequent analysis. This allows for the rapid location and removal of redundant sequences in large-scale sequencing data, providing a high-quality data foundation for subsequent pathogen detection and analysis.
[0041] It can be seen that the use of strict quality filtering standards (such as Phred quality value Q ≥ 30) in this embodiment can effectively remove low-quality sequencing reads, significantly reduce data errors, and provide a reliable data basis for subsequent analysis. Compared with some technologies that do not perform strict quality screening, the accuracy and availability of the data are significantly improved. Furthermore, the BLAST algorithm is used to accurately locate and remove the adapter and primer sequences to ensure the purity of the sequencing data and reduce the interference of redundant information on subsequent analysis. Compared with some traditional methods, this process has significantly improved the efficiency and accuracy of removing redundant sequences.
[0042] 102. Compare the first sequence data with a reference genome sequence in a preset pathogen database to obtain a comparison result.
[0043] In an optional embodiment, before comparing the first sequence data with the reference genome sequence in a preset pathogen database to obtain the comparison result, the method further includes: obtaining reference genome sequences of multiple pathogens; indexing the reference genome sequences of the multiple pathogens to obtain a target index structure; and establishing a corresponding preset pathogen database based on the target index structure, wherein the preset pathogen database includes each pathogen, the reference genome sequence corresponding to each pathogen, the drug-resistant gene sequence, the drug-resistant mutation site information, and the corresponding drug-resistant phenotype.
[0044] Among them, multiple pathogens include common pathogens such as bacteria, fungi, viruses, mycoplasmas, and parasites. Therefore, the reference genome sequences of multiple pathogens include the whole genome sequences or specific gene region sequences of common pathogens such as bacteria, fungi, viruses, mycoplasmas, and parasites.
[0045] Among them, index construction can convert the reference genome sequence into an index structure that is convenient for rapid computer retrieval through index construction algorithms such as Bowtie or BWA.
[0046] In the process of establishing a corresponding drug-resistant gene database based on the target index structure, based on the target index structure, the drug-resistant gene database includes each pathogen, the reference genome sequence corresponding to each pathogen, the known drug-resistant gene sequences of various pathogens, the drug-resistant mutation site information and the corresponding drug-resistant phenotype (such as sensitive, resistant, intermediate).
[0047] Furthermore, the drug-resistance gene database needs to be updated regularly to incorporate information on newly discovered drug-resistance genes. The update can be based on authoritative microbiology research literature, public databases (such as NCBI's GenBank and PubChem databases), and data released by professional microbial resistance monitoring agencies.
[0048] It can be seen that by integrating these multi-type and multi-dimensional databases in this embodiment, comprehensive and timely data support is provided for pathogen detection and drug-resistant gene analysis.
[0049] In an optional embodiment, the first sequence data is compared with the reference genome sequence in the preset pathogen database to obtain a comparison result, including: performing short sequence processing on the first sequence data to obtain multiple second reads; using each second read as a query identifier, comparing the preset pathogen database with the reference genome sequence in the preset pathogen database to obtain a matching score between each second read and the reference genome sequence; obtaining the read length of each second read; performing judgment processing on the read length and the matching score of each second read according to a preset judgment rule to obtain at least one first matching read and at least one second matching read; determining whether the first sequence data is data to be detected based on a first number corresponding to the at least one first matching read and a second number corresponding to the at least one second matching read; when the first sequence data is data to be detected, detecting whether the first number of the at least one first matching read meets a preset condition to obtain a comparison result.
[0050] In the process of comparing the second read segment with the reference genome sequence in the preset pathogen database using each second read segment as a query identifier, an efficient short sequence alignment algorithm (such as Bowtie2 or BWA-MEM) can be used.
[0051] In the process of comparing the preset pathogen database with the reference genome sequence in the preset pathogen database to obtain the matching score of each second read segment with the reference genome sequence, the matching score of each read segment with the reference genome is calculated, and the matching score calculation formula is: (Formula 2), where m is the score of the matching base (e.g., 1 point), l is the match length, g is the mismatch penalty (e.g., -2 points), and e is the gap penalty (e.g., -3 points).
[0052] Among them, the preset interpretation rules are as follows: Short reads (50-150 bases): a high-match read (the first matching read) is a match score S that reaches 80% or more of the read length (i.e., S ≥ read length × 0.8); a low-match read (the second matching read) is a match score lower than 50% of the read length (i.e., S < read length × 0.5); Medium reads (151-500 bases): a match score S at 70% of the read length -80% (i.e., read length × 0.7 ≤ S ≤ read length × 0.8) is a high-match read; a matching score lower than 40% of the read length (i.e., S < read length × 0.4) is a low-match read; long reads (501 bases and above): a matching score S between 60%-70% of the read length (i.e., read length × 0.6 ≤ S ≤ read length × 0.7) is a high-match read; a matching score lower than 30% of the read length (i.e., S < read length × 0.3) is a low-match read.
[0053] The first matching read segment represents a high matching read segment, and the second matching read segment represents a low matching read segment.
[0054] Among them, in the process of determining whether the first sequence data is the data to be detected based on the first number corresponding to the at least one first matching read segment and the second number corresponding to the at least one second matching read segment, if the number of high-matching read segments of a certain pathogen accounts for less than 30% and the number of low-matching read segments accounts for more than 70%, the current interpretation process of the pathogen is stopped to exclude the possibility that the pathogen is a potential source of infection.
[0055] The comparison result may be that the preset condition is met and the process proceeds to the next step, or that the preset condition is not met and the process is terminated.
[0056] Among them, when the first sequence data is the data to be detected, whether the first number of the at least one first matching read segment meets the preset conditions is detected. In the process of obtaining the comparison result, if the proportion of the number of high-matching read segments of the pathogen to the total number of read segments exceeds 30%, it is determined to continue the calculation of the read segment coverage and read segment depth, so the comparison result obtained is to proceed to the next step.
[0057] Alternatively, if the proportion of the number of high-matching reads of the pathogen to the total number of reads does not exceed 30%, the calculation of read coverage and read depth is terminated, and the alignment result is obtained as the termination process.
[0058] Among them, the preset condition is that the proportion of high-matching reads of pathogens accounts for more than 30% of the total number of reads.
[0059] It can be seen that the above process in this embodiment provides key quantitative information for evaluating the support degree of sequencing data for each pathogen.
[0060] 103. Obtain a read parameter set of the initial sequencing data based on the alignment result.
[0061] In an optional embodiment, obtaining the read parameter set of the initial sequencing data based on the comparison result includes: if the comparison result is qualified, calculating the multiple second reads according to a preset formula set to obtain the read parameter set of the initial sequencing data.
[0062] In the process of calculating the plurality of second reads according to the preset formula set, the read coverage of each pathogen reference genome is counted. 00% (Formula 3), (where is the number of reference genome bases covered, is the total length of the reference genome) and read depth (Formula 4), where Indicators such as the number of reads covering a certain position are used to evaluate the support degree of sequencing data for each pathogen.
[0063] The read parameter set of the initial sequencing data may include but is not limited to read coverage, read depth, and matching score.
[0064] It can be seen that this example provides key quantitative information for evaluating the degree of support of sequencing data for each pathogen.
[0065] 104. Perform pathogen identification processing on the read parameter set to obtain the target pathogen type corresponding to the initial sequencing data.
[0066] In an optional embodiment, the pathogen interpretation processing of the read parameter set to obtain the target pathogen type corresponding to the initial sequencing data includes: constructing a feature vector based on the read parameter set to obtain a target feature vector; analyzing the target feature vector according to a preset random forest algorithm to obtain a first pathogen type; calculating the degree of variation according to the read parameter set to obtain a target degree of variation; calculating according to the target degree of variation and the read parameter set to obtain a first score; determining a weight coefficient according to the first score; obtaining a second score according to the weight coefficient and the first score; when the second score is greater than the preset score, determining that the first pathogen type is the target pathogen type corresponding to the initial sequencing data.
[0067] In the process of constructing a feature vector based on the read parameter set to obtain the target feature vector, the feature vector of the pathogen is constructed based on indicators such as read coverage, read depth, and matching score. The read coverage is (C), the read depth is (D), and the total matching score is (S total ), the total length of the read segments is (L total ), then the eigenvector = .
[0068] In the process of analyzing the target feature vector according to the preset random forest algorithm to obtain the first pathogen type, the random forest model is composed of multiple decision trees. Here, a fixed threshold is specified, and in the process of constructing each decision tree, the feature vector is selected. A portion of features are randomly selected to make decisions on splitting nodes. Specifically, a fixed splitting threshold of read coverage C is set to C threshold = 50%, and the fixed splitting threshold of read depth D is D threshold = 10, and the ratio of matching score to read length The fixed splitting threshold is R threshold =0.6. Assume that the sample set of node n is S n , the split feature is X i (i represents a feature in the feature vector, such as i=1 represents read coverage C, i=2 represents read depth D, and i=3 represents the ratio of matching score to read length When i = 1, if X 1(S) ≥C threshold , then the sample set S n Split into subsets S n1 = If X 1(S) <C threshold , then split into subsets S n2 = When i = 2, if X 2(S) ≥D hreshold , then the sample set S n Split into subsets S n1 = If X 2(S) <D threshold , then split into subsets S n2 = ; When i = 3, if X 3(S) ≥R hreshold , then the sample set S n Split into subsets S n1 = If X 3(S) <Rthreshold , then split into subsets S n3 = Among them, the random forest ensemble is used to construct multiple decision trees, and the feature vector of the sample to be judged is Each decision tree will give a prediction result. The random forest model uses a voting mechanism to determine the final pathogen type judgment result.
[0069] Assume there are N decision trees, and the jth decision tree has The predicted result is y j (y j Indicates the number of a certain pathogen type), the final prediction result = ;
[0070] in, (·) is an indicator function. When the condition in the brackets is true, that is, when In the example, the j-th decision tree When k (the number of the pathogen type) is equal to k, the condition in the brackets is said to be true.
[0071] For example, suppose there are 5 decision trees (N=5), and the prediction result y1 of the first decision tree is pathogen type A. If k is A at this time, then The y1=k in the brackets is true, that is, the condition is true. The function value is 1. If the value is B, Not true, that is, the condition is false, The function value is 0.
[0072] In calculation When , the prediction results of each decision tree are judged in this way, and the function values 1 that meet the conditions (conditions are true) are accumulated to obtain the number of decision trees predicted to be pathogen type k. Finally, Find the k value that maximizes the cumulative sum. The pathogen type corresponding to this k value is the final prediction result of the random forest model.
[0073] During the process of calculating the degree of variation based on the set of read parameters to obtain the target degree of variation, the degree of variation V is calculated, and the number of single nucleotide polymorphisms (SNPs) discovered during the alignment process is counted, denoted as n. The degree of variation for a specific gene region, V, = n / L, where L is the number of bases in the specific gene region (excluding additional or missing bases due to insertions or deletions), i.e., the length of the reference sequence for that specific gene region. When counting SNPs and calculating the degree of variation, this fixed length is used as the denominator to measure the proportion of the number of SNPs in the entire specific gene region, thereby reflecting the degree of variation in that region.
[0074] In the process of calculating the first score based on the target variation degree and the set of read parameters, a comprehensive pathogen likelihood score formula is constructed.
[0075] Score=α +γ +
[0076] Among them, Score is the first score, C is the read coverage, and D is the read depth. is the ratio of matching score to read length, and V is the degree of variation in a specific gene region. is the weight coefficient, which is obtained by training and optimizing the machine learning algorithm gradient descent method on a large amount of known sample data according to different pathogens and detection requirements.
[0077] In the process of obtaining the second score according to the weight coefficient and the first score, the weight coefficient is multiplied by the corresponding first score to obtain the second score.
[0078] If the probability of determining it to be a certain microorganism is 0.6, then the k value = 0.6. Multiplying the weight coefficient by the range of the score will increase the possibility of it being a certain microorganism.
[0079] Among them, when the second score is greater than the preset score, the first pathogen type is determined to be the target pathogen type corresponding to the initial sequencing data. The preset score can be set manually or obtained from experimental data, and is not the only limitation here.
[0080] As can be seen, this example not only considers read coverage, depth, and matching scores, but also incorporates the degree of variation (V) in specific gene regions to construct a comprehensive pathogen likelihood scoring formula (Score). Compared to traditional pathogen identification methods that rely on a single or limited number of indicators, this method can more comprehensively and accurately assess the likelihood of pathogen presence, improving the accuracy and reliability of pathogen identification.
[0081] In an optional embodiment, determining the weight coefficient based on the first score includes: obtaining a preset first threshold and a preset second threshold; when the first score is greater than or equal to the preset first threshold, determining the weight coefficient according to a first weight strategy; or, when the first score is less than the preset first threshold and greater than or equal to the preset second threshold, determining the weight coefficient according to a second weight strategy; or, when the first score is less than the preset second threshold, determining the weight coefficient according to a third weight strategy.
[0082] Among them, the preset first threshold value can be 0.8, which is not a unique limit here; the preset second threshold value can be 0.3, which is not a unique limit here.
[0083] The first weighting strategy refers to the high likelihood range: Score ≥ 0.8. When the score falls within this range, the pathogen is highly likely to be present. In the random forest method, samples falling within this range can be given a higher weight or prioritized. In the voting mechanism below, the voting results of these samples are multiplied by a weight factor (1.5) greater than 1 to increase their influence on the final result.
[0084] The second weighting strategy refers to the medium probability range: 0.3 ≤ Score < 0.8. Samples within this range indicate a certain likelihood of the pathogen being present, but further information is needed to confirm the presence. In the random forest method, the existing decision tree splitting and voting mechanism is used as usual.
[0085] The third weighting strategy refers to the low probability range: Score < 0.3. Samples falling within this range indicate a low probability of the pathogen being present. In the random forest method, the weights of these samples can be reduced, or in some cases, excluded altogether to reduce unnecessary computation. In the voting mechanism below, the voting results of these samples are multiplied by a weight factor of 0.5, which is less than 1.
[0086] It can be seen that in this embodiment, in the random forest voting mechanism, the sample voting results are multiplied by different weight coefficients (such as multiplying the high possibility range by 1.5 and the low possibility range by 0.5), so as to more accurately interpret the pathogen.
[0087] 105. Perform drug-resistant gene detection on the target pathogen type to determine whether a target drug-resistant gene corresponding to the target pathogen exists.
[0088] In an optional embodiment, the drug-resistant gene detection of the target pathogen type and the determination of whether the target drug-resistant gene corresponding to the target pathogen exists include: obtaining a reference drug-resistant gene-related sequence corresponding to the target pathogen type from the preset pathogen database; calculating the reference drug-resistant gene-related sequence corresponding to the target pathogen type and the target drug-resistant gene-related sequence corresponding to the target pathogen type according to a preset sequence alignment algorithm to obtain target similarity and target coverage; and determining whether the target drug-resistant gene corresponding to the target pathogen exists based on the target similarity and the target coverage.
[0089] In the process of calculating the target similarity and target coverage by calculating the reference resistance gene-related sequence corresponding to the target pathogen type and the target resistance gene-related sequence corresponding to the target pathogen type according to the preset sequence alignment algorithm, the sequence alignment algorithm is used to calculate the similarity between the sequencing read segment and the reference sequence in the resistance gene database, that is, the target similarity (S similarity ) and the ratio of sequencing reads covering the reference sequence of drug-resistant genes, namely target coverage (S coverage ).
[0090] Similarity: Assume that the number of matching bases is M and the total number of aligned bases is T, then the similarity calculation formula is S similarity = 00%.
[0091] Coverage: Let the number of bases covered by the sequencing read segment in the drug resistance gene reference sequence be C coverd The total length of the drug resistance gene reference sequence is L resistance , then the calculation formula for coverage is: S coverage = 00%.
[0092] Among them, in the process of judging whether there is a target resistance gene corresponding to the target pathogen according to the target similarity and the target coverage, the similarity comparison threshold is set to S similarity ≥90%, coverage is compared with the threshold S coverage ≥80%, when both conditions are met, it is determined that the drug-resistant gene exists.
[0093] Therefore, it can be obtained that when the similarity comparison threshold is S similarity ≥90%, coverage is compared with the threshold S coverage When the percentage is ≥80%, the target drug-resistant gene corresponding to the target pathogen exists, and the next process is required to analyze the target drug-resistant gene to obtain drug resistance data.
[0094] As can be seen, this example, by precisely calculating similarity and coverage, combined with severity scores determined by mutation type and location, can accurately determine the presence of drug-resistant genes and assess their potential clinical risks. Compared to existing methods that simply determine the presence of drug-resistant genes, this method can more deeply analyze the characteristics of drug-resistant genes, providing more targeted guidance for clinical treatment.
[0095] 106. If so, analyze the target drug-resistant gene to obtain drug-resistant data.
[0096] In an optional embodiment, if present, the target drug-resistant gene is analyzed to obtain drug-resistant data.
[0097] During the analysis of the target resistance gene to obtain resistance data, the resistance gene sequence is compared with the wild-type resistance gene sequence to determine the mutation site and mutation type (such as single nucleotide polymorphisms, insertion-deletion mutations, etc.). The relationship between mutations and resistance phenotypes recorded in the resistance gene database is used to determine the pathogen's resistance. For example, if a specific mutation is detected in a resistance gene in a particular bacterium, the database records indicate that the bacterium is resistant to a certain class of antibiotics.
[0098] After confirming the presence of drug-resistant genes, the potential risks of these genes to clinical treatment are further evaluated.
[0099] Risk= similarity + 2 S coverage + 3 N mutations + 4 R severity ;
[0100] Among them, Risk is the drug resistance gene risk score, similarity is the similarity, S coverage is the coverage, N mutations is the number of mutations in drug-resistant genes, 4 is the weight coefficient, which is set based on clinical experience and drug-resistant gene database information. severity Severity scores are determined based on mutation type and location. Score based on mutation type is as follows:
[0101] Scoring based on mutation type: Nonsense mutation: 8-10 points. This type of mutation causes premature termination of protein synthesis, often rendering the gene product nonfunctional, significantly impacting gene function and drug resistance. Missense mutation: Occurring in a critical functional domain: 5-7 points. The amino acid substitution may alter the protein's spatial structure and activity, thereby affecting drug resistance. Occurring in a non-critical functional domain: 3-5 points. This mutation has a relatively minor impact on protein function and drug resistance. Synonymous mutation: 0-2 points. Since it does not alter the amino acid sequence, it generally has minimal impact on gene function and drug resistance.
[0102] Mutation location-based scoring: Promoter region mutations: 7-9 points. Promoter regions regulate gene transcription, and mutations can significantly affect gene expression levels, thereby influencing drug resistance. Highly conserved coding region mutations: 6-8 points. Mutations in these regions can disrupt the three-dimensional structure and function of proteins, significantly impacting drug resistance. Non-conserved coding region mutations: 4-6 points. These mutations have some impact on protein function, but may not be as severe as mutations in conserved regions. Key regulatory non-coding region mutations: 5-7 points. These mutations may indirectly affect gene expression and drug resistance by affecting post-transcriptional processing or the binding of regulatory elements to proteins. Non-critical non-coding region mutations: 3-5 points. These mutations have relatively minor impacts on gene function and drug resistance. A high risk score indicates that the resistance gene may have a significant impact on clinical treatment. Physicians should exercise caution when selecting antibiotics and may need to avoid the antibiotic class associated with the resistance gene and instead choose effective alternatives to improve treatment success and reduce the risk of treatment failure.
[0103] It can be seen that in this embodiment, the drug resistance risk assessment can be made more comprehensive and accurate based on the drug resistance data, providing more targeted guidance for clinical treatment.
[0104] 107. Generate a target report based on the target pathogen type, the target drug-resistant gene, and the drug-resistant data.
[0105] The identified pathogen type, drug resistance status, and related analytical data (such as read coverage, depth, and drug-resistance gene sequences) are compiled into a detailed report. This report can be formatted as a text file, HTML page, or a structured data format that can be directly imported into a hospital information system (HIS). This allows clinicians to intuitively review and understand the test results and provide a basis for developing treatment plans.
[0106] As can be seen, this embodiment organizes the identified pathogen types, drug resistance status, and related analytical data into detailed reports in various formats that can be directly imported into hospital information systems. This provides clinicians with an intuitive and convenient way to view the results. Compared with existing technologies that provide unsystematic result output and are difficult for doctors to understand and use, this greatly improves the usability and clinical application value of the results.
[0107] This embodiment improves the accuracy and efficiency of subsequent analysis by removing low-quality data and adapter / primer sequences through preprocessing. Further, the initial sequencing data is compared with the reference genome sequence in a preset pathogen database to accurately identify the type of pathogen in the sample. After the pathogen is identified, it is further tested to see if it carries drug-resistant genes, thereby helping medical professionals understand the pathogen's resistance to certain drugs, thereby adjusting treatment plans and improving treatment efficacy. Detected drug-resistant genes are analyzed to obtain relevant drug resistance data, which helps assess the pathogen's drug resistance risk. The pathogen identification results and drug resistance analysis results are integrated into a single report, providing users with comprehensive and clear information. Therefore, the automated data processing and analysis process reduces the time and errors of manual operations and improves the efficiency of pathogen detection and analysis.
[0108] Based on the description of the above pathogen identification method embodiment, the present application embodiment also discloses a pathogen identification device, such as Figure 2 As shown, the pathogen interpretation device 200 includes:
[0109] The data preprocessing unit 201 is used to perform data preprocessing on the received initial sequencing data to obtain first sequence data;
[0110] A comparison unit 202 is configured to compare the first sequence data with a reference genome sequence in a preset pathogen database to obtain a comparison result;
[0111] A processing unit 203 is configured to obtain a read parameter set of the initial sequencing data according to the alignment result;
[0112] The processing unit 203 is further configured to perform pathogen interpretation processing on the read parameter set to obtain the target pathogen type corresponding to the initial sequencing data;
[0113] The judgment unit 204 is configured to perform drug resistance gene detection on the target pathogen type to determine whether a target drug resistance gene corresponding to the target pathogen exists;
[0114] The processing unit 203 is further configured to analyze the target drug-resistant gene, if present, to obtain drug-resistant data;
[0115] The processing unit 203 is further configured to generate a target report based on the target pathogen type, the target drug-resistant gene, and the drug-resistant data.
[0116] In this embodiment, the automated data processing and analysis process reduces the time and errors of manual operations and improves the efficiency of pathogen detection and analysis.
[0117] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It is understandable that the computer storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer storage medium provides a storage space, which stores the operating system of the electronic device. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.
[0118] In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by a processor to implement the corresponding steps in the above embodiment; in a specific implementation, one or more instructions stored in a computer storage medium may be loaded and executed by a processor. Figure 1 and / or Figure 2 Any steps in the method will not be repeated here.
[0119] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or modules, and can be electrical, mechanical, or other forms.
[0121] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.
[0122] Figure 3 FIG1 shows an internal structure diagram of a computer device in one embodiment. The computer device may be a terminal. Figure 3 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the above-mentioned pathogen identification method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the above-mentioned pathogen identification method. It will be understood by those skilled in the art that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the device to which the solution of the present application is applied. The specific device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0123] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute the steps of the pathogen identification method in any of the above embodiments.
[0124] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the pathogen identification method in any of the above embodiments.
[0125] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic medium such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, an optical medium such as a digital versatile disc (DVD), or a semiconductor medium such as a solid state disk (SSD).
[0126] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying pathogens, characterized in that: include: performing data preprocessing on the received initial sequencing data to obtain first sequence data; Comparing the first sequence data with a reference genome sequence in a preset pathogen database to obtain an alignment result; Obtaining a set of read parameters for the initial sequencing data according to the alignment result; Performing pathogen interpretation processing on the read parameter set to obtain a target pathogen type corresponding to the initial sequencing data; Performing drug-resistant gene detection on the target pathogen type to determine whether a target drug-resistant gene corresponding to the target pathogen exists; If so, the target drug-resistant gene is analyzed to obtain drug-resistant data; Generate a target report based on the target pathogen type, the target drug-resistant gene, and the drug-resistant data; The step of comparing the first sequence data with a reference genome sequence in a preset pathogen database to obtain a comparison result includes: performing short sequence processing on the first sequence data to obtain a plurality of second read segments; Using each second read as a query identifier, aligning the preset pathogen database with the reference genome sequence in the preset pathogen database to obtain a matching score between each second read and the reference genome sequence; Obtaining a read length of each second read segment; Performing interpretation processing on the read length and the matching score of each second read according to a preset interpretation rule to obtain at least one first matching read and at least one second matching read; determining whether the first sequence data is to-be-detected data based on a first number corresponding to the at least one first matching read segment and a second number corresponding to the at least one second matching read segment; When the first sequence data is the data to be detected, detecting whether a first number of the at least one first matching read segment meets a preset condition, and obtaining a comparison result; The step of performing pathogen interpretation processing on the set of read parameters to obtain the target pathogen type corresponding to the initial sequencing data includes: constructing a feature vector based on the read parameter set to obtain a target feature vector; Analyzing the target feature vector according to a preset random forest algorithm to obtain a first pathogen type; Calculating the degree of variation according to the set of read parameters to obtain a target degree of variation; Calculating according to the target variation degree and the set of read parameters to obtain a first score; Determining a weight coefficient according to the first score; Obtaining a second score according to the weight coefficient and the first score; When the second score is greater than a preset score, the first pathogen type is determined to be the target pathogen type corresponding to the initial sequencing data.
2. The method according to claim 1, characterized in that The step of preprocessing the received initial sequencing data to obtain first sequence data includes: Filtering the initial sequencing data according to a preset quality score threshold to obtain a plurality of first read segments having a quality score greater than the preset quality score threshold; Data preprocessing is performed on the plurality of first read segments according to a preset sequence alignment algorithm to obtain first sequence data.
3. The method according to claim 1, characterized in that Before comparing the first sequence data with a reference genome sequence in a preset pathogen database to obtain a comparison result, the method further includes: Obtain reference genome sequences for multiple pathogens; Indexing the reference genome sequences of the plurality of pathogens to obtain a target index structure; Based on the target index structure, a corresponding preset pathogen database is established, wherein the preset pathogen database includes each pathogen, the reference genome sequence corresponding to each pathogen, the drug-resistant gene sequence, the drug-resistant mutation site information and the corresponding drug-resistant phenotype.
4. The method according to claim 1, wherein Obtaining a set of read parameters for the initial sequencing data according to the alignment result includes: If the alignment result is qualified, the plurality of second reads are calculated according to a preset formula set to obtain a set of read parameters for the initial sequencing data.
5. The method according to claim 1, wherein Determining a weight coefficient according to the first score includes: Obtaining a preset first threshold and a preset second threshold; When the first score is greater than or equal to a preset first threshold, determining a weight coefficient according to a first weight strategy; or, When the first score is less than the preset first threshold and greater than or equal to the preset second threshold, determining a weight coefficient according to a second weight strategy; or, When the first score is less than the preset second threshold, a weight coefficient is determined according to a third weight strategy.
6. The method according to claim 1, characterized in that The performing drug resistance gene detection on the target pathogen type to determine whether a target drug resistance gene corresponding to the target pathogen exists includes: Obtaining a reference drug-resistant gene-related sequence corresponding to the target pathogen type in the preset pathogen database; According to a preset sequence alignment algorithm, the reference drug-resistant gene-related sequence corresponding to the target pathogen type and the target drug-resistant gene-related sequence corresponding to the target pathogen type are calculated to obtain target similarity and target coverage; According to the target similarity and the target coverage, it is determined whether a target drug-resistant gene corresponding to the target pathogen exists.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the pathogen identification method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the pathogen identification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Pathogen metagenome analysis method based on nanopore sequencing data
CN116705160A