A metagenomics-based pathogen identification method, device, medium, and product
By employing a metagenomic-based pathogen identification method, combined with alignment and typing databases, and using genome mapping and iterative assembly techniques, the problem of inaccurate pathogen typing in existing technologies has been solved, enabling accurate identification of pathogens and unknown viruses.
Patent Information
- Application Number
- CN202410291254.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-03-14
AI Technical Summary
Existing metagenomic classification software is unable to accurately type pathogens, resulting in insufficient pathogen identification accuracy, especially in the subspecies level of bacterial pathogens and the type identification of viral pathogens.
By obtaining metagenomic sample sequencing sequences, species classification is performed using metagenomic alignment databases. Combined with bacterial and viral typing databases, the coverage and types of bacterial pathogens are determined. Genome mapping coverage depth and coverage are used to identify viral pathogen types, and unknown viruses are identified through iterative assembly methods.
It has achieved accurate typing of pathogens, improved the accuracy of pathogen identification, especially the ability to identify trace pathogens and unknown viruses, reduced false negative results, and improved classification accuracy.
Smart Images

Figure CN118072831B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gene detection technology, and in particular to a method, device, medium and product for pathogen identification based on metagenomics. Background Technology
[0002] Rapid and accurate identification of pathogens is a crucial prerequisite for responding to emerging infectious diseases. Metagenomic methods based on high-throughput sequencing, as an emerging technology, can detect nucleic acid sequences of all species in a sample and analyze pathogen resistance, virulence, molecular typing, and phylogeny. They hold broad application prospects in the detection, monitoring, and tracing of infectious disease pathogens.
[0003] Existing metagenomic classification software only counts the number of species sequences, making it difficult to accurately type pathogens and thus failing to accurately identify them. Summary of the Invention
[0004] The purpose of this invention is to provide a metagenomic pathogen identification method, device, medium, and product that can accurately classify pathogens, thereby improving the accuracy of pathogen identification.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] In a first aspect, the present invention provides a metagenomics-based pathogen identification method, comprising:
[0007] Obtain metagenomic sample sequencing sequences, wherein the metagenomic sample sequencing sequences are a set of sequencing base sequences corresponding to all organisms in the environmental sample;
[0008] The metagenomic sample sequencing sequences are classified according to a metagenomic alignment database to obtain a species classification table, wherein the metagenomic alignment database stores genomic sequences used for metagenomic species classification;
[0009] Based on the species classification table, determine the target pathogen to be identified and the species to which the target pathogen belongs;
[0010] When the target pathogen belongs to a bacterial pathogen, the coverage of the bacterial pathogen is determined based on the bacterial pathogen, the metagenomic alignment database, and the metagenomic sample sequencing sequence.
[0011] The type of housekeeping gene sequence was determined based on the coverage of the bacterial pathogens and the bacterial typing database;
[0012] The type of the bacterial pathogen is determined based on the sequencing sequence of the metagenomic sample and the type of the housekeeping gene sequence;
[0013] When the target pathogen belongs to a viral pathogen, the coverage of the viral pathogen is determined based on the viral pathogen, the metagenomic alignment database, and the metagenomic sample sequencing sequence.
[0014] Based on the coverage of the viral pathogens and the viral typing database, obtain all first genome sequences under the viral pathogen hierarchy;
[0015] Map the metagenomic sample sequencing sequences to each of the first genome sequences, and calculate the first mapping coverage depth and coverage for each of the first genome sequences;
[0016] The type of the viral pathogen is determined based on each of the first mapping coverage depths and the coverage.
[0017] Optionally, the sequencing sequences of the metagenomic samples are classified according to a metagenomic alignment database to obtain a species classification table, specifically including:
[0018] Each of the sequencing base sequences in the metagenomic sample sequencing sequence is compared with the genome sequences in the metagenomic alignment database to obtain a first alignment result;
[0019] Based on the first alignment result, the species types involved in the metagenomic sample sequencing sequence are determined, and the species types are sorted according to the taxonomic hierarchy to obtain the first classification result;
[0020] Based on the number of sequencing base sequences that specifically match each species type, the first classification results are sorted in descending order, and the sequencing base sequences of species type host are removed to obtain the second classification results;
[0021] The species classification table is generated based on the preset number of species types ranked first in the second classification results.
[0022] Optionally, the process of determining the coverage status specifically includes:
[0023] The second genome sequence is obtained from the metagenomic alignment database according to the species to which the target pathogen belongs;
[0024] The metagenomic sample sequencing sequence is mapped onto the second genome sequence, and the number of sequencing bases mapped to each base site on the second genome sequence is calculated;
[0025] The second mapping coverage depth is determined based on the number of sequenced bases mapped to all the base sites on the second genome sequence;
[0026] The coverage of the target pathogen is determined based on the second mapping coverage depth.
[0027] Optionally, the bacterial pathogen type is determined based on the metagenomic sample sequencing sequence and the housekeeping gene sequence, specifically including:
[0028] Based on the bacterial pathogens, obtain the corresponding housekeeping gene sequences from the bacterial typing database;
[0029] The metagenomic sample sequencing sequence is mapped onto the housekeeping gene sequence, and all the sequencing base sequences mapped onto the housekeeping gene sequence are assembled to obtain the assembled sequencing sequence.
[0030] The assembled sequencing sequence is compared with the housekeeping gene sequence to determine the allele number of each housekeeping gene in the housekeeping gene sequence;
[0031] Generate a one-dimensional vector based on all the allele numbers;
[0032] Based on the one-dimensional vector, the type of the bacterial pathogen is retrieved from the bacterial typing file.
[0033] Optionally, the pathogen identification method further includes:
[0034] Identifying the pathogenic characteristics of the target pathogen specifically includes:
[0035] The coverage of the target pathogen's species is determined based on the species to which the target pathogen belongs, the metagenomic alignment database, and the sequencing sequence of the metagenomic sample.
[0036] Based on the coverage of the target pathogen species and the database of drug resistance genes and virulence factors, the corresponding drug resistance gene sequences and virulence gene sequences are obtained to obtain the pathogenic characteristic reference comparison sequence;
[0037] The pathogenic feature assembled sequencing sequence is compared with the pathogenic feature reference alignment sequence to obtain the alignment result, and the pathogenic feature of the target pathogen is determined based on the alignment result.
[0038] Optionally, the pathogen identification method further includes:
[0039] Species whose number of sequenced bases in the species classification table is less than the first threshold are identified as species for secondary alignment.
[0040] The sequence number of the sequencing base sequence corresponding to the species in the secondary alignment is determined in the alignment file, wherein the alignment file includes the alignment result of each sequencing base sequence with the genome sequence used for metagenomic species classification;
[0041] According to the sequence number, the corresponding sequencing base sequence is obtained from the original sequencing file to obtain the sequencing base sequence to be processed. The original sequencing file includes the sequencing base sequences of all organisms in the environmental sample.
[0042] Use the genome sequences corresponding to the species in the secondary alignment database as reference sequences;
[0043] The sequence of bases to be processed is compared with the reference sequence to obtain the comparison result;
[0044] The species classification table is updated based on the comparison results.
[0045] Optionally, the pathogen identification method further includes:
[0046] Viruses with a species similarity metric below the second threshold are classified as unknown viruses;
[0047] The virus with the highest species similarity to the unknown virus is considered a closely related species.
[0048] The genome sequence of the closely related species was used as the second alignment reference sequence;
[0049] The metagenomic sample sequencing sequence is mapped onto the second alignment reference sequence, and all the sequencing base sequences mapped onto the second alignment reference sequence are assembled to obtain the assembled reference sequence.
[0050] Calculate a first similarity measure between the metagenomic sample sequencing sequence and the assembled reference sequence;
[0051] Determine whether the first similarity measure is greater than the third threshold;
[0052] If the first similarity metric is greater than the third threshold, the unknown virus is identified based on the assembled reference sequence;
[0053] If the first similarity metric is less than the third threshold, the assembled reference sequence is used as the new second alignment reference sequence, and the process returns to the step "Mapping the metagenomic sample sequencing sequence onto the second alignment reference sequence, and assembling all the sequencing base sequences mapped onto the second alignment reference sequence to obtain the assembled reference sequence".
[0054] In a second aspect, the present invention provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the metagenomic pathogen identification method described in any of the preceding claims.
[0055] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the metagenomic pathogen identification method described in any of the preceding claims.
[0056] Fourthly, the present invention provides a computer program product, comprising a computer program, characterized in that, when executed by a processor, the computer program implements the steps of a metagenomic pathogen identification method as described in any of the preceding claims.
[0057] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0058] This invention provides a metagenomics-based pathogen identification method, device, medium, and product. It first classifies metagenomic sample sequencing sequences, then identifies the target pathogen based on the classification results. When the target pathogen belongs to a bacterial species, the coverage of bacterial pathogens is first determined based on the metagenomic sample sequencing sequences and a metagenomic alignment database. Then, based on this coverage and a bacterial typing database, the housekeeping gene sequence type is determined, and thus the bacterial pathogen type is determined. When the target pathogen belongs to a viral species, the coverage of viral pathogens is first determined based on the metagenomic sample sequencing sequences and a metagenomic alignment database. Then, based on this coverage and a viral typing database, all first genome sequences are obtained, and thus the viral pathogen type is determined. This invention overcomes the shortcomings of traditional metagenomic classification methods, which only count the number of reads when identifying species in sequenced simulated samples, resulting in poor classification accuracy. Furthermore, for simulated samples of different concentrations, only species classification is possible, not specific type determination. This invention enables accurate pathogen typing and improves pathogen identification accuracy. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 This is a schematic diagram of the pathogen identification method based on metagenomics provided in Embodiment 1 of the present invention;
[0061] Figure 2 This is a schematic diagram of the process for identifying unknown viruses in Example 1;
[0062] Figure 3This is a schematic diagram of the structure of the metagenomic pathogen identification system provided in Embodiment 2 of the present invention;
[0063] Figure 4 This is an internal structural diagram of a computer device provided in Embodiment 6 of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] The purpose of this invention is to provide a metagenomic pathogen identification method, device, medium, and product that can accurately classify pathogens, thereby improving the accuracy of pathogen identification.
[0066] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0067] Example 1
[0068] While existing metagenomic classification tools offer faster analysis results, they can only be compared at the family or genus level, which can easily lead to mismatches of sequencing data at the species level and misidentification of pathogens. Furthermore, current metagenomic classification software only counts the number of sequences per species, making it difficult to directly identify pathogens or perform accurate pathogen typing.
[0069] In order to overcome this technical deficiency, see [reference needed]. Figure 1 This embodiment 1 provides a metagenomic pathogen identification method, including:
[0070] S1: Obtain the metagenomic sample sequencing sequence, wherein the metagenomic sample sequencing sequence is a set of sequencing base sequences corresponding to all organisms in the environmental sample.
[0071] S2: Classify the sequencing sequences of the metagenomic samples according to the metagenomic alignment database to obtain a species classification table, wherein the metagenomic alignment database stores genomic sequences used for metagenomic species classification.
[0072] The process of obtaining the species classification table specifically includes:
[0073] S21: Align each of the sequencing base sequences in the metagenomic sample with the genome sequences in the metagenomic alignment database to obtain a first alignment result.
[0074] S22: Determine the species types involved in the metagenomic sample sequencing sequence based on the first alignment result, and sort the species types according to the taxonomic hierarchy to obtain the first classification result.
[0075] S23: Based on the number of sequencing base sequences that specifically match each species type, sort the first classification results in descending order, and remove the sequencing base sequences that belong to the host species type to obtain the second classification results.
[0076] S24: Based on the preset number of species types ranked first in the second classification results, generate the species classification table to obtain the composition of dominant microorganisms in the sample data.
[0077] In this embodiment, metagenomic classification is achieved by performing the above classification process using Centrifuge software.
[0078] This embodiment performs structural organization on the data retrieved and output from Centrifuge, removes host sequence information such as human genomes and artificially synthesized sequences, sorts the results, and outputs the top 10 microorganisms matching the most specific reads. The specific steps are as follows:
[0079] Step 1: Deploy Centrifuge software (version 1.0.4) and a metagenomic alignment database on the server. The metagenomic alignment database stores genomic information used for metagenomic species classification, and its function is to compare it with metagenomic sequencing data during the metagenomic classification process. The p+h+v database included with the software is used during the metagenomic classification test.
[0080] Step 2: Determine the path of the metagenomic sequencing data to be analyzed and set the classification parameters, including: minimum hit length (default is 30), number of calling threads (default is 2), classification level (default is species), whether to remove background (default is Y), and number of top species (default is the top 10).
[0081] Step 3: Program execution. During program execution, various parameters are first read, including file path, output file, minimum hit length, and number of threads, to generate a command-line string based on Centrifuge. The command-line string is then passed to the system using Python's os.system() module. After the system executes the command string, it outputs the Centrifuge species classification table. The pandas package in Python is then used to read the species classification table, filtering according to the classification hierarchy set in Step 2. The sort_values function of the pandas package is used to sort the number of specific matching reads, and human (taxID=9606) and artificially synthesized sequences (taxID=32630) are filtered out based on taxID. All records and the Top 10 records are then used to generate new species classification tables.
[0082] Step 4: Output and visualization of results. Use Python's matplotlib package to create a pie chart of the Top 10 species classification table and output the classification table and chart to a local folder.
[0083] S3: Based on the species classification table, determine the target pathogen to be identified and the species to which the target pathogen belongs.
[0084] Because the species classification results of bacterial pathogens and viral pathogens differ, the classification accuracy of bacterial pathogens at the subspecies level below the species classification level is low, making typing impossible; while the classification results of viral pathogens at the subspecies level will match multiple types, making direct identification difficult. Therefore, different strategies need to be adopted for pathogen typing of bacterial and viral pathogens:
[0085] S4: When the target pathogen belongs to a bacterial pathogen, the coverage of the bacterial pathogen is determined based on the bacterial pathogen, the metagenomic alignment database, and the metagenomic sample sequencing sequence.
[0086] S5: Determine the type of housekeeping gene sequence based on the coverage of the bacterial pathogens and the bacterial typing database.
[0087] S6: Determine the type of the bacterial pathogen based on the sequencing sequence of the metagenomic sample and the type of the housekeeping gene sequence.
[0088] S6 specifically includes:
[0089] S61: Determine the type of housekeeping gene sequence based on the coverage of the bacterial pathogens and the bacterial typing database, and obtain the corresponding housekeeping gene sequence.
[0090] S62: Map the metagenomic sample sequencing sequence onto the housekeeping gene sequence, and assemble all the sequencing base sequences mapped onto the housekeeping gene sequence to obtain the assembled sequencing sequence.
[0091] S63: Compare the assembled sequencing sequence with the housekeeping gene sequence to determine the allele number of each housekeeping gene in the housekeeping gene sequence.
[0092] S64: Generate a one-dimensional vector based on all the allele numbers.
[0093] S65: Based on the one-dimensional vector, retrieve the type of the bacterial pathogen in the bacterial typing file.
[0094] S7: When the species to which the target pathogen belongs is a viral pathogen, the coverage of the viral pathogen is determined based on the viral pathogen, the metagenomic alignment database, and the sequencing sequence of the metagenomic sample.
[0095] S8: Obtain all first genome sequences under the viral pathogen level based on the coverage of the viral pathogens and the viral typing database.
[0096] S9: Map the metagenomic sample sequencing sequence to each of the first genome sequences, and calculate the first mapping coverage depth and coverage corresponding to each of the first genome sequences.
[0097] S10: Determine the type of the viral pathogen based on each of the first mapping coverage depths and the coverage.
[0098] To make the typing process of the target pathogen in this embodiment clearer to those skilled in the art, the following detailed explanation is provided.
[0099] Since the metagenomic classification process requires analyzing the species coverage of the target pathogen based on the classification results, the determination of the coverage specifically includes:
[0100] 1) Obtain the second genome sequence from the metagenomic alignment database according to the species to which the target pathogen belongs.
[0101] Based on the taxID of the target pathogen, a search is performed in the metagenomic alignment database, and the genome sequence of the species to which the target pathogen belongs is extracted from the database as the alignment reference sequence.
[0102] 2) Map the metagenomic sample sequencing sequence onto the second genome sequence, and calculate the number of sequencing bases mapped to each base site on the second genome sequence.
[0103] The BWAindex module was used to build an alignment index against the reference sequence. This index was then used for alignment mapping between the index and the metagenomic sample sequencing sequences. Subsequently, BWA and Samtools software were used to map the metagenomic sample sequencing sequences onto the genome of the alignment reference sequence. The number of sequencing reads mapped to each base site on the alignment reference sequence was calculated; the number of reads mapped to each base site represents the mapping coverage depth for that base site.
[0104] Further calculation of the mapping coverage depth for each base across the entire genome yields the mapping coverage depth based on the reference genome, i.e.:
[0105] 3) Determine the second mapping coverage depth based on the number of sequenced bases mapped to all the base sites on the second genome sequence.
[0106] 4) Determine the coverage status of the species to which the target pathogen belongs based on the second mapping coverage depth.
[0107] Genome coverage generated based on genome mapping depth can visually demonstrate the coverage of sequencing results for a species.
[0108] In the process of bacterial pathogen typing, the PubMLST database on the server is selected, and the steps are as follows:
[0109] (1) Determine the type of housekeeping gene sequence based on the coverage of the target pathogen species and the bacterial typing database (i.e., the PubMLST database), and extract the corresponding housekeeping gene sequence from the PubMLST database;
[0110] (2) Map the metagenomic sample sequencing sequence onto the housekeeping gene sequence, and extract the reads on the housekeeping gene mapping using the view function of Samtools;
[0111] (3) Call MEGAHIT to assemble the mapped reads. The purpose of assembly is to use the assembled sequence for alignment. Use BLAST to align the assembled sequence with the housekeeping gene and determine the allele number of each housekeeping gene.
[0112] (4) Generate a one-dimensional vector from the allele sequence results and search it in the bacterial typing file (MLSTprofiles) to obtain bacterial typing information.
[0113] Viral pathogen typing employs a genome mapping coverage method, with the following steps:
[0114] (1) Based on the coverage of the species to which the target pathogen belongs, extract all genome sequences at the species level from the virus typing database and use them as sequencing reference sequences to be confirmed.
[0115] (2) Use BWA and Samtools to map the metagenomic sample sequencing sequences to the reference sequences to be confirmed, and calculate the coverage and coverage depth of each reference sequence to be confirmed;
[0116] (3) Output the coverage map and determine the type based on the coverage and coverage depth.
[0117] As an optional implementation, the pathogen identification method of this embodiment further includes:
[0118] S11: Identify the pathogenic characteristics of the target pathogen.
[0119] For pathogenic characteristics such as drug resistance genes and virulence factors in metagenomic sequencing data, the same method as bacterial pathogen typing is used to map the metagenomic sequencing data to a database of drug resistance genes and virulence factors. After extracting the mapped sequences, they are determined through sequence assembly and BLAST alignment. This process specifically includes:
[0120] After determining the coverage of the species to which the target pathogen belongs,
[0121] S11-1: Based on the coverage of the target pathogen's species, obtain the corresponding drug resistance gene sequences and virulence gene sequences from the drug resistance gene and virulence factor database to obtain the pathogenic characteristic reference comparison sequence.
[0122] S11-2: Map the metagenomic sample sequencing sequence to the pathogenic feature reference alignment sequence, and assemble all the sequencing base sequences mapped on the pathogenic feature reference alignment sequence to obtain the pathogenic feature assembled sequencing sequence.
[0123] S11-3: The pathogenic feature assembled sequencing sequence is compared with the pathogenic feature reference alignment sequence to obtain the alignment result, and the pathogenic feature of the target pathogen is determined based on the alignment result.
[0124] The pathogen typing and pathogenic characteristic identification processes described in this embodiment solve the problems of difficulty in typing and analyzing pathogenic characteristics in current metagenomic pathogen identification methods. It enables genome coverage analysis of pathogenic microorganisms and provides pathogenic information such as typing, drug resistance, and virulence. Traditional metagenomic classification software can identify species and count reads in sequenced simulated samples, but its classification accuracy is poor; it can only classify simulated samples of different concentrations to the species level, not to the specific type. In contrast, the process described in this embodiment can not only classify species but also accurately type pathogens.
[0125] Unlike respiratory and intestinal samples, blood, cerebrospinal fluid, and urine samples typically contain fewer pathogens. Existing metagenomic classification software is less accurate than BLAST, making it difficult to effectively identify pathogen sequences when the classification and alignment threshold is high, and often detecting a small number of other pathogen sequences when the alignment threshold is low. After sequence extraction, these are usually judged as false negatives, thus reducing the accuracy of identification.
[0126] Based on this, as an optional implementation method, the pathogen identification method provided in this embodiment further includes:
[0127] S12: Identification of trace pathogens, specifically including:
[0128] S12-1: Species types with fewer than the first threshold number of sequenced bases in the species classification table are identified as species for secondary alignment.
[0129] Set a cutoff value for the number of reads in the species classification table, retain species with a cutoff value below the cutoff value, and thus determine the species for subsequent secondary comparisons.
[0130] S12-2: Determine the sequence number of the sequencing base sequence corresponding to the species in the secondary alignment file, wherein the alignment file includes the alignment results of each sequencing base sequence with the genome sequence used for metagenomic species classification.
[0131] Search for species in the secondary alignment based on the alignment files generated during metagenomic classification, and extract sequences from the original sequencing files according to the sequence numbers.
[0132] S12-3: Obtain the corresponding sequencing base sequence from the original sequencing file according to the sequence number to obtain the sequencing base sequence to be processed, wherein the original sequencing file includes the sequencing base sequences of all organisms in the environmental sample.
[0133] S12-4: Use the genome sequence corresponding to the species in the secondary alignment database as the reference sequence.
[0134] S12-5: Align the sequence of bases to be processed with the reference sequence to obtain the alignment result.
[0135] Determine reference sequences for precise alignment: Extract species sequences requiring secondary alignment from the original classification table in the metagenomic alignment database as references; index the references, obtain the corresponding sequencing base sequences from the original sequencing files, and perform BLAST alignment with the references; extract the BLAST alignment results and update the species classification table.
[0136] S12-6: Update the species classification table based on the comparison results.
[0137] This embodiment uses the above-described steps to extract and reclassify erroneous sequences in metagenomic classification, reducing misjudgments caused by erroneous information. Blood cell-free DNA samples have a pure background and typically do not contain complex microbial communities. After identifying blood cell-free DNA test samples using traditional metagenomic classification methods, the results still contain a small number of other bacterial sequences besides pathogenic pathogens. Through the above-described operations, precise comparisons are performed, and the few pathogenic sequences are re-compared and identified, eliminating false positives. Compared to the original species classification table, the updated classification table reduces redundant sequences, retains trace pathogens, and improves the accuracy of identification.
[0138] Current metagenomic assembly software is mostly based on the de Bruijn graph algorithm and the Burrows-Wheeler transform (BWT) algorithm. The former often generates a large number of contigs, making it difficult to obtain a complete genome and affecting the accuracy of pathogen identification. The latter requires the determination of a reference sequence first, which is difficult to handle unknown pathogens, and its efficiency decreases as the length of the reference sequence increases. In addition, for unknown viruses, current methods use de novo assembly to obtain the genome, but the large amount of metagenomic data and the high abundance of background sequences such as host sequences make de novo assembly difficult.
[0139] In this regard, as another optional implementation, the pathogen identification method provided in this embodiment further includes: S13: identification of unknown viruses, specifically including:
[0140] S13-1: Viruses with a species similarity metric less than the second threshold are classified as unknown viruses.
[0141] S13-2: The virus with the highest species similarity to the unknown virus is identified as a closely related species.
[0142] S13-3: Use the genome sequence of the closely related species as the second alignment reference sequence.
[0143] S13-4: Map the metagenomic sample sequencing sequence onto the second alignment reference sequence, and assemble all the sequencing base sequences mapped onto the second alignment reference sequence to obtain the assembled reference sequence.
[0144] S13-5: Calculate the first similarity measure between the metagenomic sample sequencing sequence and the assembled reference sequence.
[0145] S13-6: Determine whether the first similarity measure is greater than the third threshold.
[0146] S13-7: If the first similarity measure is greater than the third threshold, the unknown virus is identified based on the assembled reference sequence.
[0147] S13-8: If the first similarity metric is less than the third threshold, then the assembled reference sequence is used as the new second alignment reference sequence, and the process returns to step S13-4.
[0148] To make the identification process of unknown viruses in this embodiment clearer to those skilled in the art, it will be described in detail below.
[0149] If a species with a low species similarity metric is found, it suggests the possibility of an unknown virus. In this case, an iterative assembly method is used to obtain the whole genome. Closely related species are used as reference sequences for sequence alignment. After alignment, the aligned sequences are extracted, and the similarity metric S is calculated. Because the extracted microbial sequences do not contain the host sequence, the data volume is reduced compared to the original data. Then, a de novo assembly method is used to assemble the extracted sequences, and the assembled genome is used as a new reference sequence for alignment with the original data. Subsequent processes iterate through the "alignment-sequence extraction-de novo assembly-similarity metric calculation" process, setting a similarity metric threshold S. n In the k-th iteration S k >S n The iteration terminates at a certain point, achieving the goal of iteratively assembling the complete genome of an unknown virus from the sample. The specific process is as follows: Figure 2 As shown, it includes:
[0150] Step 1, Reference Sequence Alignment: Build an index based on the reference sequence and use BWA's alignment function (bwamem) to align the reference sequence with the metagenomic sample sequencing sequence, calculating S0; use Samtools' view function to extract the alignment results aligned to ref.fasta and generate a BAM format file; call Samtools' sort function to reorder the BAM format alignment results; call Samtools' index function to build an index on the reordered alignment results.
[0151] Step 2, Sequence Extraction and Assembly: Call the bamtofastq function of bedtools to convert the reordered alignment results into fastq format sequences; call MEGAHIT to assemble the sequences from scratch; use the makeblastdb module of BLAST to create an index for final.contigs.fa, and use the blastn module to perform homology alignment on ref.fasta according to the set parameters.
[0152] Step 3, Similarity Measurement Calculation and Iterative Assembly: Homology is evaluated using a similarity measurement model, and the homology alignment result S is calculated. k Set the iteration termination cutoff value S. n Set it to 99% and iterate; create a folder tmp_k (for the k-th iteration), copy the MEGAHIT output file final.contigs.fa from the (k-1)-th iteration to tmp_k, and rename final.contigs.fa to ref_k-1.fasta. Using ref_k-1.fasta and the sequencing end-to-end download files A_1.fq.gz and A_2.fq.gz as input files, perform the alignment, sequence extraction, and assembly steps in Step 1 and Step 2 to obtain ref_k.fasta and the homology alignment results S between ref_k.fasta and ref_k-1.fasta. k And write it to the S.txt document; iterate to S k >=S n When the iteration stops, the iteration stops.
[0153] Traditional methods for identifying unknown viruses involve de novo assembly and comparison, which are resource-intensive. This embodiment, targeting potentially emerging pathogens, uses closely related species as templates and iteratively improves the assembly efficiency. Compared to traditional de novo assembly methods, this iterative assembly method is more time-efficient.
[0154] This embodiment first performs metagenomic classification, then filters out host sequence information and visualizes the dominant microorganisms. Next, species characteristic analysis is performed for accurate genotyping, and resistance genes and virulence factors are annotated to assess the pathogenic characteristics of the samples. For specific sample types, sequences are automatically extracted after species classification, followed by precise alignment to accurately determine the species origin. An iterative workflow of "alignment-sequence extraction-de novo assembly-similarity measurement calculation" is used to achieve the goal of iteratively assembling the complete genome of unknown viruses from samples.
[0155] Example 2
[0156] This embodiment also provides a metagenomics-based pathogen identification system for executing the pathogen identification method of Embodiment 1. See also... Figure 3The pathogen identification system uses computing units on the server side to perform data analysis and displays the analysis results and allows data download in the visualization unit. Deployed on the EIHealth cloud platform, the system can also be deployed locally using Docker images. It features both online and local identification of pathogens and pathogenic factors. Its main purpose is to address current problems in metagenomic analysis, such as sequence misclassification, difficulty in accurately typing pathogens, and inability to handle unknown pathogens. The software, developed in Python, includes four modules: metagenomic classification, pathogen characterization (including pathogen typing and pathogenicity feature identification), trace pathogen identification, and iterative assembly of unknown viruses (i.e., unknown virus identification).
[0157] The pathogen identification system in this embodiment can achieve the following software functions:
[0158] (1) Metagenomic classification
[0159] The iPathogen workflow takes paired-end next-generation high-throughput sequencing data as input, first performs metagenomic classification based on Centrifuge software, then filters out host sequence information and visualizes the dominant microorganisms.
[0160] (2) Pathogen Characterization
[0161] After pathogen classification, species characterization is performed to extract microbial species information and compare it with species characterization databases deployed in the cloud, including the MLST and 16S databases for bacteria and the ITS database for fungi, to achieve accurate typing. Then, the data is compared with the CARD and VFDB databases to identify drug resistance genes and virulence factors in the samples, so as to assess the pathogen characteristics of the samples and provide a reference for clinical treatment.
[0162] (3) Trace pathogen identification
[0163] Unlike respiratory and intestinal samples, blood, cerebrospinal fluid, and urine samples typically contain fewer pathogens. Metagenomic classification software, with its lower accuracy than BLAST, struggles to effectively identify pathogen sequences when the classification and alignment threshold is high, and often detects small amounts of other pathogen sequences when the threshold is low, resulting in false negatives after sequence extraction. Under these circumstances, iPathogen offers trace pathogen identification capabilities. Its workflow involves automatically extracting sequences after species classification for specific sample types, followed by BLAST alignment to accurately determine the species origin.
[0164] (4) Iterative assembly of unknown viruses
[0165] The viral iterative assembly module uses closely related species as reference sequences for sequence alignment after identifying the viral sequence. Following alignment, the aligned sequences are extracted, and a similarity metric S is calculated. Since the extracted microbial sequences do not contain the host sequence, the data volume is reduced compared to the original data. Then, a de novo assembly method is used to assemble the extracted sequences, and the assembled genome is used as a new reference sequence for alignment with the original data. Subsequent processes iterate using the "alignment-sequence extraction-de novo assembly-similarity metric calculation" workflow, setting a similarity metric threshold S. n In the k-th iteration S k >S n The iteration terminates at a certain point, achieving the goal of iteratively assembling the complete genome of an unknown virus from the sample.
[0166] 1) Software Implementation
[0167] (1) Development Environment
[0168] high-performance servers
[0169] Server Model: Dell PowerEdge T430
[0170] CPU Model: Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz
[0171] Number of CPUs: 2
[0172] Number of CPU cores per CPU: 10
[0173] Memory size: 128Gb
[0174] Server operating system: Ubuntu 14.04.6LTS
[0175] Software tools
[0176] Programming software: Python 2.7.17
[0177] Local alignment tool: BLAST 2.2.28+
[0178] Sequence de novo assembly software: MEGAHIT
[0179] Genome mapping software: BWA 0.7.5a-r405
[0180] High-throughput sequencing data processing tool: Samtools 1.3.1
[0181] Genome processing toolset: bedtools 2.29.2
[0182] Sequence generation tool: wgsim 0.3.2
[0183] Python packages: pandas, wxpython, ConfigParser, logging, matplotlib
[0184] Running framework: Docker 4.25.1
[0185] Test data
[0186] Metagenomic sample testing data: Sequencing data of SARI samples that meet the criteria for identifying Severe Acute Respiratory Infection (SARI) in the "Beijing Municipal Surveillance Program for Hospitalized Severe Acute Respiratory Infection Cases (2016 Edition)".
[0187] Unknown Pathogen Simulation Data: Experiments were conducted using simulated metagenomic data. A specific coronavirus was used as the unknown pathogen to be detected, and the human genome was used as the host background sequence in the metagenomic dataset. 100bp paired-end FastQ files were generated using wgsim software as the simulation data. The selected reference genome was Wuhan-Hu-1 (Genbank sequence number: NC_045512.2), and the human genome selected was GRCh38.p13 (Genbank sequence number: GCF_000001405.39). The NCBI RefSeq database from April 2018, which did not contain sequences for this coronavirus, was used to validate the coronavirus as an unknown pathogen.
[0188] (2) Operating environment
[0189] running online
[0190] Online URL: http: / / ipathogen.com / login
[0191] Test username: pumc-research; Test password: pumc-research
[0192] Local server running
[0193] CPU Model: Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz and above Number of CPUs: 2 or more
[0194] Number of CPU cores per CPU: 10 or more
[0195] Memory size: 128GB or more
[0196] Server operating system: Ubuntu 14.04.6LTS and above
[0197] Running framework: Docker 4.25.1
[0198] The pathogen identification system in this embodiment integrates metagenomic pathogen identification and analysis. Addressing the issue that existing metagenomic pathogen identification software requires the application of numerous bioinformatics analysis tools, this embodiment establishes a process for directly classifying pathogens, annotating species, identifying trace pathogens, and identifying unknown viruses from metagenomic data. All operations are performed with a single click through a visual interface, improving the operability and demonstrability of pathogen identification.
[0199] Example 3
[0200] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the steps of the metagenomic pathogen identification method of Embodiment 1.
[0201] Example 4
[0202] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the metagenomic pathogen identification method of Embodiment 1.
[0203] Example 5
[0204] A computer program product includes a computer program that, when executed by a processor, implements the steps of the metagenomic pathogen identification method of Embodiment 1.
[0205] Example 6
[0206] A computer device, which may be a database, may have an internal structure diagram as shown below. Figure 4 As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores pending transactions. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the metagenomic pathogen identification method described in Example 1.
[0207] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0208] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided by this invention may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided by this invention may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0209] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0210] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method of pathogen identification based on metagenome, characterized in that, The pathogen identification method includes: Obtain metagenomic sample sequencing sequences, wherein the metagenomic sample sequencing sequences are a set of sequencing base sequences corresponding to all organisms in the environmental sample; The metagenomic sample sequencing sequences are classified according to a metagenomic alignment database to obtain a species classification table, wherein the metagenomic alignment database stores genomic sequences used for metagenomic species classification; Based on the species classification table, determine the target pathogen and the species to which the target pathogen belongs; When the target pathogen belongs to a bacterial pathogen, the coverage of the bacterial pathogen is determined based on the bacterial pathogen, the metagenomic alignment database, and the metagenomic sample sequencing sequence. The type of housekeeping gene sequence was determined based on the coverage of the bacterial pathogens and the bacterial typing database; The type of the bacterial pathogen is determined based on the sequencing sequence of the metagenomic sample and the type of the housekeeping gene sequence; When the target pathogen belongs to a viral pathogen, the coverage of the viral pathogen is determined based on the viral pathogen, the metagenomic alignment database, and the metagenomic sample sequencing sequence. Based on the coverage of the viral pathogens and the viral typing database, obtain all first genome sequences under the viral pathogen hierarchy; Map the metagenomic sample sequencing sequences to each of the first genome sequences, and calculate the first mapping coverage depth and coverage for each of the first genome sequences; The type of the viral pathogen is determined based on each of the first mapping coverage depths and the coverage. The process of determining the coverage status specifically includes: The second genome sequence is obtained from the metagenomic alignment database according to the species to which the target pathogen belongs; The metagenomic sample sequencing sequence is mapped onto the second genome sequence, and the number of sequencing bases mapped to each base site on the second genome sequence is calculated; The second mapping coverage depth is determined based on the number of sequenced bases mapped to all the base sites on the second genome sequence; The coverage of the target pathogen species is determined based on the second mapping coverage depth.
2. The metagenomic-based pathogen identification method according to claim 1, characterized in that, The metagenomic samples were classified according to the metagenomic alignment database to obtain a species classification table, which specifically includes: Each of the sequencing base sequences in the metagenomic sample sequencing sequence is compared with the genome sequences in the metagenomic alignment database to obtain a first alignment result; Based on the first alignment result, the species types involved in the metagenomic sample sequencing sequence are determined, and the species types are sorted according to the taxonomic hierarchy to obtain the first classification result; Based on the number of sequencing base sequences that specifically match each species type, the first classification results are sorted in descending order, and sequencing base sequences that match the species type of the host are removed to obtain the second classification results. The species classification table is generated based on the preset number of species types ranked first in the second classification results.
3. The metagenomic-based pathogen identification method according to claim 1, characterized in that, The bacterial pathogen type is determined based on the metagenomic sample sequencing sequence and the housekeeping gene sequence, specifically including: Based on the coverage of the bacterial pathogens and the bacterial typing database, the type of the housekeeping gene sequence is determined, and the corresponding housekeeping gene sequence is obtained. The metagenomic sample sequencing sequence is mapped onto the housekeeping gene sequence, and all the sequencing base sequences mapped onto the housekeeping gene sequence are assembled to obtain the assembled sequencing sequence. The assembled sequencing sequence is compared with the housekeeping gene sequence to determine the allele number of each housekeeping gene in the housekeeping gene sequence; Generate a one-dimensional vector based on all the allele numbers; Based on the one-dimensional vector, the type of the bacterial pathogen is retrieved from the bacterial typing file.
4. The metagenomic-based pathogen identification method according to claim 1, characterized in that, The pathogen identification method also includes: Identifying the pathogenic characteristics of the target pathogen specifically includes: The coverage of the target pathogen's species is determined based on the species to which the target pathogen belongs, the metagenomic alignment database, and the sequencing sequence of the metagenomic sample. Based on the coverage of the target pathogen species and the database of drug resistance genes and virulence factors, the corresponding drug resistance gene sequences and virulence gene sequences are obtained to obtain the pathogenic characteristic reference comparison sequence; The metagenomic sample sequencing sequence is mapped onto the pathogenic feature reference alignment sequence, and all the sequencing base sequences mapped onto the pathogenic feature reference alignment sequence are assembled to obtain the pathogenic feature assembled sequencing sequence. The pathogenic feature assembled sequencing sequence is compared with the pathogenic feature reference alignment sequence to obtain the alignment result, and the pathogenic feature of the target pathogen is determined based on the alignment result.
5. The metagenomic-based pathogen identification method according to claim 2, characterized in that, The pathogen identification method also includes: Species whose number of sequenced bases in the species classification table is less than the first threshold are identified as species for secondary alignment. The sequence number of the sequencing base sequence corresponding to the species in the secondary alignment is determined in the alignment file, wherein the alignment file includes the alignment result of each sequencing base sequence with the genome sequence used for metagenomic species classification; According to the sequence number, the corresponding sequencing base sequence is obtained from the original sequencing file to obtain the sequencing base sequence to be processed. The original sequencing file includes the sequencing base sequences of all organisms in the environmental sample. Use the genome sequences corresponding to the species in the secondary alignment database as reference sequences; The sequence to be processed is compared with the reference sequence to obtain the comparison result; the species classification table is updated based on the comparison result.
6. The metagenomic-based pathogen identification method according to claim 1, characterized in that, The pathogen identification method also includes: Viruses with a species similarity metric below the second threshold are classified as unknown viruses; The virus with the highest species similarity to the unknown virus is considered a closely related species. The genome sequence of the closely related species was used as the second alignment reference sequence; The metagenomic sample sequencing sequence is mapped onto the second alignment reference sequence, and all the sequencing base sequences mapped onto the second alignment reference sequence are assembled to obtain the assembled reference sequence. Calculate a first similarity measure between the metagenomic sample sequencing sequence and the assembled reference sequence; Determine whether the first similarity measure is greater than the third threshold; If the first similarity metric is greater than the third threshold, the unknown virus is identified based on the assembled reference sequence; If the first similarity metric is less than the third threshold, the assembled reference sequence is used as the new second alignment reference sequence, and the process returns to the step "Map the metagenomic sample sequencing sequence onto the second alignment reference sequence, and assemble all the sequencing base sequences mapped onto the second alignment reference sequence to obtain the assembled reference sequence".
7. A computer device, comprising: The memory and processor contain a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the metagenomic pathogen identification method according to any one of claims 1-6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of a metagenomic pathogen identification method according to any one of claims 1-6.
9. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of a metagenomic pathogen identification method according to any one of claims 1-6.
Citation Information
Patent Citations
Metagenome extraction method for removing host genomic DNA based on CRISPR-Cas
CN110205318A
Primer composition for detection of pathogenic microorganisms in lower respiratory tract
CN110423835A
