Daptomycin staphylococcus aureus heterogeneity drug resistance identification method based on machine learning

By building a model through machine learning, the problem of time-consuming and costly detection of bacterial heterogeneous resistance in existing technologies has been solved, and a fast and low-cost detection method has been realized, which is combined with whole genome sequencing data for heterogeneous resistance diagnosis.

CN120853723APending Publication Date: 2025-10-28SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410517919.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies for detecting bacterial heterogeneous drug resistance are costly, time-consuming, and complex to operate, making rapid detection difficult in clinical practice.

Method used

A machine learning method was used to construct a model. Through data preprocessing, model construction and parameter adjustment, the heterogeneous drug resistance of Staphylococcus aureus was predicted, and rapid diagnosis was performed in combination with whole genome sequencing data.

Benefits of technology

It has achieved rapid and low-cost heterogeneous drug resistance detection, is capable of large-scale data processing, reduces detection time and labor costs, and is associated with the genetic level to further explore the causes of gene mutations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853723A_ABST
    Figure CN120853723A_ABST
Patent Text Reader

Abstract

The invention relates to a daptomycin staphylococcus aureus heterogeneity drug resistance identification method based on machine learning, which comprises the following steps: S1, preparing and downloading modeling data, collecting sensitive, drug-resistant and heterogeneity drug-resistant data of staphylococcus aureus to daptomycin, obtaining sequencing data, screening laboratory strains, and screening the screened strains to obtain a sample; determining the heterogeneity drug-resistant phenotype and then sending the heterogeneity drug-resistant phenotype to be used as data for model construction and model evaluation; s2, data preprocessing is carried out, after the data sent to be tested are obtained, a series of operations of filtering, splicing, evaluating and Kmer segmentation need to be carried out on the data, and a data matrix for model construction is obtained; s3, performing model construction and parameter adjustment; and S4, performing new data processing and model prediction. According to the method, time and labor cost can be greatly reduced through machine learning prediction, meanwhile, a large amount of data can be effectively predicted, and the heterogeneity drug-resistant phenotype of a clinical strain can be rapidly diagnosed through a model prediction method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bacterial heterogeneity drug resistance detection technology, and in particular to a machine learning-based method for identifying heterogeneous drug resistance in Staphylococcus aureus with daptomycin. Background Technology

[0002] Staphylococcus aureus (S. aureus) is an important zoonotic pathogen, hindering the development of the livestock industry and threatening human health. It is one of the most common opportunistic pathogens in humans, normally colonizing cavities such as the nasal cavity and rectum that connect the body to the outside world. When weakened immunity or dysbiosis allows it to enter internal tissues or the bloodstream, it can cause serious illness. According to the China Antimicrobial Resistance Detection Network (CHINET), Staphylococcus aureus ranked third among the bacterial strains collected and isolated by CHINET nationwide in the first half of 2023, accounting for 9.49%. Staphylococcus aureus rarely develops resistance to daptomycin, and no large-scale emergence of resistant strains has been reported to date.

[0003] Heterogeneous resistance is a special type of bacterial resistance phenotype. It is defined as the phenomenon where the minimum inhibitory concentration (MIC) of a resistant subgroup within a bacterial population is eight times or more the same as the MIC of the entire bacterial population. In the presence of antibiotics, resistant subgroups significantly increase in heterogeneous resistance populations, but when antimicrobial pressure decreases, the population reverts to a susceptible state. Therefore, heterogeneous resistance is considered an important pathway for susceptible strains to evolve into resistant strains. Under the selective pressure of antibiotics, some susceptible strains can transform into stable resistant strains.

[0004] Due to declining sequencing costs, the use of whole-genome sequencing (WGS) is increasing globally. This technology provides a wealth of rapid, highly accurate, and reliable information, offering comprehensive insights for species identification and typing, phylogenetic analysis, epidemiological surveys, and the determination of virulence and drug resistance traits. WGS is becoming an important tool for monitoring pathogens and antibiotic resistance. High-throughput sequencing technologies, when performing deep sequencing, link various genes with their phenotypic characteristics and potential functions, allowing for a deeper exploration of related biological functions and the mechanisms of various diseases, making it an indispensable part of biological research.

