Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable importing of SBML models into Chaste #134

Open
kwabenantim opened this issue Jul 4, 2023 · 4 comments · May be fixed by #184
Open

Enable importing of SBML models into Chaste #134

kwabenantim opened this issue Jul 4, 2023 · 4 comments · May be fixed by #184

Comments

@kwabenantim
Copy link
Member

kwabenantim commented Jul 4, 2023

Background

  • SBML and CellML are now widely adopted for defining and sharing models of subcellular biological processes.
  • @MauriceHendrix and @mirams have developed chaste-codegen as a Python 3 replacement for Chaste’s CellML-to-Chaste-C++ converter.
  • Other preliminary work by @jmosborne has investigated using libSBML to parse SBML files and create Chaste-compatible C++ classes specifying subcellular reaction networks (SBMLChaste).

Scope of Work
Building on these efforts, we will:

  • Extend the primary Chaste codebase to enable all users to import new/existing SBML models for gene regulatory networks and signalling pathways.
  • Seek to validate these SBML capabilities through external compliance testing (https://synonym.caltech.edu/software/sbml-test-suite).
@kwabenantim
Copy link
Member Author

kwabenantim commented Oct 10, 2023

Roadmap

  • SRN Models
    • Start with existing code from SBMLChaste.
      • Check that existing code works with current Chaste develop.
      • Check that existing code generator works with Python 3.
    • No cell-cell communication:
      • Generate C++ Chaste code for simpler models that do not need cell-cell coupling e.g. Goldbeter (1991).
      • Add tests to check that generated model matches expected model.
      • Check that generated models pass existing Chaste tests.
    • Cell-cell communication:
      • Generate C++ Chaste code for models that require cell-cell coupling e.g. Van Leeuwen (2007).
      • Add tests to check that generated model matches expected model.
      • Check that generated models pass existing Chaste tests.
  • Cell-Cycle Models
    • Generate cell-cycle models from SBML for models that already exist in Chaste e.g. WntCellCycleModel.
      • Work out how to handle events (this isn't a consideration for SRN models).
        • Try using CVODE root finding to look for ODE events e.g. cell size drops to 0.
    • Add tests to check that generated model matches expected model.
    • Check that generated models pass existing Chaste tests.
  • Project
    • Create a separate chaste_codegen_sbml project.
    • Pin specific versions of libSBML and other dependencies.
    • Use similar test setup as chaste_codegen i.e. use CMake to create a virtualenv etc.
      • Use same virtualenv as chaste_codegen to avoid slowing down configuration.
      • Consider merging chaste_codegen_sbml and chaste_codegen into same package, perhaps one package with two submodules, one for cellml and the other for sbml.
    • Allow run-time / compile-time code generation from Chaste, similar to approach used in chaste_codegen.

@kwabenantim
Copy link
Member Author

kwabenantim commented Oct 24, 2023

Goldbeter (1991)

Notes

  • Chaste C++ model was generated successfully from SBML using SBMLChaste.
  • There are some differences in implementation between the generated model and the existing Chaste model.
  • Current tests do not work for generated model due to implementation differences. For example:
    • Missing expected GetC(), GetM(), and GetX() methods to return state variables.
    • OdeSystem and SrnModel are combined in a single file in the generated model but separated in the original Chaste implementation.
    • Some code that needs fixing e.g. double activation of cdc2 kinase = cell * (1 + -1 * CDC-2 Kinase) * V1 * pow(K1 + -1 * CDC-2 Kinase + 1, -1);

Tests

  • TestGoldbeter1991CellSrn
    • Fix variable names.
    • Fix generated ODE number of parameters from 5 to 3.
    • Add methods to get state variables. Use variable names for clarity.
    • Disable "timescale conversions".
    • SetDt(0.1)
    • Use the RungeKutta4IvpOdeSolver solver, same as the existing class.
  • TestGoldbeter1991OdeSystem
  • TestGoldbeter1991OdeBasedSrnModels
    • Model identifier is "SbmlSrnWrapperModel-GoldbeterOdeSystem-3".

@mirams
Copy link
Member

mirams commented Oct 24, 2023

I would think GetM() etc. methods should be replaced by ones that follow the OdeSystemInformation form, e.g. GetVariable("M") or GetParameter("M") etc. (automatically available when OdeSystemInformation in the hpp is complete.)

@mirams
Copy link
Member

mirams commented Oct 31, 2023

Work is in a separate chaste_codegen_sbml project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants