Food-borne pathogenic bacterium typing method based on wgMLST technology

By constructing a lightweight wgMLST database and combining it with Python dictionary structures and ORF extraction algorithms, the wgMLST analysis process was optimized, solving the efficiency bottleneck problem of existing tools and achieving efficient and accurate typing of foodborne pathogens.

CN121122407APending Publication Date: 2025-12-12CHINA AGRI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511245913.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing wgMLST analysis tools suffer from high database redundancy, slow comparison speed, poor platform compatibility, and limited result accuracy, resulting in computational efficiency bottlenecks.

Method used

A lightweight wgMLST database was constructed, and representative allele sequences were selected through spatial hierarchical clustering. Preliminary and dictionary comparisons were performed by combining Python dictionary structure and ORF extraction algorithm. The comparison process was optimized, the database size was reduced, and the comparison speed was improved.

Benefits of technology

It significantly improves comparison efficiency, shortens the single analysis time to 30-40 seconds, maintains high accuracy, reduces CPU and memory usage, and has good portability and functional scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122407A_ABST
    Figure CN121122407A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of bioinformatics and microbial genome analysis, in particular to a food-borne pathogenic bacterium typing method based on a wgMLST technology, which comprises the following steps of: preliminarily comparing a genome sequence with a constructed lightweight wgMLST database, and aiming at imperfectly matched gene loci in a comparison result, identifying the genomic sequence in the lightweight wgMLST database and identifying the genomic sequence in the lightweight wgMLST database. And expanding or cutting off the sequence according to the comparison region, predicting and extracting a potential open reading frame (ORF) sequence, and carrying out dictionary comparison on the potential ORF sequence until matching succeeds, thereby accurately judging the corresponding number of the allele. And traversing all imperfect matching sites and repeating the process to finally obtain a complete wgMLST typing spectrum. According to the method, a wgMLST typing task of large-scale high-throughput sequencing data can be efficiently processed; the complete analysis speed of single pathogenic bacteria is increased by nearly 10 times; a complete allele dictionary is introduced for secondary comparison and error correction, and it is ensured that imperfect matching site typing is correct and high in accuracy; and a technical support is provided for high-throughput strain detection and typing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of bioinformatics and microbial genome analysis, specifically to a method for typing foodborne pathogens based on wgMLST technology. Background Technology

[0002] With the rapid development of high-throughput sequencing technology, molecular typing of foodborne pathogens is gradually shifting from traditional MLST (Multilocus Sequence Typing) to more refined, higher-resolution whole genome MLST (wgMLST). wgMLST achieves strain typing by comparing allelic differences of all core gene loci in the target genome with those in a reference database, which is of great significance in areas such as epidemic tracing, epidemiological investigation, and food safety monitoring.

[0003] However, current mainstream tools are partly closed-source commercial software (such as BioNumerics and SeqSphere+), which are expensive, and partly open-source software (such as SISTR, cgMLSTFinder, RidomSeqSphere+, etc.) suffer from problems such as high database redundancy, slow comparison speed, poor platform compatibility, and limited result accuracy when performing wgMLST analysis. Currently, publicly available wgMLST analysis methods mainly include the following steps:

[0004] 1. Download the complete wgMLST reference database (containing all allele sequences of all core gene loci);

[0005] 2. Use a standard BLAST tool (such as blastn or blastx) to compare the contigs in the sample to be analyzed with the entire reference database;

[0006] 3. Extract the allele numbers of the best match from the alignment results;

[0007] 4. For gene loci that do not match, try redesigning primers for amplification or manually correcting them;

[0008] 5. Finally, generate and output the wgMLST classification results.

[0009] Although this method can achieve the basic functions of wgMLST classification, it faces efficiency bottlenecks in practical applications due to its large database size, single comparison method, and lack of intelligent optimization mechanism.

[0010] Therefore, there is an urgent need to propose a novel wgMLST analysis method that can significantly improve computational efficiency while ensuring classification accuracy, and has good portability and scalability. Summary of the Invention

[0011] The purpose of this invention is to provide a method for typing foodborne pathogens based on wgMLST technology.

[0012] This invention provides a method for typing foodborne pathogens based on wgMLST technology, comprising the following steps:

[0013] A method for typing foodborne pathogens based on wgMLST technology, characterized by comprising the following steps:

[0014] 1) Construct an allele dictionary: Store all allele sequences and allele numbers from the wgMLST reference database as a Python dictionary structure to construct a complete allele dictionary;

[0015] 2) Database construction: Sort all allele sequences in the wgMLST reference database, and select a representative allele sequence from each allele locus in the wgMLST reference database to construct a lightweight wgMLST database;

