Git Product home page Git Product logo

bactos.jl's People

Contributors

github-actions[bot] avatar mastrof avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

bactos.jl's Issues

Revisit model interface

Allow extra kwargs to be passed to the ABM constructor via initialise_model, so all its functionalities can be accessed.
Remove the update_model! keyword from model_step! and set model_step! as an internal property (model.update!); modifications to the basic model_step! will then be obtained by chaining functions to model.update!

Behavioral Variability model

The Behavioral Variability model should be implemented.
Relevant references:

  • Tu, Y., & Grinstein, G. (2005). How white noise generates power-law switching in bacterial flagellar motors. Physical review letters, 94(20), 208101.
  • Figueroa-Morales, N., Soto, R., Junot, G., Darnige, T., Douarche, C., Martinez, V. A., ... & Clément, E. (2020). 3D spatial exploration by E. coli echoes motor temporal variability. Physical Review X, 10(2), 021004.
  • Junot, G., Darnige, T., Lindner, A., Martinez, V. A., Arlt, J., Dawson, A., ... & Clément, E. (2022). Run-to-tumble variability controls the surface residence times of E. coli bacteria. Physical Review Letters, 128(24), 248101.

At current stage, however, this model can only simulate intrinsic CheYP noise in motility, cannot simulate actual chemotaxis.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Differential equations

Must implement differential equations solvers via OrdinaryDiffEq (I see no clear need for the other diff eq modules at the moment).
This need to be accompanied by the implementation of a set of default finite difference schemes.
Standard finite differences should be enough for the evolution of typical concentration fields, but including flow fields might be a bigger task.

Interface for evaluation of encounter rates.

A general interface to detect collisions between bacteria and another body (whatever that is) should be implemented; something like encounters(body, is_encounter::Function, model::ABM) which can be passed to update_model!.
The user can supply a specific is_encounter(microbe::AbstractMicrobe, body, model::ABM) function that defines what an encounter is. encounters then loops over all microbes in the model and evaluates how many encounters occurred in the current step.

For certan simple cases (e.g. ObstacleSpheres), the is_encounter function will be provided by the library.

Test suite

A comprehensive and up-to-date test suite is absolutely necessary.

Improve model initialisation

Some improvements can be made to the initialise_model function.

  1. Model properties concentration_field, concentration_gradient and concentration_time_derivative should be auto-initialised by default to (pos,model) -> 0.0 for field and time derivative, and (pos,model) -> zero.(pos) since they are required by all microbe types with chemotaxis
  2. Same goes for model properties such as compound_diffusivity which is required for all microbe types with noisy chemotaxis

Default turn angle distribution

Default turn angle distributions for RunTumble should be modified such that, in D-dimensions, rotations are uniform on the D-sphere.
At the moment, this is not true for D=3.
In 3 dimensions, the two angles should be sampled as $\theta=2\pi u$ and $\phi=\arccos(2v-1)$ with $u,v\sim\text{Uniform}[0,1]$
The default constructor should define $\phi$ differently based on microbe dimensionality.

The arccos distribution will be defined by a custom distribution type

Mixed species models

Currently, mixed species models require the type of the population to be specified explicitly.

microbes = [MicrobeBrumley{1}(id=1), MicrobeBrownBerg{1}(id=2)] returns a Vector{AbstractMicrobe{1}} but initialise_model expects eltype(microbes) to be concrete, i.e. we must specify
microbes = Union{MicrobeBrumley{1},MicrobeBrownBerg{1}}[MicrobeBrumley{1}(id=1), MicrobeBrownBerg{1}(id=2)] to avoid errors.

This is cumbersome and should be managed either directly by initialise_models or by a new dedicated function that expands the microbe types.

Chemotactic response of marine bacteria

Add a model of chemotaxis for marine bacteria following Xie, L., Lu, C. & Wu, X.-L. Marine Bacterial Chemoresponse to a Stepwise Chemoattractant Stimulus. Biophys. J. 108, 766–774 (2015).
They develop the analytical form and provide parameters for V. alginolyticus.
Numerical implementation of the model requires an approach similar to that adopted for the Celani model (#13), where by the dynamics of the instantaneous tumbling rate is regulated by internal Markovian variables.

Fix random speed generation in type constructors

The extraction of random speed in microbe type constructors is inconsistent and bugged.
It must be fixed by introducing a rand_speed(motility) function which dispatches on AbstractMotilityOneStep and AbstractMotilityTwoStep.

Evaluate encounter rates using previous position instead of next one

Current approach to evaluate encounter rates can be unintuitive in some cases. Might even lead to errors if custom microbe_step! functions are used.

Instead of predicting whether an encounter will happen in the next step, the previous position of bacteria should be stored as a model property (updated at every step), and encounters can be tested by using their current position.

Not breaking, since all the changes happen internally.

Timekeeping

The initialise_model function should probably provide by default a t parameter, keeping track of current simulation time.
It will be useful to implement analytical time-dependent fields.
If implemented this would require to change affect! functons and expect all concentration field related functions to accept t as parameter

Plot modules

Develop an extra module for plotting bacteria and bacteria in fields.
Makie might allow for more freedom and control, but I at first I will probably rely on Plots since I know it much better.

Possibly, in the future two "equivalent" modules, based respectively on Plots and Makie, could be made available

Scalar transport in external flow fields

Implement reading of external flow fields (computable e.g. via WaterLily.jl); solve scalar transport on top of provided flows (might be better suited for a submodule or even an independent package)

Roadmap to v1.0.0

  • #62
  • Simple interface for pairwise microbe interactions (via CellListMap.jl).
  • #63
  • #65
  • Extensive test suite covering all functionalities.
  • #71
  • Submodule with Plots.jl (and Makie.jl?) recipes.
  • Ensemble simulations with built-in parallelization

Rewrite Motility types

Motility types should implement an easy way to distinguish between the motile stages.
Currently only RunReverseFlick implements a motile_state.

For a complete implementation of Xie chemotactic model, this is also required for RunReverse.

The abstract motile_state with values 0 and 1 should possibly be replaced by more meaningful "forward" and "backward" states, directly associated with the direction of flagellar motor rotation (and hence of motion)

Surface interactions

Need some implementations of surface interactions.
As a first step hard walls are sufficient; also useful to model swimming in porous media in conjunction with #8 and #9

Depend on the lighter `DiffEqBase` (instead of `OrdinaryDiffEq`) if possible.

Main problem here is that solvers are not included in DiffEqBase.jl so this would be a breaking change.
Requiring users to explicitly import OrdinaryDiffEq.jl just to choose the solver algorithm is not a big deal in itself, but it might be off-putting for someone which is not very familiar with differential equations (thinking about the more bio audience) and seems like boilerplate which could be easily abstracted away.

On the other hand, OrdinaryDiffEq.jl is a huge dependency.

Update examples

Many breaking changes happened, and most examples might be broken. They should be updated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.