kda

Python package used for the analysis of biochemical kinetic diagrams.

https://github.com/becksteinlab/kda

Science Score: 85.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, acs.org, zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
    Organization becksteinlab has institutional domain (becksteinlab.physics.asu.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords

graph kinetics python
Last synced: 6 months ago · JSON representation ·

Repository

Python package used for the analysis of biochemical kinetic diagrams.

Basic Info
  • Host: GitHub
  • Owner: Becksteinlab
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage: https://kda.readthedocs.io/
  • Size: 6.27 MB
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • Open Issues: 11
  • Releases: 3
Topics
graph kinetics python
Created almost 6 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

Kinetic Diagram Analysis

CI codecov Documentation Status asv DOI

Python package used for the analysis of biochemical kinetic diagrams using the diagrammatic approach developed by T.L. Hill.

WARNING: this software is in flux and is not API stable.

Examples

KDA has a host of capabilities, all beginning with defining the connections and reaction rates (if desired) for your system. This is done by constructing an NxNarray with diagonal values set to zero, and off-diagonal values (i, j) representing connections (and reaction rates) between states i and j. If desired, these can be the edge weights (denoted kij), but they can be specified later.

The following is an example for a simple 3-state model with all nodes connected: ```python import numpy as np import kda

define matrix with reaction rates set to 1

K = np.array( [ [0, 1, 1], [1, 0, 1], [1, 1, 0], ] )

create a KineticModel from the rate matrix

model = kda.KineticModel(K=K, G=None)

get the state probabilities in numeric form

model.buildstateprobabilities(symbolic=False) print("State probabilities: \n", model.probabilities)

get the state probabilities in expression form

model.buildstateprobabilities(symbolic=True) print("State 1 probability expression: \n", model.probabilities[0]) ```

The output from the above example: bash $ python example.py State probabilities: [0.33333333 0.33333333 0.33333333] State 1 probability expression: (k21*k31 + k21*k32 + k23*k31)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) As expected, the state probabilities are equal because all edge weights are set to a value of 1.

Additionally, the transition fluxes (one-way or net) can be calculated from the KineticModel: ```python

make sure the symbolic probabilities have been generated

model.buildstateprobabilities(symbolic=True)

iterate over all edges

print("One-way transition fluxes:") for (i, j) in model.G.edges(): flux = model.gettransitionflux(statei=i+1, statej=j+1, net=False, symbolic=True) print(f"j_{i+1}{j+1} = {flux}") ```

The output from the above example: bash $ python example.py One-way transition fluxes: j_12 = (k12*k21*k31 + k12*k21*k32 + k12*k23*k31)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) j_13 = (k13*k21*k31 + k13*k21*k32 + k13*k23*k31)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) j_21 = (k12*k21*k31 + k12*k21*k32 + k13*k21*k32)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) j_23 = (k12*k23*k31 + k12*k23*k32 + k13*k23*k32)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) j_31 = (k12*k23*k31 + k13*k21*k31 + k13*k23*k31)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31) j_32 = (k12*k23*k32 + k13*k21*k32 + k13*k23*k32)/(k12*k23 + k12*k31 + k12*k32 + k13*k21 + k13*k23 + k13*k32 + k21*k31 + k21*k32 + k23*k31)

Continuing with the previous example, the KDA plotting module can be leveraged to display the diagrams that lead to the above probability expression: ```python import os from kda import plotting

generate the directional diagrams

model.builddirectionaldiagrams()

get the current working directory

cwd = os.getcwd()

specify the positions of all nodes in NetworkX fashion

node_positions = {0: [0, 1], 1: [-0.5, 0], 2: [0.5, 0]}

plot and save the input diagram

plotting.drawdiagrams(model.G, pos=nodepositions, path=cwd, label="input")

plot and save the directional diagrams as a panel

plotting.drawdiagrams( model.directionaldiagrams, pos=nodepositions, path=cwd, cbt=True, label="directionalpanel", ) ```

This will generate two files, input.png and directional_panel.png, in your current working directory:

input.png

3-state model input diagram

directional_panel.png

3-state model directional diagrams

NOTE: For more examples (like the following) visit the KDA examples repository:

4-state model with leakage input diagram 5-state model with leakage input diagram 6-state model with leakage input diagram