[0005] Currently, many researchers across various fields utilize machine learning or deep learning tools for their studies. Machine learning leverages existing data to learn complex relationships or interactions using supervised or unsupervised algorithms, and then uses training models to find similar or related patterns in previously unknown data. In essence, it's a method of using data to train a model and then using the model for prediction. In the field of microbiology, numerous studies have demonstrated the feasibility and effectiveness of this method. Compared to traditional biological research methods, machine learning is more efficient and better suited for handling noisy, multi-dimensional, and complex data. Therefore, machine learning has become the preferred method for processing complex microbiome data. In recent years, with the rapid development of whole-genome sequencing, this sequencing data is not only large in volume but also diverse and valuable, and its acquisition speed is faster than traditional methods. Machine learning can effectively utilize this complex data to more quickly and efficiently uncover mechanisms related to bacterial drug resistance.

[0006] Currently, the most commonly used methods for identifying heterogeneous drug resistance are Population Analysis Profile (PAP) and E-test. The most reliable and quantitative method is PAP. While PAP is considered the gold standard for detecting heterogeneous drug resistance and can identify resistant subgroups and MICs, it is costly, labor-intensive, time-consuming, and complex to perform, making it difficult to conduct rapid clinical testing. Summary of the Invention

[0007] To address the technical problems existing in the prior art, this invention provides a machine learning-based method for identifying heterogeneous drug resistance in Staphylococcus aureus daptomycin. Machine learning prediction can significantly reduce time and labor costs, while simultaneously enabling effective prediction of large volumes of data. The prediction time is short, and with the continuous development of sequencing, costs have been controlled to a certain extent. This model-based prediction method can rapidly diagnose the heterogeneous drug resistance phenotypes of clinical strains and correlate them with the genetic level, further exploring heterogeneous drug resistance phenomena caused by gene mutations.

[0008] This invention employs the following technical solution: a machine learning-based method for identifying heterogeneous drug resistance in daptomycin-containing Staphylococcus aureus, comprising the following steps:

[0009] S1. Prepare and download modeling data, collect data on Staphylococcus aureus’s sensitivity, resistance, and heterogeneous resistance to daptomycin and acquire sequencing data, screen laboratory strains, determine their heterogeneous resistance phenotypes and send them for testing, which will serve as data for model construction and model evaluation.

[0010] S2. Perform data preprocessing. After obtaining the data sent for testing, a series of operations are required, including filtering, splicing, evaluation, and Kmer splitting, to obtain the data matrix for model construction.

[0011] S3. Model building and parameter tuning: The model is built using R language and Rstudio compiler. After uploading the matrix data, the data is divided into training and test sets. The performance of the initial model is evaluated by different proportions of the set. The model is evaluated by comparison, and the proportion with higher accuracy and better classification effect is selected for the final model building. The parameter search methods of grid search and random search are used for optimization, and the parameters are evaluated using confusion matrix to determine the final model.

[0012] S4. Process the new data and predict the model. After processing the new data according to the data preprocessing method in step S2, perform Kmer splitting and matrix construction. Upload the matrix of the new data and rearrange it according to the training set feature arrangement order in the model construction. Discard the remaining features and counts, and use the constructed model for prediction.

[0013] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0014] 1. This invention can significantly reduce time and labor costs through machine learning prediction, and can effectively predict large amounts of data with short prediction time. With the continuous development of sequencing, the cost has also been controlled to a certain extent. The model prediction method can quickly diagnose the heterogeneous drug resistance phenotype of clinical strains and link it to the gene level, so as to further explore the heterogeneous drug resistance phenomenon caused by gene mutations.

[0015] 2. The model constructed by this invention can be saved and used for multiple predictions. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention;

[0017] Figure 2 This is a flowchart of step S1 of the present invention;

[0018] Figure 3 This is a flowchart of step S2 of the present invention;

[0019] Figure 4 This is a flowchart of step S3 of the present invention;

[0020] Figure 5 This is a flowchart of step S4 of the present invention;

[0021] Figure 6(a) is a graph showing the distribution of N50 quality of strain data splicing;

[0022] Figure 6 (b) is a graph showing the distribution of GC content in the spliced ​​strain data;

[0023] Figure 7 (a) is a diagram showing the MIC typing of the strain;

[0024] Figure 7 (b) is a diagram showing the ST type;

[0025] Figure 8 (a) is a schematic diagram of the XGBoost data ratio 7:3 model prediction in this embodiment;

[0026] Figure 8 (b) is a schematic diagram of the XGBoost data ratio 8:2 model prediction in this embodiment;

