dsb-lab / CellBasedModels.jl

Julia package for multicellular modeling
MIT License
17 stars 3 forks source link

Make it more "bio"-friendly #49

Open gatocor opened 9 months ago

gatocor commented 9 months ago

@mastrof, maybe we can discuss what you commented in this post: https://github.com/JuliaDynamics/Agents.jl/issues/884#issuecomment-1732556853

mastrof commented 9 months ago

Hey, happy to share some thoughts. I guess the concept of being "friendly" to a certain audience can have very different meanings depending on the exact niche we are talking about, so our experiences might be different.

In particular I am now working on bacterial motility and chemotaxis, and one thing I have seen in the field is the absolute lack of "standard" tools. Whenever simulations have to be run, each group has its own set of not-readily-available codes, typically consisting of a bunch of C/matlab scripts (or even custom DSLs...), which are passed down between generations of students. Fundamentally everyone is rewriting the same things, with minor, yet often incompatible, modifications to accomodate new functionalities. This approach leaves out anyone who doesn't know how (or has no time/interest) to implement the mathematical components underlying such simulations. Rotational diffusion, three-dimensional rotations, steric interactions... these examples are basic aspects of simulations, but they have to be properly implemented and it is not trivial for someone without some mathematical training.

The same can be said for certain models of chemotaxis. I have various colleagues which perfectly understand the concepts behind different mathematical models of chemotaxis, but they would never dare implementing them as there often are non-trivial mathematical operations to take care of. Many physicists will be perfectly happy with a simple SDE parametrization of the Keller-Segel model where you have a directional bias proportional to the concentration gradient. That's totally fine if this approximation is good for you problem, but that's not a biological model. One example is the model of chemotaxis used in Celani & Vergassola, PNAS 2010: it is a wonderful and elegant model which reproduces extremely well the chemotactic response function of E. coli but it's "scary" for biologists because it's presented in a rather abstract way. I want biologists to be able to use this model, without thinking about the implementation details; they only care that the model reproduces the correct response function, not that to do that you need to introduce some fictitious internal markovian state variables etc...

So what I mean by being "bio-friendly" is that there are A LOT of mathematical aspects that can be just done behind the scenes, because they are mostly bloat. A biologist (I take as reference here all the people in my group, from phd students to senior researchers) wants to give values to biological quantities, they have no clue what the "torque of tumbling" is, or how to use neighbor lists to speed up the calculation of forces.

For my specific package, MicrobeAgents.jl (while it's still mostly a mess), it's easier to take these facts into account and make design choices accordingly, because I want it to be focused on only motility and chemotaxis. I am fine with providing an easier experience to less mathematically inclined people at the cost of making some opinionated choices on certain standard components of the simulations, which anyway are still totally customizable but require a bit more work to be customized if you really want to.

In your case, I don't know the package well (I discovered it the other day and just skimmed through the examples), and the "bio-friendliness" depends really on what your plans and specific needs are... one thing I like a lot (that blocked a lot of plans I had for my MicrobeAgents.jl) is the deeper integration with DifferentialEquations, which could put this package somewhere in between coarse agent-based modeling and full-on molecular dynamics simulations

EDIT: just read your last comment on the original topic which exactly matches my last sentence. I agree that is definitely a strong point of your approach