PhysiCell training apps: Cloud hosted open-source apps to learn cell-based simulation software

Cell-based tissue simulations require not only the ability to write new code in a simulation framework, but also an understanding of underlying mathematical models and parameters for each behavior of an agent. This entails a steep learning curve for interdisciplinary researchers joining computational biology research. We have created this suite of cloud-hosted open-source tools to separately explore key components of an agent-based cellular simulation framework. This creates an self-contained environment to learn and test functions of cells and micro-environment in modular fashion before creating more detailed, research-focused simulation models


Introduction
Multicellular systems biology is an interdisciplinary field. It requires knowledge of basic biology and physics, combined with mathematical modeling, to convert that knowledge into a mathematical format. Next, those mathematical models are implemented in a variety of programming languages depending on the requirements of that model. Once these basic code bases are developed, new models can be developed-often without understanding all the knowledge and code behind it. Many system modeling researchers join the field from technically diverse backgrounds, ranging from biology and informatics to engineering and mathematics. While simulation software packages are essential tools for working work in systems biology and computational biology, they may present a steep learning curve for scientists entering the field from diverse backgrounds. There are discussions going on in academia to find better ways to train researchers in computational modeling field. Madamanchi et al. [1] focused on challenges for natural science students as they venture into the computational modeling world. They identified that most such students seek to use computational modeling to answer domain-specific research questions that cannot be answered in wet labs. It shows that many scientists with the minimum computational background are potential users of computational modeling and simulation tools. Madamanchi et al. [2] discussed the need for user-friendly tools in computational modeling training, along with the potential of use focused web applications ("microapps") for education and training. In this report, we demonstrate a suite of microapps to address the training needs of new multidisciplinary users of biological simulation software.
Agent-based simulation software (e.g., PhysiCell [3], Chaste [4], and CompuCell3D [5]) is widely used for creating cell-based simulations. (See Metzcar et al. [6] for a review of cell-based models.) These models can be more intuitive to understand than differential equation-based models due to rule-based nature of assigning biological behavior to cell agents. Each cell of same cell type behaves independently even though they start at the same point with same rules; due to stochasticity introduced in code, they soon desynchronize and follow individual paths. Cell-based models generally simulate the tissue (micro)environment for these agents/cells by integrating diffusion solvers in the background, thus modeling the secretion, movement, and consumption of chemical substrates.

Statement of Need
Many complex simulation software packages used in academia are open source and are managed by small research teams. For such small teams, training new people outside their labs can become a bottleneck to dissemination and adoption. One common solution is to arrange workshops to train new people, such as PhysiCell's 2021 Virtual Woprkshop and Hackathon [7], recent CompuCell3D workshops [8], and the overall Software Carpentry approach [9]. There have been many efforts to create interactive materials for systems biology simulations. One earlier example of such training materials is bugbox [10]; this desktop-based software application must be downloaded and installed to explore different parameters of predator-prey models. In recent years there have been some efforts to create training materials more tailored to specific simulation software packages. In recent BrainIAK tutorials [11], the authors created learning materials for functional MRI analysis. They created Jupyter notebooks for users to run on their own to learn different concepts with open source data. They also created training materials around these notebooks to explain the concepts in fuller detail.
Although R is not frequently used to build simulation models, the Shiny package [12] can be used to transform R-based models into web applications for user-friendly sharing. For example, Handel [13] used R/Shiny to create an online, interactive systems immunology model. Their small, lightweight app allows users to explore different parameters in a model of infection and immune response. In "A virtual lab for teaching physiology" by David Granjon [14], created an R/shiny app to dynamically explore the effects of different genes on calcium and phosphate homeostasis in rats and humans.
Generally, there are fewer such platforms for transforming Python-, JavaScript-, and C++-based computational models to shareable web apps. Artistoo [15] is a framework based on JavaScript that lets users build interactive, explorable simulation models of cells and tissues in a web browser. They use the cellular Potts model [16] to simulate cells. Heiland et al. [17] developed xml2jupyter as a general framework to automatically create Jupypter-based graphical user interfaces (GUIs) for PhysiCell models built in C++, which can subsequently be shared as cloud-based web models on the nanoHub platform [18]. Similarly, CompuCell3D was recently adapted to hosting on nanoHUB [19]. Most of these apps provide specific examples for users to explore as a learning project. QUBES [20] also hosts a collection of training materials for qualitative biology. NetLogo [21] is another example for exploring mathematical models online by adjusting different parameters. It is more generalized and not tailored to biology.
Most of these apps do not explicitly link theoretical biological knowledge with programmable application. Instead, they generally assume that the user is already knowledgeable in those concepts or frameworks. Moreover, most of these frameworks are not physics-based (and instead restrict cells to non-realistic lattice positions with uniform size), while the cellular Potts-based models (e.g., CompuCell3D and Artistoo) are framed around interpreting biological behaviors as energy terms, which can be non-intuitive. There are unmet needs for online simulation frameworks where the cell behaviors are grounded in more realistic physics, cell behaviors can readily be associated with biologically meaningful parameters, and the models (and the underlying biology) can be taught through online interactive models that do not require software installs and additional coding.

