Git Product home page Git Product logo

chaste / appredict Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 4.0 39.33 MB

Cardiac Action Potential Prediction (ApPredict) under drug-induced block of ion channels. This is a Chaste extension/bolt-on project.

Home Page: https://chaste.cs.ox.ac.uk/trac/wiki/ApPredict

License: Other

C++ 98.48% CMake 1.18% MATLAB 0.34%
chaste ion-channel electrophysiology drug-discovery drug-safety mathematical-modelling biophysics cardiac

appredict's Introduction

DOIBuild chaste/develop

Welcome to Chaste

If you are new to Chaste please see our Getting Started wiki page.

The files you have downloaded contain the source code for all Chaste functionality. Chaste makes use of a variety of external libraries and packages that need to be installed on your machine. The Install Guide webpage provides a comprehensive guide on how to install these external tools.

Chaste is distributed as open source software under the 3-clause BSD licence. For full details see the file Copying.pdf. Chaste uses various third party libraries which have their own licences. For details of these licences and the impact they may have on your use of Chaste please see Licences.html.

Chaste includes a complete test suite covering all the source code. The easiest way to use existing source codes is to create a test file which can call upon any of the source files.
The Chaste build system can build this file for you and handle all of the dependencies and library calls.

We suggest you use the projects directory in this manner to store your own source and test files if you do not wish to modify the Chaste source code. For more information, see the User Projects webpage.

For more information please refer to the Chaste website at: http://www.cs.ox.ac.uk/chaste/

Information on changes in this release can be found on the release notes webpage.

Tutorial examples for this release are available at: https://chaste.github.io/releases/2024.1/user-tutorials/

API documentation generated from the code by Doxygen is available at: https://chaste.github.io/doxygen-releases/release_2024.1

Chaste welcomes contributions from the community. For information on how to contribute to Chaste, and for support and bug reports, please see the file CONTRIBUTING.md.

A number of external libraries have been created that build on the Chaste trunk code. These include the following:

Note that, while Chaste developers may have been contributed to the development of these external libraries, we are unable to offer any support in their maintenance, testing or usage. If you have any questions about one of these external libraries, please contact that library's lead developer directly.

appredict's People

Contributors

fcooper8472 avatar kwabenantim avatar mauricehendrix avatar mirams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

appredict's Issues

EXPECT0 output going to stderr

When doing the following I seem to end up with wget output from EXPECT0 going to stderr, whereas I'd have hoped for it to go to stdout.

--model 8 --pacing-freq 1.0 --pacing-max-time 5 --pic50-herg 1 --hill-herg 1 --saturation-herg 0 --pic50-spread-herg 0.21 --plasma-conc-high 100 --plasma-conc-low 0 --plasma-conc-count 4 --plasma-conc-logscale true  --credible-intervals 2> stderr

Ensure qNet.txt contains correct number of rows if we have APD evaluation failures

Hi @gary, I'm noticing that there's an inconsistency between data being written to voltage_results.dat and q_net.txt.
In voltage_results.dat, if there are "NoActionPotential_X" values at concentrations, then it's appearing as :
23.1013 79.5776 27.5461 512.202 621.956 114.61 81.1131 NoActionPotential_1 NoActionPotential_1 NoActionPotential_1 NoActionPotential_1 NoActionPotential_1
In q_net.txt, it's just :
23.1013 -0.0296737
i.e. for q_net.txt I'd be expecting 81.1131 NoActionPotential_1
Observed with: --model 8 --pacing-freq 0.5 --pacing-max-time 5 --pic50-cal 5 --hill-cal 1 --saturation-cal 0 --pic50-herg 5 --hill-herg 1 --saturation-herg 0 --pic50-iks 6 --hill-iks 1 --saturation-iks 0 --pic50-na 6 --hill-na 1 --saturation-na 0 --plasma-conc-high 1000 --plasma-conc-low 0 --plasma-conc-count 10 --plasma-conc-logscale true

minor fixes to allow appredict to be compilled with c++11 and pycml

It would be nice that ApPredict still work with older installations of chaste that are still using c++11 and pycml, I would like to make the following changes if there are no objections?

diff --git a/SConscript b/SConscript
index e111a1d..e7125c8 100644
--- a/SConscript
+++ b/SConscript
@@ -48,6 +48,9 @@ chaste_libs_used = ['heart']
 # Change some flags just for this project
 env = SConsTools.CloneEnv(env)
 env['Chaste_CODEGEN_EXTRA_ARGS'] = ['--use-model-factory']
+env['PYCML_EXTRA_ARGS'] = ['--expose-annotated-variables']
+
+

 # Do the build magic
 result = SConsTools.DoProjectSConscript(project_name, chaste_libs_used, globals())
