https://github.com/cardiacmodelling/markov-builder

Tool for building and manipulating Markov models of ion-channel kinetics

https://github.com/cardiacmodelling/markov-builder

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

herg herg-channel-kinetics markov-model python
Last synced: 6 months ago · JSON representation

Repository

Tool for building and manipulating Markov models of ion-channel kinetics

Basic Info
  • Host: GitHub
  • Owner: CardiacModelling
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 742 KB
Statistics
  • Stars: 5
  • Watchers: 3
  • Forks: 2
  • Open Issues: 2
  • Releases: 0
Topics
herg herg-channel-kinetics markov-model python
Created over 7 years ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

Markov-builder

Description

markov_builder is a Python package for constructing Markov models of ion-channel kinetics. These models may be thought of as chemical reaction networks where the transition rate matrix depends on the cell's transmembrane potential (and sometimes the concentration of a drug). This package uses 'networkx' to allow the user to specify the graph associated with the model (model topology). Many models of ion channel kinetics can be expressed in this way. For example, Markov models equivalent to Hodgkin-Huxley style conductance models are straightforward to generate. The transition rates may then be parameterised with any choice of equation, and depend on any number of 'shared variables' such as transmembrane potential, drug concentration, temperature, etc...

Given the graph for a model and a parameterisation, you may then: 1. Output latex describing the model 2. Visualise the model using pyvis 3. Output the system of equations as sympy expressions for use in other code 4. Model drug trapping by composing models together 5. Simulate a small number of channels using the Gillespie algorithm 6. Check the model satisfies properties such as microscopic reversibility and connectedness

Getting Started

Dependencies

This package requires Python with version >= 3.6 with numpy. pip is required for installation.

Installation

It is recommended to install markov_builder in a virtual environment to avoid dependency conflicts. To do this, navigate to this repository and run:

python3 -m pip install --upgrade pip python3 -m pip install --upgrade venv python3 -m venv .venv activate .venv/bin/activate Then install markov_builder, along with its dependencies. python3 -m pip install .

Testing

If you wish to run the tests, you must first install the test dependencies. python3 -m pip install .[test]

Then run the tests. pip3 -m pytest By default, test output will be written to a folder inside tests but this may be overwritten by exporting a MARKOVBUILDER_TEST_OUTPUT environment variable.

To see detailed output from the tests, simply execute them e.g. python -m tests.test_MarkovChain.py.

Owner

  • Name: Cardiac Modelling
  • Login: CardiacModelling
  • Kind: organization
  • Location: United Kingdom

Codes and Resources from the University of Nottingham's cardiac modelling team

GitHub Events

Total
  • Issue comment event: 1
  • Push event: 6
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issue comment event: 1
  • Push event: 6
  • Pull request event: 1
  • Create event: 1

Dependencies

setup.py pypi
  • matplotlib >=3.4
  • myokit ==1.33.0
  • networkx >=2.6
  • numpy >=1.21
  • pandas >=1.3
  • pints >=0.3
  • plotly >=5.3
  • pygraphviz ==1.7
  • pyvis ==0.1.9
  • scipy >=1.7
  • symengine >=0.8
  • sympy >=1.8
.github/workflows/pytest.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
  • codecov/codecov-action v1 composite
  • ts-graphviz/setup-graphviz v1 composite