Training Applications
We filled these unmet needs in training materials by creating a suite of small standalone apps that each focus on a different feature of cell-based models. A critical feature of our cloud-hosted interactive apps is that they are accompanied by training material to help the user understand the biological concept that each app presents. We have also designed our apps such that all parameters unrelated to a particular concept are fixed. This divide-and-conquer approach helps the user focus on the function of one parameter at a time. This way, we have divided basic modeling framework into seven apps. Students will train on each aspect in each app and then see how all of these concepts work in relation to each other in a final simulation.
This suite serves both to introduce key biological concepts of cell-based modeling while also specifically training users to run PhysiCell [3]: an open-source physics-based cell simulation framework. It provides key cell functions that can be used to write complex simulations of cells in their environment. PhysiCell provides support to run these simulations on desktops as well as on supercomputers, thus making it useful for multiple-scale simulations. The core code of Physicell is written in C++, with input files provided in XML and output files stored as XML and MATLAB files. Beyond the core framework is a growing software ecosystem, including packages like xml2jupyter [17] that that can help run the compiled models in a Python-based Jupyter Notebook. With this wide array of programming languages, file formats, and packages, PhysiCell can present a steep learning curve not only for students new to systems biology, but also those who are experienced with systems biology but unfamiliar with this specific software.
Our training apps are hosted on NanoHUB: an online platform to host simulations and other software tools [18]. We make our apps available for anyone to access and run. We selected seven apps because they capture the basic functionality of PhysiCell. While these introductory apps do not completely capture the breadth of functionality offered by PhysiCell, they are sufficient to train a user to create complex multicellular simulations.
Each training app has an graphical user interface (GUI), as depicted in Figure 1. In the About tab, we describe the biological and mathematical background of the app, along with some suggested parameter sets for exploration. This is followed by the Config Basics, Microenvironment, and User Parameters tabs. These three tabs provide different customization options to users, including parameters that can be modified to explore the given simulation. We have minimized the number of changeable parameters to focus on the selected modeling aspect for each app. Details about the theory and application of these apps are described below.

Chemical Diffusion
PhysiCell [3] uses BioFVM [22] to simulate the chemical environment of cells. BioFVM [22] is a diffusion transport solver that allows substrate diffusion models to be run on modern desktop computers as well as supercomputers. In this app, we demonstrate the chemical environment using two substrates: oxygen and ChemicalA. Users can modify the diffusion and decay rates of each substrate to obtain different diffusion length scales ( D/λ). Users can also set the boundary conditions for each substrate conditions to either von Neumann (zero flux) boundary conditions or Dirichlet (fixed value) boundary conditions. Within the Dirichlet boundary parameters, there is an option to fine-tune the values for individual boundaries. Users can also add one Dirichlet node (a location where the substrate value is held fixed, similarly to a boundary condition) anywhere in the domain. Figure 2a shows No chemical is being absorbed by any cell in the environment in this demonstration app, allowing users to focus solely on the impact of diffusion, decay, and boundary conditions. The Chemical Diffusion app is accessible at https://nanohub.org/resources/microenvnmtr.