[0027] Figure 9 This is a diagram showing the accuracy of each group in the two partitioning ratio models of XGBoost;

[0028] Figure 10 This is a schematic diagram illustrating the evaluation of the prediction performance of each group in the final XGBoost model. Detailed Implementation

[0029] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0030] Example

[0031] like Figure 1 As shown in this embodiment, the machine learning-based method for identifying heterogeneous drug resistance in Staphylococcus aureus includes the following steps:

[0032] S1. Prepare and download modeling data, collect data on Staphylococcus aureus’s sensitivity, resistance, and heterogeneous resistance to daptomycin and acquire sequencing data, screen laboratory strains, determine their heterogeneous resistance phenotypes and send them for testing, which will serve as data for model construction and model evaluation.

[0033] S2. Perform data preprocessing. After obtaining the data sent for testing, a series of operations such as filtering, splicing, evaluation, and Kmer splitting are required to obtain the data matrix for model construction.

[0034] S3. Model building and parameter tuning: The model is built using R language and Rstudio compiler. After uploading the matrix data, the data is divided into training and test sets. The performance of the initial model is evaluated by different proportions of the set. The model is evaluated by comparison, and the proportion with higher accuracy and better classification effect is selected for the final model building. The parameter search methods of grid search and random search are used for optimization, and the parameters are evaluated using confusion matrix to determine the final model.

[0035] S4. Process the new data and make model predictions. After processing the new data according to the data preprocessing method in step S2, perform Kmer splitting and matrix construction. Without adding phenotypic data, upload the matrix of the new data, rearrange it according to the training set feature arrangement order in the model construction, discard the remaining features and counts, and use the constructed model for prediction.

[0036] like Figure 2 As shown, in this embodiment, the specific process of step S1 is as follows:

[0037] S11. Prepare modeling data by searching for relevant data from online databases and existing literature, recording relevant phenotypes, generating a data list, and then downloading the data using SRA Toolkit in the Linux terminal.

[0038] S12. Clinical strain screening: In accordance with CLSI requirements, the MIC value of Staphylococcus aureus against daptomycin was first determined and recorded using the CAMHb broth dilution method. Then, sensitive strains were screened at an 8-fold inhibitory concentration. The growth status was observed and recorded. Finally, the bacterial phenotype test was used to identify heterogeneous drug-resistant strains.

[0039] S13. Extract and test DNA from heterogeneous drug-resistant strains. After extracting DNA from heterogeneous drug-resistant strains using the Tiangen Bacterial Extraction Kit and reagents such as lysozyme and glucosidase, the DNA is sent to a sequencing company for next-generation sequencing.

[0040] Specifically, in this embodiment, the specific operation process of step S11 is as follows:

[0041] On the PubMed literature search page, relevant data on daptomycin for Staphylococcus aureus, including both phenotypic and next-generation sequencing data, were searched using keywords, and statistical records were made. Relevant data were screened from the Patric public database, and statistical records were made. The above data were classified, and some of the assembled data were downloaded directly from the NCBI website. For the unassembled data, an SRR bacterial name list file was generated, and the SRA Toolkit (3.0.6) was used to download the data in batches on the Linux terminal.

[0042] Specifically, in this embodiment, the specific operation process of step S12 is as follows:

[0043] Following the standards of the Clinical and Laboratory Standards Institute (CLSI), daptomycin powder was prepared in a suitable solvent under light-protected conditions and filtered through a 0.22 μm filter membrane. The minimum inhibitory concentration (MIC) of daptomycin was determined using the microbroth dilution method as required by CLSI. The Staphylococcus aureus standard strain ATCC 29213 was selected for quality control experiments to ensure the drug's MIC was within the control range. Subsequently, to prevent repeated freeze-thaw cycles from affecting drug activity, the filtered solution was aliquoted into 2 mL EP tubes and stored at -20°C. One tube was used at a time.

[0044] Dispense 800 μL of autoclaved CAMHB broth into 2 mL EP tubes. Pick single colonies of each strain from the subcultured agar medium and add them to the broth. Label the colonies and place them in a shaker at 37°C and 180 rpm for 4 hours to reach the logarithmic growth phase. Then dilute the bacterial suspension 100 times to achieve a concentration of 1 x 10⁻⁶. 6 CFU bacterial culture was prepared for use. 180 μL of CAMHB broth was added to each well in the first column of a 96-well plate, and 100 μL of CAMHB broth was added to each of the remaining 11 wells. Under light-protected conditions, 20 μL of the prepared drug was added to each well in the first column, and the mixture was thoroughly mixed by pipetting. 100 μL of this mixture was then added to the second column, and the mixture was diluted column by column using a two-fold dilution method until the last column, at which point 100 μL was discarded. Subsequently, 100 μL of the diluted bacterial culture was added to the diluted drug solution. Row 7 of each 96-well plate served as a positive control, containing only 100 μL of broth and 100 μL of the diluted bacterial culture. Row 8 served as a negative control, containing 200 μL of broth. The plates were incubated at 37°C for 18 hours before the results were interpreted.

[0045] According to 50 mg / L Ca 2+ For initial screening of daptomycin-related strains, prepare MH agar medium according to concentration requirements. Pick a single colony and place it in 800 μL of CAMHB broth, then incubate at 180 rpm and 37°C for 12 h with shaking. Calculate the minimum inhibitory concentration (MIC) of each Staphylococcus aureus strain using the micro-broth dilution method, multiplying the MIC by 8. Prepare the agar plates under light-protected conditions, performing three parallel experiments for each strain. Dilute the drug to the corresponding concentration gradient, then pipette 1 mL into a sterile Petri dish. Use an electric pipette to quantitatively pipette 19 mL of the solution, cooled to 55°C and containing Ca. 2+MH agar culture was carried out in a Petri dish. After thoroughly mixing the drug solution and agar, the mixture was allowed to stand for 1 hour. Then, 100 μL of bacterial solution was taken and evenly spread on the Petri dish using a spreader. After the bacterial solution in the Petri dish dried completely, the Petri dish was inverted and placed in a 37°C constant temperature incubator for overnight culture. The growth of the strains on the 8-fold MIC Petri dish was then observed and the corresponding results were recorded.

[0046] Following the blister pack preparation method used in the heterogeneous drug resistance screening, daptomycin was diluted to ten final concentration gradients: 16 μg / mL, 8 μg / mL, 4 μg / mL, 2 μg / mL, 1 μg / mL, 0.5 μg / mL, 0.25 μg / mL, 0.125 μg / mL, 0.06 μg / mL, and 0 μg / mL. Single colonies of strains selected from the 8-fold minimum inhibitory concentration (MIC) screening experiment, along with daptomycin-sensitive strains (negative controls), were used to prepare five blister packs at each of the ten concentration gradients. Single colonies were picked from MH agar medium and cultured in CAMHB broth until the logarithmic growth phase. 100 μL of the bacterial culture was then added to an EP tube containing 900 μL of physiological saline for a tenfold dilution, bringing the original bacterial culture to a final concentration of 10 μg / mL. -1 Then take 100 μL of 10 -1 The bacterial culture was added again to an EP tube containing 900 μL of physiological saline for serial dilution until the original bacterial culture was diluted to 10⁻⁶. -6 Concentration gradient.

[0047] Take 100 μL of the original bacterial culture and 10 μL of the original bacterial culture respectively. -3 10 -4 10 -5 10 -6 Gradient bacterial solutions at the above ten drug concentrations containing Ca 2+ On MH agar plates, drop or spread the solution, keeping the plates upright until the bacterial suspension is completely dry, then invert them and incubate overnight in a 37°C incubator. The next day, remove the plates and select those with 30-300 single colonies, count and record the colonies. Then, back-calculate according to the serial dilution factor to estimate the number of single bacteria that should grow per mL of bacterial suspension under normal growth conditions at the drug concentration under undiluted conditions. Finally, visualize the results by plotting the data.

[0048] Specifically, in this embodiment, the specific operation process of step S13 is as follows:

[0049] S1301. Use a 10μL pipette tip to pick up a single colony of the relevant heterogeneous drug-resistant strain and inoculate it into a 15mL sterile centrifuge tube containing 4mL CAMHB broth. Incubate at 37℃ and 180rpm in a shaker until the logarithmic growth phase.

[0050] S1302. Take the bacterial culture medium into a 2mL sterile EP tube, centrifuge at 10000rpm for 1min using a benchtop centrifuge, discard the supernatant after centrifugation, add the corresponding bacterial culture medium again, and repeat centrifugation at 10000rpm for 1min. After the last centrifugation, try to remove the supernatant and discard it, keeping the precipitate.

[0051] S1303. Add 200 μL of lysozyme (50 mg / mL) to the bacterial pellet. Use a pipette to aspirate the liquid and disperse the pellet by blowing out dense bubbles. Then add 10 μL of lysozyme. Place the centrifuge tube in a metal bath or water bath and incubate at 37°C for 30 min to break the cell wall. Then add 4 μL of RNase A enzyme (100 mg / mL) and vortex for 15 s. Let it stand at room temperature for 5 min to remove RNA.

[0052] S1304. Add 20 μL of proteinase K solution to each sample tube and mix thoroughly by pipetting.

[0053] S1305, add 220 μL of buffer GB to each tube, vortex for 15 seconds, and then incubate in a 70°C metal bath or water bath for 10 minutes. After incubation, briefly centrifuge to remove water droplets from the inner wall of the tube cap.

[0054] S1306, add 220 μL of anhydrous ethanol to each tube, vortex for 15 seconds and then briefly centrifuge;

[0055] S1307. Place the adsorption column CB3 in the collection tube, and add the solution and flocculent precipitate obtained in the previous step into the adsorption column CB3, not exceeding 700 μL each time. Centrifuge at 12000 rpm for 30 s, discard the waste liquid, and put the adsorption column back into the collection tube.

[0056] S1308. Pipette 500 μL of GD buffer solution mixed with anhydrous ethanol into each adsorption column, centrifuge at 12000 rpm for 30 s, discard the waste liquid, and put the adsorption column back into the collection tube.

[0057] S1309. Pipette 600 μL of the washing solution PW mixed with anhydrous ethanol into each adsorption column, centrifuge at 12000 rpm for 30 s, discard the waste liquid and put the adsorption column back into the collection tube.

[0058] S1310, Repeat step S1309;

[0059] S1311. After placing the adsorption column in the collection tube, run it at 12000 rpm for 2 minutes, discard the collection tube, and let the adsorption column CB3 stand at room temperature for several minutes to dry the washing solution.

[0060] S1312. Place the adsorption column in a new and clean centrifuge tube, and add 50-200 μL of elution buffer (TE buffer or ultrapure water after high pressure) dropwise to the filter membrane of the adsorption column. Let it stand at room temperature for 2-5 minutes, and then centrifuge at 12000 rpm for 2 minutes.

[0061] S1313. Take the elution buffer from the centrifuge tube and add it back to the adsorption column. Let it stand at room temperature for 2-5 minutes, then centrifuge at 12000 rpm for 2 minutes to obtain the bacterial DNA extract.

[0062] S1314. Seal the EP tube containing the DNA extraction solution with a sealing film and send it to the sequencing company for sequencing.

[0063] like Figure 3 As shown, in this embodiment, the specific process of step S2 is as follows:

[0064] S21. Perform data format conversion and sequencing quality assessment. Download SRR next-generation sequencing public data, use fast-dump to convert the format to obtain paired-end sequence data, download the company's sequencing Rawdata data, and use FastQC to assess the sequencing quality of the paired-end data.

[0065] S22. Perform data filtering, splicing, and quality assessment. Use FASP to filter the paired-end sequences of public data and submitted second-generation data to obtain cleandata. Then use SPAdes to splice the paired-end data. Use Quast to assess the quality of the spliced ​​data and then perform MLST typing identification.

[0066] S23. Perform Kmer segmentation and phenotypic addition. Use the KMC software in the Linux terminal to segment the relevant sequencing data according to Kmer=11bp. After segmentation, count and statistically analyze the data and integrate them into a matrix before adding phenotypic data.

[0067] Specifically, in this embodiment, step S21 includes the following process:

[0068] S211. Use the fastq-dump command in the SRA Toolkit to convert the batch-downloaded two-end data into a reads file.

[0069] S212. Use FastQC (v.0.11.5) to evaluate the filtered data.

[0070] Specifically, in this embodiment, step S22 includes the following process:

[0071] S221. Use the FastP software to filter the paired data and remove low-quality sequences using the default parameters.

[0072] S222. Use SPAdes (3.15.5) to splice the filtered paired-end sequencing data to obtain the spliced ​​FASTA file;

[0073] S223. Use Quast to evaluate the stitched data;

[0074] S224. Use MLST to perform typing and identification on the assembled sequences, and eliminate non-Staphylococcus aureus strains.

[0075] Specifically, in this embodiment, step S23 includes the following process:

[0076] S231. Integrate the selected relevant strains, record the phenotypic data, and use the Linux terminal KMC (3.2.1) software to segment the assembled sequences. For the first segmentation, Kmer=11bp is selected.

[0077] S232. Use the matrixer plugin in KMC software to perform Kmer statistics on the segmented intermediate file sequence according to the order of the input sequence names, and generate a Kmer matrix.

[0078] S233. Drag the matrix down to the Windows terminal, sort by strain, and use PyCharm to add phenotypic data to the last row of the matrix. The phenotypic labels for the sensitive group, the drug-resistant group, and the heterogeneous drug-resistant group are encoded as 0, 1, and 2, respectively.

[0079] like Figure 4 As shown, in this embodiment, step S3 includes preliminary model construction and model parameter adjustment, wherein the specific process of model construction is as follows:

[0080] S311. Select the XGBoost algorithm for model construction;

[0081] S312. Process the matrix data. First, transpose the original matrix and add the strain name to form an initial data frame format matrix with different base arrangements of kmer as the horizontal axis, the strain name as the vertical axis, and the last column as the phenotypic label.

[0082] S313. Given the ratio of training set to test set, the matrix is ​​divided. Since the number of strains used to build the model is not very large, in order to obtain the best model performance, as much data as possible should be allocated to the training set so that the model can be trained and learned better. Therefore, the ratio of training set to test set used is 7:3 and 8:2 for debugging and splitting. Before splitting, a random number seed is added to ensure that the data splitting can be reproduced.

[0083] S314. After dividing the data according to the given ratio, combine the data representing each feature with the corresponding phenotypic label data to generate training set and test set, and convert the data into Matrix data matrix format.

[0084] S315. Train the model on the training set and set several parameters, as detailed below:

[0085] booster: The model used in each iteration of the XGBoost model can be either a tree-based model (gbtree) or a linear model (gbliner). To ensure that the same results are obtained each time, the gbtree model is selected here.

[0086] objective: The objective function to be optimized. There are many options. Since we are building a multi-class model, we choose the "multi:softmax" parameter. This parameter is for softmax regression classification in multi-class problems. It returns the predicted class results in the prediction, but the number of classes needs to be set manually.

[0087] nrounds: The number of weak classifiers / base models that the model starts learning, which can be selected based on the data.

[0088] max_depth: The maximum depth of the classification tree. Generally speaking, the deeper the tree, the more complex the model is, but the more likely overfitting will occur. It is usually set to [3, 10].

[0089] eta: The learning rate or shrinkage factor, which is linked to the weak classifier and the number of iterations. If the first booster predicts a value of 4 for the first sample, and eta is set to 0.1, then the predicted value for the first sample under this learning rate will be 0.4. The smaller this parameter is set, the slower the model learns and trains, but the larger the parameter is, the less likely it is to converge. The typical value is [0.01, 0.3].

[0090] gamma: The minimum splitting loss value given when creating a new branch at each splitting node of a tree. It is a threshold for deciding whether to continue splitting. If it is greater than the threshold, the branch is worth splitting; if it is less than the threshold, it is not worth splitting and the branch stops splitting. The initial value is usually set to 0 and can be adjusted as needed.

[0091] colsample_bytree: The sampling ratio of columns in the data when creating each new tree, with a value range of [0,1].

[0092] subsample: The proportion of subsamples extracted for training, that is, the proportion of samples randomly extracted for training when building each new tree in the training model, with a value range of [0,1].

[0093] min_child_weight: The weight threshold for child nodes. After a node splits, if the weights of all child nodes are greater than this value, the split can continue. The value range is [1,∞).

[0094] lambda: L1 regularization coefficient, with a value range of [0, ∞), and a default value of 1. The larger this parameter is set, the less likely it is to overfit.

[0095] alpha: L2 regularization coefficient [0,∞); the default value is 0. This parameter is the same as the L1 regularization parameter. The larger the value, the less likely it is to overfit.

[0096] S316. After setting the relevant parameters, the model will be trained and then tested on the test set. The confusion matrix will be used to evaluate the test results, and the accuracy and specificity will be output.

[0097] Specifically, in this embodiment, detailed information such as the accuracy of the XGB model is shown in Table 1:

