We have developed a mathematical model for the genetic circuit of CRISPRi-mediated gene regulation. The mathematical model was then implemented as a web-application, where users can explore how different model parameters will impact the system over time. Our goal was to develop an easy to use and easy to access application that does not require much knowledge to operate.
For mathematical modeling, the classical approach of creating a system of linear ODEs (ordinary differential equations) was chosen. The model describes interactions between various molecules involved in CRISPRi-mediated gene regulation. The system is solved numerically using an adaptive Runge-Kutta method, which is reasonably accurate and easy to implement in code. Here is the model:
Let’s describe each equation separately. The first equation is production of protein 1 at some rate from mRNA 1. The second equation is consumption of mRNA 1 in the process of protein 1 production, and the replenishing of mRNA 1 by the promoter 1. The third equation is blocking and unblocking of the promoter 1 by dCAS+sgRNA complexes. The fourth equation is the amount of “blockage” of promoter 1. The fifth equation is the concentration of dCAS+sgRNA complexes, which can decrease if a complex is used to block the promoter 1, or if the complex breaks, but replenishes from newly formed complexes and unblocked promoter 1. The rest of the equations describe the concentrations of dCAS and sgRNA, that get created by their respective promoters, may degrade into nothing, combine into a complex, or split off from the complex. The model requires some input parameters that define the speed at which these processes occur, starting values for each of the unknown functions, and the duration of the simulation.
A web-based application for experimenting with the model parameters was developed. The application can either be accessed at https://seashell-app-yxaof.ondigitalocean.app/ (the website should be up at least until the end of 2023), or by hosting it manually. The format of web application was chosen for the flexibility and ease of deployment: users can simply open the website in their browser, without having to install or configure anything on their own computers.
The application consists of two parts: a web-based user interface (frontend or client), and a server (backend). The typical workflow goes something like this: the user enters the model parameters on the website, the parameters are automatically sent to the server, the server does all the necessary computations, and the numerical solutions to the system of ODEs are sent as points back to the frontend, where they are conveniently displayed as plots for the user to analyze further. The user may request another solution for a different set of parameters, and its solution will be shown at the top, while still preserving any older plots. Alongside each plot, the model parameters that lead to that plot are also displayed, and these parameters can be restored – basically “written back” to the parameter selection form.
On the frontend, we use the tried and true combination of HTML+JS+CSS, something that every programmer is familiar with. For plot drawing, a third-party library Plotly.js was chosen, for its ease of use and good performance when drawing bigger plots. On the backend, we employed the Rust programming language, as it is a language with great run-time performance, ideal for making computations. For all server-related needs, such as receiving model parameters or sending back the solution, the Rust Axum framework has been used, one of the most popular and well-maintained web-application frameworks in the Rust ecosystem. We host the server inside a Docker container, which provides a common environment, and helps us avoid the common issue of “works on my machine”, where something breaks because of some subtle configuration differences between the computers used by developers, users, and the hosting provider. For hosting we used the DigitalOcean platform, an easy-to-use service for deploying web-applications.
Using the application is simple – just visit the website https://seashell-app-yxaof.ondigitalocean.app/. It is also possible to host the application manually. First, with Docker:
docker run -d -p 8080:80 zeromarble/smbu-igem-2023:1.0
127.0.0.1:8080
It is also possible to run the server without Docker:
cd smbu
127.0.0.1:8080
Control+C
Operating the website itself is easy. Enter your preferred parameters in the form labeled “Parameters”, and click “Solve”. Note that setting the parameter “t” (the duration of the simulation) will increase the computation time. A plot should appear, with two buttons on the top: “x” to remove the plot, and “<” to restore the parameters of that plot into the “Parameters” form. The plot itself has a number of associated controls, it is possible to pan, zoom, disable plots of individual functions, save the plot as an image. Clicking the arrow button in the bottom right corner will take you to the “Parameters” form on the top of the page. The website works well for both desktop and mobile.