Python package for working with the the Kinetic Simulation Algorithm Ontology (KiSAO), an ontology of algorithms for simulating and analyzing biological models, as well as the characteristics of these algorithms, their input parameters, and their outputs.
Installing this package
Requirements
Python >= 3.7
pip
Installation
Please run the following command to install this package:
pip install kisao
To generate a matrix of the substitutability among algorithms, install this package with the substitutability-matrix option:
pip install kisao[substitutability-matrix]
Tutorial
from kisao import Kisao
from kisao import utils
from kisao.data_model import AlgorithmSubstitutionPolicy
# load the ontology
kisao = Kisao()
# get a term
term = kisao.get_term('KISAO_0000019')
# get the name of the term
term.name
>> 'CVODE'
# get sets of methods
algs = utils.get_ode_algorithms()
sorted([alg.name for alg in algs])[0:5]
>> [
'Adams method',
'Adams predictor-corrector method',
'Adams-Bashforth method',
'Adams-Moulton method',
'Bader-Deuflhard method',
]
algs = utils.get_sde_algorithms()
algs = utils.get_pde_algorithms()
algs = utils.get_tau_leaping_algorithms()
algs = utils.get_ode_algorithms()
algs = utils.get_gillespie_like_algorithms()
algs = utils.get_tau_leaping_algorithms()
algs = utils.get_rule_based_algorithms()
algs = utils.get_sde_algorithms()
algs = utils.get_pde_algorithms()
algs = utils.get_flux_balance_algorithms()
algs = utils.get_logical_algorithms()
algs = utils.get_hybrid_algorithms()
# get a set of substitutable algorithms for a specific substitution policy
cvode = kisao.get_term('KISAO_0000019')
euler_forward = kisao.get_term('KISAO_0000030')
lsoda = kisao.get_term('KISAO_0000088')
lsodar = kisao.get_term('KISAO_0000089')
fba = kisao.get_term('KISAO_0000437')
fva = kisao.get_term('KISAO_0000526')
alt_algs = utils.get_substitutable_algorithms_for_policy(cvode,
substitution_policy=AlgorithmSubstitutionPolicy.SIMILAR_APPROXIMATIONS)
sorted([alt_alg.name for alt_alg in alt_algs])[0:5]
>> [
'Adams method',
'Adams predictor-corrector method',
'Adams-Bashforth method',
'Adams-Moulton method',
'Bader-Deuflhard method',
]
# get a preferred substitution for an algorithm
requested_alg = lsoda
implemented_algs_in_preferred_order = [cvode, lsoda, lsodar, euler_forward]
alt_alg = utils.get_preferred_substitute_algorithm(requested_alg, implemented_algs_in_preferred_order,
substitution_policy=AlgorithmSubstitutionPolicy.SIMILAR_APPROXIMATIONS)
alt_alg.name
>> 'LSODA'
requested_alg = lsoda
implemented_algs_in_preferred_order = [cvode, euler_forward]
alt_alg = utils.get_preferred_substitute_algorithm(requested_alg, implemented_algs_in_preferred_order,
substitution_policy=AlgorithmSubstitutionPolicy.SIMILAR_APPROXIMATIONS)
alt_alg.name
>> 'CVODE'
requested_alg = lsoda
implemented_algs_in_preferred_order = [fba, fva]
alt_alg = utils.get_preferred_substitute_algorithm(requested_alg, implemented_algs_in_preferred_order,
substitution_policy=AlgorithmSubstitutionPolicy.SIMILAR_APPROXIMATIONS)
alt_alg
>> None
Browsing KiSAO
Browsing the substitutability of algorithms catalogued by KiSAO
A matrix of the substitutability of algorithms catalogued by KiSAO is available here. The documentation for this package describes the queries and rules used to define this matrix.
Contributing to KiSAO
Please see the KiSAO repository for information about contributing to KiSAO and this package.
License
This package is released under Artistic License 2.0.
Metadata
Release files for kisao 2.34
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kisao-2.34.tar.gz | 109.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kisao-2.34-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 221.0 kB
Release files / kisao-2.34.tar.gz
| Download URL | kisao-2.34.tar.gz |
|---|---|
| Size | 109.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd0a0e958131b2b577764d9060bec2aa2ceeef88534e5ec740054c4d20bc9395
|
|
BLAKE2b-256 checksum How to use checksums |
51d6eb8b9d7604a3c766a921a81210c1942e20f80aa61a1d6cec3299af3d019f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Release files / kisao-2.34-py2.py3-none-any.whl
| Download URL | kisao-2.34-py2.py3-none-any.whl |
|---|---|
| Size | 111.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f685f66e08935bf1a2d7dc0152a372b10e3661d0659f8e89329dcc716a723da2
|
|
BLAKE2b-256 checksum How to use checksums |
8f16f46b8437cb7d538625b333e945a8eacd53a026017395650aa2e99919fefc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|