[0016] 3) Preliminary alignment and localization: The genome sequence sample is initially aligned with the representative allele sequences in the lightweight wgMLST database. If the preliminary alignment is identified as a perfect match, the representative allele sequence is identified as the target sequence. The target allele locus is located and the target allele number is determined based on the target sequence. If the preliminary alignment is identified as a non-perfect match, the genome alignment region sequence initially aligned in the genome sequence sample is expanded or truncated, its context region is extracted, and the potential ORF sequence is predicted and extracted using the ORF extraction algorithm.

[0017] 4) Dictionary alignment for imperfect matches: For the imperfectly matched sites in step 3), the potential ORF sequence extracted from each site is aligned with the complete allele dictionary constructed in step 1) until the alignment is successful, and the target allele sequence and target allele number are further determined.

[0018] 5) Genotyping: Combine the perfect match results from step 3) and the successful dictionary comparison results from step 4) to obtain the wgMLST typing profile of the foodborne pathogen, thus achieving the typing of the foodborne pathogen.

[0019] Specifically, in step 1), a complete allele dictionary is constructed according to the following algorithm:

[0020] D={(s,g)|s∈A i ,g=allele_id(s)}

[0021] Where D is the complete allele dictionary; s and g are the allele sequence and allele number, respectively; A i It is a collection of all allele sequences in the wgMLST reference database.

[0022] Specifically, in step 2), the representative allele sequence is selected by spatial hierarchical clustering.

[0023] Specifically, in step 2), the representative allele sequence is the allele sequence with the smallest allele number in the wgMLST reference database.

[0024] Specifically, in step 3), the preliminary comparison process is as follows:

[0025] B'={b∈B|is_perfect_match(b)}

[0026]

[0027] In the formula, B is the candidate matching result set obtained from the initial comparison, B ‘ This is a subset of the candidate matching results that meet the conditions; is_perfect_match(b) determines whether the following conditions are met:

[0028] 1) The alignment length is equal to the target sequence length;

[0029] 2) No mismatches;

[0030] 3) No empty seats;

[0031] 4) The sequence is completely identical;

[0032] Where b is the matching record in the candidate matching result set B. If the condition is met, the preliminary comparison is identified as a perfect match and the preliminary comparison is successful; if the condition is not met, the preliminary comparison is identified as an imperfect match, and is_perfect_match(b) returns False, indicating that the preliminary comparison is unsuccessful. A matching record b contains the following parameters:

[0033] qseqid: The name of the contiguous region of the genome alignment region;

[0034] sseqid: The name of the reference sequence in the alignment;

[0035] pident: The number of perfectly aligned bases;

[0036] length: the length of the alignment region or the number of bases;

[0037] mismatch: The number of incorrectly matched bases;

[0038] gapopen: the number of vacant bases;

[0039] qstart: The starting position of the genome alignment region;

[0040] qend: The end position of the genome alignment region;

[0041] sstart: The start position of the reference sequence alignment region;

[0042] send: End position of the reference sequence alignment region;

[0043] evalue: Comparison with expected value;

[0044] bitscore: Alignment score;

[0045] qseq: Preliminary alignment of genome regions.

[0046] Specifically, in step 3), the context region is extracted according to the following rules:

[0047] G[qstart-Δ:qend+Δ]

[0048] Where qstart is the starting position of the genome alignment region, Δ is the length of the extension before and after, qend is the ending position of the genome alignment region, G is the complete genome or the long sequence where qseq is located, and qseq is the genome alignment region sequence initially aligned.

[0049] Specifically, in step 3), the ORF extraction algorithm is as follows:

[0050] ORF(qseq,G,Δ)={o1,o2,...,o k}

[0051]

[0052] Where qseq represents the initially aligned genome region sequence, G represents the complete genome or the long sequence containing qseq, Δ represents the length of the preceding and following extensions, and o i The sequence of potential open reading frames is extracted, and ORF represents the open reading frames.

[0053] Specifically, in step 4), the dictionary comparison algorithm is as follows:

[0054]

[0055] Among them, o i The extracted potential open reading frame sequence is denoted by D, which is the complete allele dictionary, and s and g are the allele sequence and allele number, respectively.

[0056] Specifically, the wgMLST genotyping profile consists of allele numbers corresponding to each allele locus.

[0057] The method provided by this invention is applied to the wgMLST genotyping task for processing large-scale high-throughput sequencing data.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] 1. By streamlining the reference database, the size of the comparison library is reduced by 99.4%, and the time for a single wgMLST analysis is shortened from 3-5 minutes in traditional tools to 30-40 seconds, significantly improving the comparison efficiency.

