This repository contains a Python-based database management system designed to handle disk diffusion test antibiotic resistance thresholds, inspired by the Clinical and Laboratory Standards Institute (CLSI) guidelines. It leverages MySQL for storing and querying data on bacteria, antibiotics, and their associated resistance thresholds (Susceptible, Intermediate, Resistant, and Susceptible-Dose Dependent values). π οΈ
-
π Database Creation and Connection
- Automatically creates and connects to the MySQL database if it doesnβt exist.
-
𧬠Resistance Threshold Classification
- Classifies Minimum Inhibitory Concentration (MIC) values into categories (
S,I,R, orSDD) based on provided thresholds.
- Classifies Minimum Inhibitory Concentration (MIC) values into categories (
-
π Interactive Data Entry
- Allows users to add new entries interactively, including susceptibility and resistance values.
-
βοΈ Customizable Indications
- Supports multiple indications for bacteria-antibiotic combinations, enabling granular MIC classification.
-
π Data Management
- Handles missing or optional values with appropriate defaults and validations.
-
π Table Reindexing
- Includes functionality to reindex the database table to fill ID gaps and ensure sequential ordering.
-
π Preloaded Data
- Contains over 300 manually entered rows of resistance thresholds for various bacteria and antibiotics, sourced directly from CLSI guidelines.
-
π§ Setup
- Ensure you have a running MySQL server.
- Update the
db_infodictionary in the script with your MySQL credentials.
-
βΆοΈ Run the Script- Use the provided methods to:
- Interact with the database.
- Classify MIC values.
- Add new entries interactively.
- Use the provided methods to:
-
π Extend the Database
- Insert additional rows or modify existing ones using the interactive data entry tool.
This tool is designed for microbiologists, researchers, and clinicians who need a robust yet easy-to-use database to manage and analyze antibiotic resistance data efficiently.
- π Python 3.x
- π₯οΈ MySQL Server
- Python libraries:
mysql-connector-pythonpandasmatplotlib
The resistance thresholds and MIC classification standards are sourced from the CLSI M100 guidelines.