diff --git a/src/fortests/ModelFactory.cpp b/src/fortests/ModelFactory.cpp
index 02a3e2f..2b90129 100644
--- a/src/fortests/ModelFactory.cpp
+++ b/src/fortests/ModelFactory.cpp
@@ -41,7 +41,7 @@ ModelFactory::TModelMapping ModelFactory::getModelRegistry()
 {
     if (ModelFactory::mpModelRegistry == nullptr)
     {
-        ModelFactory::mpModelRegistry = std::make_unique<std::map<std::pair<std::string, std::string>, ModelFactory::TCreateMethod>>();
+        ModelFactory::mpModelRegistry = std::make_shared<std::map<std::pair<std::string, std::string>, ModelFactory::TCreateMethod> >();
     }
     return ModelFactory::mpModelRegistry;
 }

Invalid args are quietly ignored

I can invoke ApPredict with nonsensical args like --fish chips and it ignores them. Would be helpful to to have something like ...

  • simply fail on invalid args, or,
  • add another arg, e.g. --strict-args {true|false}, which defaults to false if not supplied (so ApPredict behaves as it's always done), but if --strict-args true it'll fail to run on bad args.

Methods to provide access to a custom selection of CellML files

Things to consider:

  • Create a new branch of www.github.com/Chaste/cellml which contains only the files needed by ApPredict, so that compilation is faster and easier.
  • By setting some global bash variable specify a folder of CellML files which we can use as additional --model s, either at compile time (by treating it as a source folder) or at run time (by reading contents and dynamically loading them).

Warning appearing: A high-performance Open MPI point-to-point messaging module ...

I'm seeing the following (seemingly inconsequential, as the simulation seems to complete) "warning" appearing in ApPredict https://github.com/Chaste/ApPredict/releases/tag/v2021.1 stderr in a container.

--------------------------------------------------------------------------
[[60025,1],0]: A high-performance Open MPI point-to-point messaging module
was unable to find any relevant network interfaces:

Module: OpenFabrics (openib)
  Host: 466e13a9963f

Another transport will be used instead, although this may result in
lower performance.

NOTE: You can disable this warning by setting the MCA parameter
btl_base_warn_component_unused to 0.
--------------------------------------------------------------------------

Simulation was run using :

* model = shannon_wang_puglisi_weber_bers_2004_model_updated
* na: no drug effect
* cal: no drug effect
* herg IC50s = 100  uM, Hills = 1, Saturation levels = 0  %.
* iks: no drug effect
* ik1: no drug effect
* ito: no drug effect
* nal: no drug effect
* max free plasma concentration = 100 uM
* min free plasma concentration = 0 uM
* number of plasma concentrations = 13

It'd be an improvement if this wasn't appearing in the logs, so are there any suggestions for adjusting https://github.com/CardiacModelling/appredict-docker/blob/master/appredict-no-emulators/Dockerfile#L40-L47 to include that btl_base_warn_component_unused instruction?

Always fetch missing CellML files

Description
FetchContent currently skips downloading CellML files if configuration has already been done once. This fix was added in #26 and prevents FetchContent from throwing errors when it can't overwrite existing files, which can happen when cmake is called twice or ccmake is used.

The current behaviour means that CellML files which have been accidentally removed after the inital configuration will not be replaced when cmake is called again.

Steps To Reproduce

cd /path/to/Chaste/build
cmake ..
rm /path/to/Chaste/projects/ApPredict/src/cellml
cmake ..
make ApPredict

Error

[ 82%] Building CXX object projects/ApPredict/CMakeFiles/chaste_project_ApPredict.dir/src/stats/BayesianInferer.cpp.o
/home/runner/_work/ApPredict/ApPredict/Chaste/projects/ApPredict/src/single_cell/CipaQNetCalculator.cpp:42:10: fatal error: ohara_rudy_cipa_v1_2017Cvode.hpp: No such file or directory
   42 | #include "ohara_rudy_cipa_v1_2017Cvode.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [projects/ApPredict/CMakeFiles/chaste_project_ApPredict.dir/build.make:258: projects/ApPredict/CMakeFiles/chaste_project_ApPredict.dir/src/single_cell/CipaQNetCalculator.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 82%] Building CXX object projects/ApPredict/CMakeFiles/chaste_project_ApPredict.dir/src/stats/LinearDiscriminantAnalysis.cpp.o
make[2]: *** [CMakeFiles/Makefile2:22324: projects/ApPredict/CMakeFiles/chaste_project_ApPredict.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2327: CMakeFiles/project_ApPredict.dir/rule] Error 2
make: *** [Makefile:314: project_ApPredict] Error 2

To Do

  • Try to force overwrites (delete and re-fetch), or check for missing files and fetch only those.

Output version information

It goes into the provenance file, but would be nice to have it on std::out along with Chaste version too.

Provide a `--version` option

Which just prints the commit hashes for Chaste and ApPredict that the executable was compiled with.

These are currently printed to std::out, but be nice to put them in a special call.

Maybe also print the dependency versions (TestChasteBuildInfo.hpp style).

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.