[0060] 2. A complete reference dictionary is introduced for secondary comparison and error correction to ensure that even imperfectly matched sites can obtain correct classifications and maintain high accuracy.

[0061] 3. By dynamically repairing the CDS region, the tolerance for missing or broken contigs is improved, enhancing the system's ability to resist faults and interference.

[0062] 4. Based on Python, it can run on multiple operating systems such as Linux, Windows, and macOS, and has good portability.

[0063] 5. wgMLST's lightweight comparison database is small in size and has a fast comparison speed, which can significantly reduce CPU and memory usage and save computing resources.

[0064] 6. The modular architecture facilitates the integration of more analytical functions in the future (such as drug resistance gene detection, virulence factor identification, etc.), and has strong scalability. Attached Figure Description

[0065] Figure 1 This is a partial sequence from the wgMLST reference database of this invention.

[0066] Figure 2 This is a partial sequence of the lightweight wgMLST database of this invention.

[0067] Figure 3 This is an example of the first four rows of comparison records in result set B of this invention.

[0068] Figure 4 This represents the result of the non-perfectly matched region in this invention.

[0069] Figure 5 Examples of wgMLST typing profiles for some strains of this invention.

[0070] Figure 6This is a complete flowchart of the data processing for the foodborne pathogen typing method based on wgMLST technology of the present invention.

[0071] Figure 7 This is a bar chart comparing the traditional BLAST method of this invention with the method of this invention in terms of analysis time, number of uses, and system scale.

[0072] Figure 8 The method provided by this invention includes a box plot of additional loci compared to other software. Detailed Implementation

[0073] The technical solution of the foodborne pathogen typing method based on wgMLST technology of the present invention is further illustrated below through specific embodiments.

[0074] Example 1

[0075] (I) Lightweight Reference Database Construction Algorithm

[0076] The method provided in this technical solution is applicable to the typing of foodborne pathogens (such as Salmonella, Escherichia coli, Campylobacter, Staphylococcus aureus, Listeria monocytogenes, Shigella, Cronobacter, etc.). This embodiment uses Salmonella as an example for illustration.

[0077] The wgMLST reference database (using Salmonella as an example) contains 15,840 loci, each containing n allele sequences (e.g., SALM_1 contains 173 allele sequences, n=173; SALM_2 contains 1094 allele sequences, n=1094). The wgMLST reference database contains a total of 3,361,889 reference sequences. Some sequences in the wgMLST reference database are shown below. Figure 1 As shown, in the sequence name "SALM_1_2" of the Fasta sequence, "SALM_1" is the site name, "2" is the allele number corresponding to the site, and "ATGAAC..." is the sequence of the allele.

[0078] For each gene locus of wgMLST G i The wgMLST reference database contains a complete set of all allele sequences:

[0079] A i ={a i1 ,a i2 ,...,a in}

[0080] This invention selects a representative allele sequence r for each locus through spatial hierarchical clustering. i Building a lightweight wgMLST database:

[0081] R = {r1, r2, ..., r} m}

[0082] Where R represents the lightweight wgMLST database; m represents the total number of gene loci in the wgMLST framework; r i This represents the representative allele sequence at the i-th locus.

[0083] It is common knowledge in the field that there are many alleles at the same locus in the genome, and the sequences of different alleles are highly similar. Therefore, in this embodiment, the allele with the smallest allele number is selected as the representative allele sequence r of that locus. i This allows us to build a lightweight wgMLST database.

[0084] The lightweight wgMLST database, after processing, contains 20,217 representative allele sequences, a 99.4% reduction in size compared to the wgMLST reference database. Each locus in the lightweight wgMLST database contains only one representative allele sequence. Some sequences from the lightweight wgMLST database are shown below. Figure 2 As shown, all original allele sequences and their numbers are stored as Python dictionary structures to construct a complete allele dictionary:

[0085] D={(s,g)|s∈A i ,g=allele_id(s)}

[0086] Where D is the complete allele dictionary; s and g are the corresponding allele sequences and allele numbers, respectively, and A i It is a collection of all allele sequences in the wgMLST reference database.

[0087] (II) Preliminary Comparison and Result Filtering Algorithm

[0088] MegaBLAST was used to perform preliminary alignment of contigs in the input genome G with the lightweight wgMLST database R, resulting in a candidate matching set B, where each alignment record contains:

[0089] b = (qseqid, sseqid, pident, length, mismatch, gapopen, qstart, qend, sstart, send, evalue, bitscore, qseq), where the meanings of each parameter are as follows:

[0090] qseqid: The name of the contig containing the genome alignment region.

[0091] sseqid: The name of the reference sequence used for alignment

[0092] pident: The number of perfectly aligned bases

[0093] length: the length of the alignment region or the number of bases.

[0094] mismatch: The number of incorrectly matched bases

[0095] gapopen: number of vacant bases

[0096] qstart: The starting position of the genome alignment region

[0097] qend: The end position of the genome alignment region

[0098] sstart: The start position of the reference sequence alignment region

[0099] send: End position of the reference sequence alignment region

[0100] evalue: Comparison with expected value

[0101] bitscore: Alignment score

[0102] qseq: Preliminary alignment of genome regions

[0103] Example of the first 4 rows of comparison records in result set B: Figure 3 As shown, further filtering is performed from result set B to select a subset of comparison results that meet the criteria. Right now:

[0104] B'={b∈B|is_perfect_match(b)}

[0105] in:

[0106]

[0107] The `is_perfect_match(b)` function checks whether the following conditions are met:

[0108] (1) The alignment length is equal to the target sequence length;

[0109] (2) No mismatches;

[0110] (3) No empty spaces;

[0111] (4) The sequence is completely identical.

[0112] If the conditions are met, the preliminary comparison is identified as a perfect match. If the preliminary comparison is successful, the representative allele sequence can be identified as the target sequence. The target allele locus is located and the target allele number is determined based on the target sequence. If the conditions are not met, the preliminary comparison is identified as an imperfect match, and is_perfect_match(b) returns False, indicating that the preliminary comparison is unsuccessful.

[0113] (III) Imperfect Matching Region Repair and ORF Extraction Algorithm

[0114] For imperfect matches (i.e., initial matching fails), is_perfect_match(b) returns False, and the result of the imperfect match region is as follows: Figure 4 As shown, all mismatch values ​​are 0, causing is_perfect_match(b) to return False (Note: gapopen or length ≠ send-start+1 can both cause is_perfect_match to return False).

[0115] Therefore, it is necessary to expand or truncate the initially aligned genome alignment region sequences (qseq), extract the context region G[qstart-Δ:qend+Δ] from the genome G, and then use the ORF extraction algorithm to predict and extract potential open reading frame (ORF) sequences:

[0116] ORF(qseq,G,Δ)={o1,o2,...,o k}

[0117] Where qseq represents the initially aligned genome region sequence; G represents the complete genome or the long sequence containing qseq; Δ represents the length of the extension before and after (dynamically calculated based on the maximum allele length); o i The extracted potential ORF sequence; ORF stands for Open Reading Frame.

[0118] The rules for extracting potential open reading frame (ORF) sequences are as follows:

[0119]

[0120] Then for each o i The sequence is compared with the complete allele dictionary D until a match is found, in order to further determine the target allele sequence and the target allele number.

[0121]

[0122] Returns the best-matching allele number g, where s and g are the allele sequence and allele number respectively, and D is the complete allele dictionary.

[0123] (iv) Results Integration and Output

[0124] The results of perfect matches and successful dictionary alignments are combined to form the final wgMLST typing profile, which consists of allele numbers corresponding to 15,840 loci for each bacterium. Examples of wgMLST typing profiles for some strains are shown below. Figure 5 As shown, the fractal spectrum of Strain1 is 1-2-5-102-34-...-4-8. Structured format files (such as CSV and JSON) can be output subsequently for downstream analysis or visualization.

[0125] The complete data processing flowchart of the above-mentioned foodborne pathogen typing method based on wgMLST technology is as follows: Figure 6 As shown,

[0126] This method reduces the single wgMLST analysis time from 3–5 minutes using traditional tools to 30–40 seconds. Furthermore, compared to the traditional BLAST method, it improves the complete analysis speed for single foodborne pathogens by nearly 10 times, significantly enhancing analytical efficiency and providing strong technical support for high-throughput strain detection and molecular typing. The bar chart comparing the traditional BLAST method and the method of this invention in terms of analysis time, number of uses, and system size is shown below. Figure 7 shown.

[0127] Based on the genome sequencing data of 100 strains, core genome (cgMLST) and whole genome (wgMLST) genotyping analyses were performed using BN software and the method provided in this invention, respectively. A comparison of the genotyping results for each strain revealed that, in addition to identifying identical loci, the method provided in this invention could identify an average of 7.6 and 48.6 additional alleles per strain at the cgMLST and wgMLST levels, respectively, significantly outperforming the identification capabilities of BN software. The box plot showing the additional loci identified by the method provided in this invention compared to other software is shown below. Figure 8 As shown.