[0098]

[0099] Table 1

[0100] Specifically, in this embodiment, the specific process of adjusting the model parameters in step S3 is as follows:

[0101] Two methods, GridSearchCV and RandomizedSearchCV, were used to adjust model parameters and optimize model performance.

[0102] By combining two parameter search methods, grid search is first used to adjust several important parameters, and then random search is used to finalize the remaining parameters. After optimizing the constructed XGBoost as much as possible, the best split ratio is compared and the split ratio and algorithm are finally selected for the final model construction.

[0103] Specifically, in this embodiment, the evaluation metrics of the optimized model constructed based on the XGBoost algorithm are shown in Table 2:

[0104]

[0105] Table 2

[0106] like Figure 5 As shown, in this embodiment, step S4 includes preprocessing and prediction of the new data, wherein the preprocessing process of the new data is as follows:

[0107] S41. Use the fastq-dump command in the SRA Toolkit to convert the batch-downloaded two-end data into a reads file.

[0108] S42. Use FastQC (v.0.11.5) to evaluate the filtered data;

[0109] S43. Use the FastP software to filter the paired data and remove low-quality sequences using the default parameters.

[0110] S44. Use SPAdes (3.15.5) to splice the filtered paired-end sequencing data to obtain the spliced ​​FASTA file;

[0111] S45. Use Quast to evaluate the stitched data;

[0112] S46. Use MLST to identify the assembled sequences and eliminate non-Staphylococcal strains;

[0113] S47. Use the Linux terminal KMC (3.2.1) software to segment the assembled sequence, selecting Kmer=11bp for segmentation;

[0114] S48. Use the matrixer plugin in KMC software to perform Kmer statistics on the segmented intermediate file sequence according to the order of the input sequence names, and generate a Kmer matrix.

[0115] Specifically, in this embodiment, the model prediction process in step S4 is as follows:

[0116] The public data matrix is ​​converted to a new format. Then, code is used to extract all features from the training set of the constructed three-class machine learning model. The public data matrix is ​​re-statistically counted and sorted according to the arrangement of all features in the training set. Features and their counts that are not in the training set are removed. Features that are in the training set but not in the public data set are added, and all counts of these features are initialized to 0. A matrix with the same feature arrangement as the training set matrix is ​​obtained. Finally, the constructed model is used to make predictions and the prediction results are printed and written into a new table.

[0117] Through the operation of the method of the present invention, such as Figure 6 (a) Figure 6 (b) shows the data splicing quality of some strains, such as Figure 7 (a) Figure 7 (b) shows the MIC and ST typing results for some strains, as follows: Figure 8 (a) Figure 8 (b) shows the prediction results of the XGBoost model with different data ratios, such as Figure 9 The figure shows the accuracy of each group for the two splitting ratio models of XGBoost, as follows: Figure 10 The image shows the evaluation of the prediction performance of each group in the final XGBoost model.

[0118] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A machine learning-based method for identifying heterogeneous drug resistance in daptomycin-containing Staphylococcus aureus, characterized in that, Includes the following steps: S1. Prepare and download modeling data, collect data on Staphylococcus aureus’s sensitivity, resistance, and heterogeneous resistance to daptomycin and acquire sequencing data, screen laboratory strains, determine their heterogeneous resistance phenotypes and send them for testing, which will serve as data for model construction and model evaluation. S2. Perform data preprocessing. After obtaining the data sent for testing, a series of operations are required, including filtering, splicing, evaluation, and Kmer splitting, to obtain the data matrix for model construction. S3. Model building and parameter tuning: The model is built using R language and Rstudio compiler. After uploading the matrix data, the data is divided into training and test sets. The performance of the initial model is evaluated by different proportions of the set. The model is evaluated by comparison, and the proportion with higher accuracy and better classification effect is selected for the final model building. The parameter search methods of grid search and random search are used for optimization, and the parameters are evaluated using confusion matrix to determine the final model. S4. Process the new data and predict the model. After processing the new data according to the data preprocessing method in step S2, perform Kmer splitting and matrix construction. Upload the matrix of the new data and rearrange it according to the training set feature arrangement order in the model construction. Discard the remaining features and counts, and use the constructed model for prediction.

2. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on daptomycin according to claim 1, characterized in that, The specific process of step S1 is as follows: S11. Prepare modeling data by searching for relevant data from online databases and existing literature, recording relevant phenotypes, generating a data list, and then downloading the data using SRA Toolkit in the Linux terminal. S12. Clinical strain screening: In accordance with CLSI requirements, the MIC value of Staphylococcus aureus against daptomycin was first determined and recorded using the CAMHb broth dilution method. Then, sensitive strains were screened by several times the inhibitory concentration, and their growth status was observed and recorded. Finally, the bacterial phenotype test was used to identify heterogeneous drug-resistant strains. S13. Extract and test DNA from heterogeneous drug-resistant strains. Use Tiangen bacterial extraction kit, lysozyme, and lysozyme to extract DNA from heterogeneous drug-resistant strains, and then send it to a sequencing company for next-generation sequencing.

3. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on machine learning according to claim 2, characterized in that, The specific process of step S2 is as follows: S21. Perform data format conversion and sequencing quality assessment. Download SRR next-generation sequencing public data, use fast-dump to convert the format to obtain paired-end sequence data, download the company's sequencing Rawdata data, and use FastQC to assess the sequencing quality of the paired-end data. S22. Perform data filtering, splicing, and quality assessment. Use FASP to filter the paired-end sequences of public data and submitted second-generation data to obtain cleandata. Then use SPAdes to splice the paired-end data. Use Quast to assess the quality of the spliced ​​data and then perform MLST typing identification. S23. Perform Kmer segmentation and phenotypic addition. Use the KMC software in the Linux terminal to segment the relevant sequencing data according to Kmer=11bp. After segmentation, count and statistically analyze the data and integrate them into a matrix before adding phenotypic data.

4. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on daptomycin according to claim 3, characterized in that, The specific process of step S23 includes: S231. Integrate the selected relevant strains, record the phenotypic data, and use the Linux terminal KMC (3.2.1) software to segment the assembled sequences. For the first segmentation, Kmer=11bp is selected. S232. Use the matrixer plugin in KMC software to perform Kmer statistics on the segmented intermediate file sequence according to the order of the input sequence names, and generate a Kmer matrix. S233. Drag the matrix down to the Windows terminal, sort by strain, and use PyCharm to add phenotypic data to the last row of the matrix. The phenotypic labels for the sensitive group, the drug-resistant group, and the heterogeneous drug-resistant group are encoded as 0, 1, and 2, respectively.

5. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on machine learning according to claim 1, characterized in that, The specific process of model construction in step S3 is as follows: S311. Select the XGBoost algorithm for model construction; S312. Process the matrix data. First, transpose the original matrix and add the strain name to form an initial data frame format matrix with different base arrangements of kmer as the horizontal axis, the strain name as the vertical axis, and the last column as the phenotypic label. S313. Given the ratio of training set to test set, divide the matrix. Set the ratio of training set to test set to 7:3 and 8:2 respectively for debugging splitting. Add a random number seed before splitting to make the data splitting reproducible. S314. After dividing the data according to the given ratio, combine the data representing each feature with the corresponding phenotypic label data to generate training set and test set, and convert the data into Matrix data matrix format. S315. Train the model on the training set and set several parameters; S316. After setting the relevant parameters, the model will be trained and then tested on the test set. The confusion matrix will be used to evaluate the test results, and the accuracy and specificity will be output.

6. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on machine learning according to claim 1, characterized in that, The specific process of adjusting the model parameters in step S3 includes: Two methods, GridSearchCV and RandomizedSearchCV, were used to adjust model parameters and optimize model performance. The two parameter search methods are combined: first, grid search is used to adjust several important parameters, and then random search is used to finalize the remaining parameters; after the constructed XGBoost is optimized, the best effect is shown by comparing the split ratio, and then this split ratio and algorithm are selected for the final model construction.

7. The method for identifying heterogeneous drug resistance in Staphylococcus aureus based on machine learning according to claim 1, characterized in that, The specific process of model prediction in step S4 is as follows: The public data matrix is ​​converted to a new format. Then, code is used to extract all features from the training set of the constructed three-class machine learning model. The public data matrix is ​​re-statistically counted and sorted according to the arrangement of all features in the training set. Features and their counts that are not in the training set are removed. Features that are in the training set but not in the public data set are added, and all counts of these features are initialized to 0. A matrix with the same feature arrangement as the training set matrix is ​​obtained. Finally, the constructed model is used to make predictions and the prediction results are printed and written into a new table.