Cell Division
Cell division is modeled in PhysiCell through different cell cycle models. Each cell cycle model consists of several phases (e.g., G 0 /G 1 , S, G 2 , M), and cells transition from one phase to the next based on user-provided transition rates. These rates can be coupled with some external factors to control the cell cycle. PhysiCell also provides some arrest functions that can lock the cell in a particular phase. During the final stage, the cell divides into two daughter cells. In this app, we use PhysiCell's built-in flow cytometry separated cycle model to explore cell division. In the app, four factors control the four transition rates in the model. Users can control target concentrations of substrates, volume, and pressure to control transition from one phase to the next. Figure 2b shows the output of the cell cycle app, where cells cells are prevented from transitioning from G 0 /G 1 to S if the local oxygen value is less than 25 mmHg. We can see that cells left half of the domain with oxygen concentration higher than 25 mmHg keep going through the cell cycle phases and dividing, while cells on the right are arrested in G 0 /G 1 . Also notice that the cells present on left side are of same type, yet they are not synchronously progressing through the cycle transitions. This is due to stochastic behavior introduced in the code to observe more realistic behavior. It is important to note that diffusion is not enabled for this app to demonstrate this phenomenon. The Cell Division app is accessible at https://nanohub.org/resources/trcycle.

Cell Death
PhysiCell supports two models of cell death: apoptosis and necrosis. Apoptosis is programmed cell death, which contributes to regular growth and function. In contrast, necrosis is un-programmed cell death due to injury or disease. The apoptosis model has only 1 phase, called Apoptotic. The apoptosis model does not involve any growth in cell size, though cells do shrink afterward. The necrosis model has 2 phases: the swelling phase and the lysed phase. The cell enters the swelling phase and grows in size until it reaches a specific volume, after which it lyses (bursts). After lysis, the cell shrinks (and potentially calcifies), entering the lysed phase. Figure 2c shows cell death with the apoptosis model. Necrotic brown cells are going through apoptosis. They swell before rupture. Green cells have not yet undergone apoptosis. This also shows the stochastic behavior in the model, since cells do not go through phases of apoptosis all at once. The Cell Death app is accessible at https://nanohub.org/resources/trdeath.

Cell Motility
Cell motility is active cell locomotion, either randomly or in response to some external stimulus (e.g., via chemotaxis). In PhysiCell (as well as many other cell-based models), motility is modeled via a biased random walk: a cell chooses a direction (either along a migration bias direction, randomly, or a combination based on its bias), move along that direction for a duration governed by its migration persistence time, and then choose a new direction of travel. In this app, users can control cell motility by setting the migration bias, migration speed, migration bias angle, and persistence time. We have displayed the each cell's path in this training app using a trail of a non-diffusing chemical substance in the microenvironment. At the end of the simulation, the effect of different parameters on cell movement can be observed by studying the cell paths. Figure 2d shows the path of three cells in the domain when they move toward a 30-degree x-axis gradient with a bias of 0.6. The Cell motility app is accessible at https://nanohub.org/resources/trmotility.

Cell Secretion And Uptake
This app demonstrates the secretion and uptake functionality of cells in the PhysiCell environment. Cells remove chemicals from the microenvironment based on their uptake rates. Cells also secrete chemicals in the microenvironment. Mass conservation is guaranteed to keep the total sum of chemical within the cell and in the microenvironment constant. It is very challenging to visually show the amount of chemicals in cells and outside due to difference in scales of the amount present inside and outside of cells. We have solved this difficulty by separately plotting the amount of chemicals inside cells and outside in the environment. Figure 2e shows a sample output of the application. There are three cells in the simulation. The left cell uptakes Chemical A from the environment, the middle cell secretes Chemical B, and the right cell secretes Chemical C. Three graphs show the amount of chemicals present in each cell and the microenvironment. We can see that the total amount of chemicals remains constant due to mass conservation. Parameter values used for this output can be seen in scenario 2 of the app About page. The cell Secretion app is accessible at https://nanohub.org/resources/trsecretion.

Cell Mechanics
Cell mechanics in Physicell are achieved by simulating adhesive and repulsive forces, similarly to to the Leonard-Jones potential in atomic and particle physics. The range and strength of these forces ultimately create an equilibrium position for a cell at a certain distance from its neighbors. In the training app, we created four pair of cells seeded at different distances from each other. Users can modify the adhesive and repulsive forces as well as the maximum interaction distance of these forces. The interaction radius of each cell is displayed using a blue field around it, while the (parameter-dependent) equilibrium distance is denoted by red circles. Any cell pairs that are within their interaction radii (i.e., their blue circles overlap) will pull each other towards the equilibrium spacing, while any cell pair beyond that interaction distance will not. When two cells have reached equilibrium, their red circles will just touch but not overlap. Notice that if any two cells are closer than their equilibrium spacing, they will push each other apart. Here in this snapshot 2f, after just 9 minutes of simulation two right pair of cells are pushing each other. The third pair from right is getting attracted while the leftmost pair is not moving since both are beyond the interaction distance. Cell Mechanics app is accessible at https://nanohub.org/resources/trmechanics.