Installation

Development version from source

To install the latest development version from source, run bash git clone git@github.com:Becksteinlab/kda.git cd kda python setup.py install

Citation

When using Kinetic Diagram Analysis in published work, please cite the following paper:

  • N. C. Awtrey and O. Beckstein. Kinetic Diagram Analysis: A Python Library for Calculating Steady-State Observables of Biochemical Systems Analytically. J. Chem. Theory Comput. 2024, 30(17), 7646–7666. doi: 10.1021/acs.jctc.4c00688

Copyright

Copyright (c) 2020, Nikolaus Awtrey

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.2.

Owner

  • Name: Becksteinlab
  • Login: Becksteinlab
  • Kind: organization
  • Email: obeckste@asu.edu
  • Location: Tempe, AZ

Computational Biophysics at Arizona State University

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Awtrey"
  given-names: "Nikolaus Carl"
  orcid: "https://orcid.org/0009-0000-0395-6284"
- family-names: "Beckstein"
  given-names: "Oliver"
  orcid: "https://orcid.org/0000-0003-1340-0831"
title: "Kinetic Diagram Analysis"
version: 0.3.0
date-released: 2024-03-11
identifiers:
  - description: This is the collection of archived snapshots of all versions of Kinetic Diagram Analysis
    type: doi
    value: "10.5281/zenodo.5826393"
  - description: This is the archived snapshot of version 0.3.0 of Kinetic Diagram Analysis
    type: doi
    value: "10.5281/zenodo.10802705"
  - description: This is the archived snapshot of version 0.3.0 of KDA Examples
    type: doi
    value: "10.5281/zenodo.13159638"
license: GPL-3.0
url: "https://github.com/Becksteinlab/kda"
preferred-citation:
  type: article
  authors:
  - family-names: "Awtrey"
    given-names: "Nikolaus Carl"
    orcid: "https://orcid.org/0009-0000-0395-6284"
  - family-names: "Beckstein"
    given-names: "Oliver"
    orcid: "https://orcid.org/0000-0003-1340-0831"
  doi: "10.1021/acs.jctc.4c00688"
  journal: "Journal of Chemical Theory and Computation"
  month: 9
  start: 7646 # First page number
  end: 7666 # Last page number
  title: "Kinetic Diagram Analysis: A Python Library for Calculating Steady-State Observables of Biochemical Systems Analytically"
  issue: 17
  volume: 30
  year: 2024

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Delete event: 8
  • Issue comment event: 10
  • Push event: 6
  • Pull request review event: 1
  • Pull request event: 15
  • Create event: 8
Last Year
  • Issues event: 1
  • Watch event: 1
  • Delete event: 8
  • Issue comment event: 10
  • Push event: 6
  • Pull request review event: 1
  • Pull request event: 15
  • Create event: 8

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 152
  • Total Committers: 3
  • Avg Commits per committer: 50.667
  • Development Distribution Score (DDS): 0.204
Past Year
  • Commits: 7
  • Committers: 1
  • Avg Commits per committer: 7.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Nikolaus Awtrey n****y@a****u 121
Nik Awtrey 4****y 26
Nikolaus Awtrey n****y@g****m 5
Committer Domains (Top 20 + Academic)
asu.edu: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 60
  • Total pull requests: 65
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 4 days
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 1.57
  • Average comments per pull request: 1.71
  • Merged pull requests: 63
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 6
  • Pull requests: 36
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 3 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.94
  • Merged pull requests: 34
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • nawtrey (57)
  • orbeckst (3)
Pull Request Authors
  • nawtrey (97)
  • dependabot[bot] (6)
Top Labels
Issue Labels
documentation (14) testing (10) enhancement (10) maintenance (9) bug (9) API (8) CI (5) good first issue (5) performance (1) wontfix (1)
Pull Request Labels
maintenance (34) testing (20) documentation (20) enhancement (18) CI (8) API (6) dependencies (6) bug (5) performance (4) benchmarks (2) python (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 30 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 2
pypi.org: kda

Kinetic Diagram Analysis tools

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 30 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.5%
Stargazers count: 25.1%
Average: 28.9%
Forks count: 29.8%
Downloads: 58.2%
Maintainers (2)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy *
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1 composite