Author: Hiren Ghosh
Affiliation: UKF, Freiburg
This project involves creating and interacting with an SQLite database for a microbiology lab. The goal is to store and manage NGS data related to sequencing samples using a graphical user interface (GUI) built with Tkinter. It is also possible to run on command line using jupyter-notebook
-
Database Creation: Initially, an SQLite database file named
microbiology_lab.db
is created using thesqlite3
library. The database is designed to store information about sequencing samples, including sample ID, source, project details, sequencing platform, reads, QC status, species, and ST types. -
GUI Development: Using the Tkinter library, a GUI is built to provide a user-friendly interface for entering and modifying data in the database. Entry fields and buttons are created to collect information from the user and perform the required database operations.
-
Insertion of Data: The GUI allows users to enter details for sequencing samples. When the user clicks the "Submit" button, the data is inserted into the "Sequencing" table of the database.
-
Data Retrieval: To verify the successful insertion of data, a SELECT statement is executed to retrieve the inserted records from the "Sequencing" table. The retrieved data is then printed to the console.
-
Modification of Data: The GUI includes an option to modify or edit existing entries in the "Sequencing" table. Users can select a specific entry and update its fields, triggering an UPDATE statement to modify the corresponding record in the database.
- Python 3.7
- sqlite3 library
- Tkinter library
- Run the code to create the SQLite database and start the GUI.
- Enter the details for each sequencing sample in the provided entry fields.
- Click the "Submit" button to insert the data into the database.
- Use the "Edit" buttons to modify specific entries if needed.
- Run the SELECT statement to retrieve and print the inserted data.