Cell Volume
Cell volume in PhysiCell is used to capture liquid and solid fractions in the cytoplasm and cell nucleus. The cell will grow or shrink towards its steady-state (or "target") volume, based on its individual stored parameters; its current volume is stored as a state. In this app, we have used a red circle to denote the cell's steady state "target" size as determined by its parameters. Cells are color-coded according to a fluid fraction of cell cytoplasm and cell nucleus. Users can perturb the cell's state and watch it evolve back towards its steady state, or adjust parameters to change the steady state and thus direct the dynamics. The Cell Volume app is accessible at https://nanohub.org/resources/volumetr.

Discussion
Our goal for this work was to create user-friendly modules to train novice researchers on a cell-based modeling framework. We created this suite of seven open-source and made them broadly accessible with cloud hosting. Each app can be run independently, allowing users to select and focus on a single topic. We endeavored to make these apps faster by removing any functionality unrelated to the topic under discussion. Thus, these apps run fast, and we can see results almost instantly. We also provide a guide for the exploration at front page of all apps, directing users to explore and outlining what what they can expect from changing different parameters.
During the development of these apps, we worked in close collaboration with the principal developer of the software and the principal developer of user a interface for cloud-hosted apps. This close in-house collaboration resulted in improving not only training apps but also the underlying software. We identified the need in the software to quickly set Dirichlet conditions of each boundary, which was then implemented and added to the next release of PhysiCell. During development and testing of these apps, we found and reported bugs in PhysiCell's implementation of older function definitions, thus showing the integral role that the development of training software can play in quality control. We also worked with the developers of the Jupyter interface, which led to the addition of extra usability-focused features, such as adding separation tabs to separate different sets of parameters, adding an animate tab, and showing cell paths. We shared our initial versions of apps in our weekly lab meetings. Feedback from other lab members led us to explore some features in color template selection for apps. It is essential for applications like the cell cycle, where around half a dozen colors represent different stages in the cell cycle. Feedback from lab members led us to refine the usability and explore colorblind-friendly color schemes. We decided to go with color palettes described in [23] for these apps. This showed the power of integrating development of training applications and user interfaces directly with day-to-day lab operations.
We used these apps as teaching aids in an introductory class to systems biology modeling, and to introduce agent-based modeling to undergraduate researchers. These apps helped in translating theoretical concepts to tools that could drive hands-on exploration by students. These apps were also included as teaching materials for the PhysiCell workshop [7], and they helped accelerate the learning curve for participants in the one-week program. These apps were heavily used in training sessions about micro-environment set up and cell phenotype. All the participants of workshop were able to create their own PhysiCell models by the end of workshop. These apps can also be used in multiple settings, such as high school level biology classes to introduce concepts like diffusion, chemotaxis, and mechanical forces. We note that such apps could present an additional resource to include with documentation of other scientific software user guides, particularly for interdisciplinary fields where ideas form different disciplines intersect in one model.
Although these apps encompass the basic modules of a small cellular simulation, they cannot fully capture some of the more advanced features in PhysiCell that are used to write complex multi-scale simulations. While it is difficult to write narrowly-tailored training apps for these features, intermediate-level users (after having learned the essential features in this training suite) can continue learning from numerous intermediate-level and advanced projects available on nanoHUB. We recommend using cancer bio-robots [24] and PhysiCell invader-scout-attacker system simulation [25] on nanohub for intermediate-level exploration of capabilities of PhysiCell. Three-Type Multicellular Simulation Lab [26] shows a very detailed and customized simulation in which almost all the parts are available to customize. Thus, this provides an advanced-level application for exploration. Apps presented in this paper will serve as fundamental building blocks to move towards more complex simulations using PhysiCell platform.

Competing Interests
The authors declare that they have no competing interests.

Funding
We thank the Breast Cancer Research Foundation, Jayne Koskinas Ted Giovanis Foundation for Health and Policy, National Science Foundation (1818187 and 1720625), and National Cancer Institute (1U01CA232137-01) for generous support.

Author's Contributions
AS and FK led planning, development and refinement of the apps. KK, MC, and DW contributed to app development. RH provided technical support and refinement for Jupyter interfaces. AS, RK, and RH co-mentored undergraduate researchers. PM conceptualized and directed the work, obtained funding, and provided technical support for PhysiCell. AS led manuscript preparation, and all contributed to manuscript revision.