Artistoo, a library to build, share, and explore simulations of cells and tissues in the web browser
A growing community of computational biologists uses simulation models to reason about complex processes in biological systems . The cellular Potts model ( CPM , Box 1 ) is a well-established framework for simulating interacting cells . Originally proposed as a model for cell sorting ( Graner and Glazier , 1992 ) , the CPM has since been extended with a plethora of biological processes such as proliferation , apoptosis , cell motion , and chemotaxis – allowing CPM users to model diverse phenomena ranging from slime mould formation to blood vessel development , tumour growth , and cell migration ( Marée et al . , 2007; Szabó and Merks , 2013; Hirashima et al . , 2017 ) . Nowadays , several mature modelling frameworks with CPM implementations exist , such as CompuCell3D ( Swat et al . , 2012 ) , Morpheus ( Starruß et al . , 2014 ) , Tissue Simulation Toolkit ( Daub and Merks , 2015 ) , and CHASTE ( Mirams et al . , 2013 ) . Although CPMs are relatively efficient models , tissue-scale simulations still require substantial computational resources . For this reason , all of the abovementioned frameworks rely on the C++ programming language for computation steps , which requires them to be built for and installed on the user’s native operating system . Here , we present ‘Artistoo’ ( Artificial Tissue Toolbox ) , a CPM framework built entirely in JavaScript . Although interpreted languages like JavaScript have classically been deemed too inefficient for running simulations , we found that this no longer holds: investments by major tech companies have tremendously improved JavaScript engines over the past years , to the point that our CPM now has no major performance disadvantage compared to existing C++ frameworks . The JavaScript implementation of Artistoo opens up new possibilities for rapid and low-barrier sharing of CPM simulations with students , collaborators , and readers or reviewers of a paper . Unlike existing frameworks , Artistoo allows building simulations that run in the web browser without the need to install any software: Artistoo models run on any platform providing a standards-compliant web browser – be it a desktop computer , a tablet , or a mobile phone . These simulations can be published on any web server or saved locally and do not rely on any back-end servers being available . They can be made explorable , enabling viewers to interact with the simulation and see the effect of changing model parameters in real time . In this paper , we will first briefly explain the key design principles behind Artistoo . We will then highlight applications in teaching , research , science dissemination , and open science where we envision that the zero-install , web-based architecture of our framework could be particularly useful .
Artistoo is a JavaScript library implemented as an ECMAScript 6 module , which can be loaded into an HTML page or accessed from within a Node . js command line application . Artistoo is an open-source library released under the MIT license and is freely available on GitHub at https://github . com/ingewortel/artistoo ( copy archived at swh:1:rev:551ee76c3a972e86ac72ed7e977356a75d091763; Wortel and Textor , 2020 ) . We here highlight a number of settings where Artistoo might complement other available modelling frameworks , focusing on the unique feature of Artistoo: it allows users to build and share explorable simulations in a zero-install setting . We discuss how this opens up novel opportunities of sharing CPM-based research and provide examples from our own work .
The recent rise of the open science movement has changed the way research outputs are being shared and communicated . This may be especially important for computational models , which have classically been difficult to share because of the required software and coding skills . Transparent model sharing calls for new strategies to make models accessible for broader audiences . Indeed , several such efforts have been made in recent years . The CPM framework CompuCell3D now hosts an online version on NanoHub , which users can access without installing software locally ( Gianlupi and Sego , 2021 ) . Beyond the CPM field , modelling frameworks like Tellurium ( Choi et al . , 2018 ) and PhysiCell ( Ghaffarizadeh et al . , 2018 ) have also created online access through NanoHub; these frameworks have also shown how such online models can be made interactive by using ( variations of ) Jupyter notebooks ( see , e . g . , Macklin and Heiland , 2020; Medley et al . , 2018; Somogyi , 2019 ) . The potential of explorable online web pages in communication and teaching is also demonstrated by the emerging practice to share R models in the form of Shiny apps ( Schönbrodt , 2014; Zehetleitner and Schönbrodt , 2015; Granjon , 2019 ) . And finally , the online collection of ‘complexity explorables’ ( Brockmann , 2020 ) is a fantastic example of how to combine interactive online simulations with explanatory text to communicate modelling research . With Artistoo , we now hope to open up this powerful avenue of model sharing for CPM research , allowing users to build online web pages and ‘explorables’ that combine interactive simulations with model explanations . We here show that the framework’s performance ( similar to that of existing frameworks in C++ ) is sufficient to allow for interactive CPM simulations . We have been developing the library for more than 5 years , also using it for robust simulation work in our research; see , for example , Wortel et al . , 2020 . We are continuing to develop the library for our own work and welcome suggestions and code contributions from the community . We do not envision Artistoo to replace existing modelling software; rather , it can complement software directed at computational biologists and developers by letting users build explorable and sharable versions of a simulation . To facilitate this process , we have built a ( prototype ) tool to help users convert models between different frameworks ( currently: Artistoo and Morpheus ) . Although Artistoo already offers a wide range of methods , it does not ( yet ) support all features of existing frameworks ( Morpheus , CHASTE , CompuCell3D , Tissue Simulation Toolkit ) , such as solvers for reaction–diffusion equations or SBML-encoded intracellular signalling , or writing output in formats like VTK and HDF5 . Nevertheless , Artistoo simulations are highly customisable , and a wide range of CPM models can already be constructed using the framework in its current state . The software’s modular structure also makes it easy for future developers to extend it with custom code . In summary , to the best of our knowledge , Artistoo is the first CPM simulation framework supporting interactive simulations in the web browser that can be shared via a simple URL , without requiring installed software or back-end servers . We hope that this will unlock avenues of sharing and communicating ( CPM ) simulations to much larger audiences .
To compare performance of Artistoo versus that of Morpheus ( v2 . 1 . 0 ) , we performed four different simulations in both frameworks . For this , we used the default examples provided with Morpheus and rebuilt similar simulations in Artistoo . This model of a migrating cell implements an actin-inspired migration model ( Niculescu et al . , 2015 ) ( see also Interactive Simulation 4 in Appendix 1 ) . A single cell was seeded in the middle of a 200 × 200 pixel grid . Two obstacles of radius 10 were placed at a distance of 50 pixels to the left and right of the cell , respectively . Simulations were run for 15 , 000 MCS , logging the cell’s centroid every 10 MCS and saving a PNG every 250 MCS . This simulation is the Morpheus example CPM/Protrusion_2D . xml ( version 4 ) . This simulation implements the classical CPM model published by Graner and Glazier , 1992 ( see also Interactive Simulation 5 in Appendix 1 ) . Fifty cells each of two cell types were seeded on a 200 × 200 pixel grid within a circle of radius 67 from the grid midpoint . Simulations were run for 2000 MCS , logging statistics every 10 MCS and saving a PNG every 100 MCS . This simulation is the Morpheus example CPM/CellSorting_2D . xml ( version 4 ) , where the StopTime field was changed from 2 . 5e4 to 2000 . A CPM linked to cell division ( see also Interactive Simulation 6 in Appendix 1 ) was simulated on a 500 × 500 pixel grid . The grid was initialised with 20 cells in a circle of radius 35 surrounding the grid midpoint . Simulations were run for 40 , 000 MCS , logging the number of cells every 100 MCS and saving a PNG every 1000 MCS . This simulation is the Morpheus example CPM/Proliferation_2D . xml ( version 4 ) . For the scalability simulations , simulations were run without outputting images . This allowed us to investigate the simulation speed separately from the time it takes to draw the entire grid . Note that if the drawing step becomes a limiting factor for running the simulation , it is always possible to speed up the process by drawing only once every few steps , or by choosing a more efficient drawing method ( e . g . drawing only cell borders rather than entire cells ) . Simulations contained 1 , 5 , 10 , 50 , 100 , 500 , or 1000 cells per cell type . The grid dimensions were adaptively scaled such that x=y=1 . 5⁢Ptot , with Ptot the total number of pixels of all the cells . Cells were seeded within a radius 0 . 8⁢Ptot/π from the grid midpoint . Other settings were the same as in the cell sorting simulation described under Framework comparisons .
The cellular Potts model ( CPM ) is a powerful in silico method for simulating biological processes at tissue scale . Their inherently graphical nature makes CPMs very accessible in theory , but in practice , they are mostly implemented in specialised frameworks users need to master before they can run simulations . We here present Artistoo ( Artificial Tissue Toolbox ) , a JavaScript library for building ‘explorable’ CPM simulations where viewers can change parameters interactively , exploring their effects in real time . Simulations run directly in the web browser and do not require third-party software , plugins , or back-end servers . The JavaScript implementation imposes no major performance loss compared to frameworks written in C++; Artistoo remains sufficiently fast for interactive , real-time simulations . Artistoo provides an opportunity to unlock CPM models for a broader audience: interactive simulations can be shared via a URL in a zero-install setting . We discuss applications in CPM research , science dissemination , open science , and education .
Understanding complex systems , such as the weather or the spread of a pandemic , often relies on computational models that can simulate what is happening and what will happen next . Models like these can also be used to investigate biological processes . For example , cellular Potts models ( or CPMs for short ) are regularly used to simulate how cells move , self-organise to form tissues and respond to their surroundings . Computational biologists use a range of specialist skills and software to create these models . However , this can make it difficult for people who do not have programming experience to interact with these simulations and incorporate them in to their own research . If more people could engage with these models , this could help foster closer collaborations and ultimately lead to better models of biological systems . To make CPMs more accessible , Wortel and Textor created a toolbox called Artistoo that allows users to view and interact with simulations using just an internet browser . These simulations are very easy to interact with , and do not require any prior programming knowledge or specialised software . Viewers can input different parameters in to the simulation and watch in real time to see how this affects the biological system being modelled . Wortel and Textor showed that this toolbox can be used to build a range of different biological models and works just as fast as other , more complex programming tools . Artistoo has many potential applications and is a valuable education , learning , and collaboration tool . It may also encourage more open science , as having more accessible computational models could help with peer review and make it easier to collaborate across different research fields . A similar approach could be used to provide access to many other types of models in biology and beyond .