[0128] The above results show that the patented method significantly improves typing accuracy while maintaining high efficiency, especially at the wgMLST level, demonstrating superior site recognition capabilities, which helps to improve the resolution and accuracy of molecular typing of foodborne pathogens.

[0129] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for typing foodborne pathogens based on wgMLST technology, characterized in that, Includes the following steps: 1) Construct an allele dictionary: Store all allele sequences and allele numbers from the wgMLST reference database as a Python dictionary structure to construct a complete allele dictionary; 2) Database construction: Sort all allele sequences in the wgMLST reference database, and select a representative allele sequence from each allele locus in the wgMLST reference database to construct a lightweight wgMLST database; 3) Preliminary alignment: The genome sequence sample is initially aligned with the representative allele sequences in the lightweight wgMLST database. If the preliminary alignment identifies a perfect match, the representative allele sequence is identified as the target sequence. The target allele locus is located and the target allele number is determined based on the target sequence. If the preliminary alignment identifies a non-perfect match, the genome alignment region sequence initially aligned in the genome sequence sample is expanded or truncated, its context region is extracted, and the potential ORF sequence is predicted and extracted using the ORF extraction algorithm. 4) Dictionary alignment for imperfect matches: For the imperfectly matched sites in step 3), the potential ORF sequence extracted from each site is aligned with the complete allele dictionary constructed in step 1) until the alignment is successful, and the target allele sequence and target allele number are further determined. 5) Genotyping: Combine the perfect match results from step 3) and the successful dictionary comparison results from step 4) to obtain the wgMLST typing profile of the foodborne pathogen, thus achieving the typing of the foodborne pathogen.

2. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 1), a complete allele dictionary is constructed according to the following algorithm: D={(s,g)|s∈A i ,g=allele_id(s)} Where D is the complete allele dictionary; s and g are the allele sequence and allele number, respectively; A i It is a collection of all allele sequences in the wgMLST reference database.

3. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 2), the representative allele sequence is selected by spatial hierarchical clustering.

4. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 2), the representative allele sequence is the allele sequence with the smallest allele number in the wgMLST reference database.

5. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 3), the specific process of the preliminary comparison is as follows: B′={b∈B|is_perfect_match(b)} In the formula, B is the candidate matching result set obtained from the initial comparison, B ‘ This is a subset of the candidate matching results that meet the conditions; is_perfect_match(b) determines whether the following conditions are met: 1) The alignment length is equal to the target sequence length; 2) No mismatches; 3) No empty seats; 4) The sequence is completely identical; Where b is the matching record in the candidate matching result set B. If the condition is met, the preliminary comparison is identified as a perfect match and the preliminary comparison is successful; if the condition is not met, the preliminary comparison is identified as an imperfect match, and is_perfect_match(b) returns False, indicating that the preliminary comparison is unsuccessful. A matching record b contains the following parameters: qseqid: The name of the contiguous region of the genome alignment region; sseqid: The name of the reference sequence in the alignment; pident: The number of perfectly aligned bases; length: the length of the alignment region or the number of bases; mismatch: The number of incorrectly matched bases; gapopen: the number of vacant bases; qstart: The starting position of the genome alignment region; qend: The end position of the genome alignment region; sstart: The start position of the reference sequence alignment region; send: End position of the reference sequence alignment region; evalue: Comparison with expected value; bitscore: Alignment score; qseq: Preliminary alignment of genome regions.

6. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 3), the context region is extracted according to the following rules: G[qstart-Δ:qend+Δ] Where qstart is the starting position of the genome alignment region, Δ is the length of the extension before and after, qend is the ending position of the genome alignment region, G is the complete genome or the long sequence containing qseq, and qseq is the genome alignment region sequence initially aligned.

7. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 3), the ORF extraction algorithm is as follows: ORF(qseq,G,Δ)={o1,o2,...,o k } Where qseq represents the initially aligned genome region sequence, G represents the complete genome or the long sequence containing qseq, Δ represents the length of the preceding and following extensions, and o i The sequence of potential open reading frames is extracted, and ORF represents the open reading frames.

8. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 4), the dictionary comparison algorithm is as follows: Among them, o i The extracted potential open reading frame sequence is denoted by D, which is the complete allele dictionary, and s and g are the allele sequence and allele number, respectively.

9. The method for typing foodborne pathogens based on wgMLST technology according to claim 1, characterized in that, In step 5), the wgMLST typing profile consists of the allele numbers corresponding to each allele locus.

10. The application of the foodborne pathogen typing method based on wgMLST technology according to claim 1 in the wgMLST typing task for processing large-scale high-throughput sequencing data.