Methodology
Databases play a significant role in today’s software applications where they serve as a foundation for the storage, processing, and retrieval of vast volumes of data. The initial step involves setting up the server environment for hosting the web application. This includes configuring the necessary software components such as Python, Flask, MySQL, and other dependencies required for the application to run smoothly. The next step is to create a database. The first step in the development of a database involves the acquisition of datasets from reliable sources.
These datasets, extracted from the National Centre for Biotechnology Information, were subjected to the preprocessing phase, where sequences were formatted and made consistent to be stored and analyzed in the MySQL database. MySQL database is a relational database that stores data in structured formats with tables consisting of rows and columns. MySQL utilizes SQL as its query language and features a table index function that expedites database searches. A table structure was defined within the database to accommodate the primary dataset. Subsequently, a Python script was developed to connect with the MySQL database. MySQL connector library interacts with the database and utilizing the SQL queries integrates the data seamlessly into the database tables.
The back-end development involves implementing the server-side logic using Python with Flask. This includes creating Application Programming Interface (API) endpoints to handle incoming Hyper-Text Transfer Protocol (HTTP) requests, particularly POST requests containing javascript object notation (JSON) data. Flask is a lightweight web framework for Python used for developing web applications with simplicity and flexibility. HTTP requests are used to retrieve or send data between a client and a server over the web. JSON is a lightweight data interchange format commonly used for transmitting structured data between a client and server in web applications. POST requests is utilized to send data from a client to a server. The API endpoints are designed to receive DNA sequences submitted by users through the front-end interface, process the data, perform sequence alignment algorithm, calculate similarity percentages, and retrieve relevant information from the database. We integrated Needleman Wunsch and Smith-Waterman algorithms in the backend to perform sequence alignment. These algorithms are used to align biological sequences like DNA, RNA, or proteins. We also calculate alignment score, match, mismatch, and gaps between sequences. The back end then prepares a JSON response containing details of the top matching result, which is sent back to the front end for display.
The flow of the application starts with the user interaction and proceeds up to the final presentation of the output. The beginning is done by the user entering the DNA sequence into the web form and sending the information from the front-end interface. On submission, the client side posts a POST request to the server side JSON-object data given as input by the user is delivered. A back-end server that handles the request sends the DNA sequence for processing, performs sequence alignment, and calculates the matching percentages to then select a matching result from the database. The outcome results in generating an identifier, STR value, alignment details, and alignments, and the given values are returned.
The front-end implementation involves crafting the user interface (UI) using HTML, CSS, and JavaScript to provide a seamless and engaging experience for users interacting with the application. HTML serves as the foundation of web content by organizing the information and determining the layout of the web pages using tabs and attributes. CSS assists in improving the visual representation of the HTML elements by specifying colors, typeface spacing, etc. JavaScript adds responsiveness and interactivity to the web pages and interacts with the front-end HTML templates to provide client-side functionality. The front-end interface includes input forms for users to submit DNA sequences and output sections to display the results obtained from the back end.
in a JSON document and after that sent to the front end. The front end updates the UI because it is a dynamic tool and ensures that the result is displayed to the user. The insight will help the user to determine the associated DNA match. Using this interactive workflow, there is no break between the user experience, and, consequently, a forensic expert can carry out the necessary DNA examination in a streamlined and expedient manner.