Wrapper to interact with the Kappa tool suite
Project description
<img src=”https://rawgithub.com/Kappa-Dev/KaSim/master/man/img/KaSim-Logo.svg” alt=”KaSim logo” title=”Stochastic Kappa Simulator” align=”right” height=”90”/> # KappaTools
[![Build Status](https://api.travis-ci.com/Kappa-Dev/KappaTools.svg?branch=master)](https://travis-ci.com/Kappa-Dev/KappaTools) [![Join the chat at https://gitter.im/Kappa-Dev/KaSim](https://badges.gitter.im/Kappa-Dev/KaSim.svg)](https://gitter.im/Kappa-Dev/KaSim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
KaSim is a stochastic simulator for rule-based models written in Kappa. KaSa is a static analyser for Kappa models.
Kappy is a python library to launch and analyse runs and outputs of Kappa models.
## User manual See [documentation page on kappalanguage.org](https://kappalanguage.org/documentation).
Kappy [API documentation is online](https://kasim.readthedocs.io/en/latest/kappy.html).
The latex sources of the “older” reference manual (and KaSa one) are available in the man/ directory. To compile the manuel, in addition of a decent LaTeX distribution you need [gnuplot](http://www.gnuplot.info/) and [graphviz](http://www.graphviz.org/) to generate images (make sure that dot is in the PATH of your OS). To generate the pdf of the manual type
make doc
## Installation
### Core tools
[Released versions](https://github.com/Kappa-Dev/KaSim/releases) come with binaries for MacOS, Windows and Debian derivatives (as Ubuntu). [Nightly builds](https://tools.kappalanguage.org/nightly-builds/) of the master branch are built for these platforms by the continuous integration tools.
- If you want or need your own build,
Install [opam](https://opam.ocaml.org/doc/Install.html) (the OCaml package manager) and initialize it (by issuing opam init)
In the source directory, install all the dependencies by opam install –deps-only .
dune build
You can be more fine grained if you only need the command-line tools (and therefore could install less dependencies) by doing opam install –deps-only kappa-binaries followed by make all
If nothing worked for you so far. Well, you’re pretty much on your own… Kappa tools depend upon the OCaml native compiler version 4.05.0 or above as well as _dune_, _findlib_, _Lwt_ (>= 2.6.0), _Re_, _Fmt_, _Logs_ and _Yojson_ libraries. Find any way to install them and you’ll be only a make all away from getting Kappa binaries…
### Kappy
You should be able to pip install kappy.
Under MacOS and linux (and if you’re not using a python version so cutting edge that we haven’t notice its release yet), _wheels_ that contain the core binaries should be available.
For other platforms/python versions, you need to get kappa agents by yourself thanks to the opam package manager by opam install kappa-binaries kappa-agents (or use an externaly hosted REST API)
In order to develop in kappy and run all its tests, you need to follow the “get your own build section” above as well as install _requests_ (and _future_).
## Usage
### KaSim
In order to run a simulation for 100 time units printing observables values every 0.5 time unit, type
bin/KaSim kappa_file_1 … kappa_file_n -l 100 -p 0.5 -o data_file
This will produce a data file of 200 point containing the trajectory that was produced during the simulation.
Type:
bin/KaSim –help
for a complete list of options.
### Kappy
Do:
`python import kappy client = kappy.KappaRest("http\://url_of/the_server","project_name") `
to get a kappa client that uses the REST API hosted by http://url_of/the_server and deals with project project_name.
or do:
`python import kappy client = kappy.KappaStd() `
to get a kappa client that uses a kappa agent installed locally. Add a string argument specifing the path/to/KaSimAgent to use a specific agent.
A minimal example of usage is:
`python model = "\ %agent: A(x[x.A]) \ %var: n_0 100 \ %var: k_on 1e-2 \ 'rule' A(x[.]), A(x[.]) <-> A(x[1]), A(x[1]) @ k_on, 1 \ %plot: |A(x[.])| \ %init: n_0 A()" client.add_model_string(model) client.project_parse() sim_params = kappy.SimulationParameter(pause_condition="[T] > 100",plot_period=1) client.simulation_start(sim_params) client.wait_for_simulation_stop() results = client.simulation_plot() client.simulation_delete() # Rerun with some overwritten values for algebraic variables client.project_parse(k_on=5e-2,n_0=500) client.simulation_start(sim_params) client.wait_for_simulation_stop() results' = client.simulation_plot() client.shutdown() `
## Tests
Launch the core/integration tests by make check.
Regenerate the reference files if you’ve changed something in the outputs by make build-tests
Launch python tests by nosetests (after having followed the “Get your own build” section).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file kappy-4.1.0.tar.gz
.
File metadata
- Download URL: kappy-4.1.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df33550c6f6d2d9d9ea21596d6489aa2302322cb68fa66504819cb78e24fb6cf |
|
MD5 | 368071f016ea16fecf777902adbac472 |
|
BLAKE2b-256 | 56e2963545a9670a8db947a6395f40c949134fed9cdde7dea9de500e23f49698 |
File details
Details for the file kappy-4.1.0-cp39-cp39-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp39-cp39-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc71518d9807c9a400832d841c0917217c50dcadfb5e9e987d49e2ec4fb74f4d |
|
MD5 | 7d2a3c766770e2023e285a3bbce2823c |
|
BLAKE2b-256 | a0cc1193ae1336af060339fd9ef51ef9216da466480b913fdd01267087898219 |
File details
Details for the file kappy-4.1.0-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c465213255af072c5be5610282a2eede62a62929d6975e7269ccf199bd25df9d |
|
MD5 | 0b3520f37ebaf703979417751ed0f9d2 |
|
BLAKE2b-256 | a7d0d0a79eeda31945a81ebe32f20ffaca4664b8b7271e14f6c84a8bcbd265c5 |
File details
Details for the file kappy-4.1.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6c8005109911f64563bb22e30794fb38eab6633ffe42b6774069875dd7f28c |
|
MD5 | 61053cebc4347e182541ede31ba81a8f |
|
BLAKE2b-256 | f88dcde28898c04dc8c6934d3a12684f21b139ec09fc984e6c508d47d33bab45 |
File details
Details for the file kappy-4.1.0-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87668e845840b5edc203d7597c139f339b7e6659873eeade76d22e77f1052d6e |
|
MD5 | 2102d5e4c81df8d665ac169fcfb40e48 |
|
BLAKE2b-256 | 049dc367a907fb09648377d6a0229a75a63b7731f3f02873e7b30ced2305a1a7 |
File details
Details for the file kappy-4.1.0-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ba5232940414be70e9beec8e5c386f3c52718c663488ce3fae4c697cdc78821 |
|
MD5 | 021c0d242f6d0568919666bc288dd4cc |
|
BLAKE2b-256 | b52c235eee367322a6c0582775d41628a0c5b616bd021d9920281ce52a6c431c |
File details
Details for the file kappy-4.1.0-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8889107cd3924afe87ebf5b57944a9b9fed62ea0fcc625e299972743e2b4dd76 |
|
MD5 | 000ec7ab0f84d76f61c27002bd601252 |
|
BLAKE2b-256 | ea0c10b48616f63a44b592cca89e61b33b0cd68c41383c13f99a7fd10b30c5f9 |
File details
Details for the file kappy-4.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bee2273112395f916a585fe1458d91f6528a56d839549a839112e3625618fec |
|
MD5 | 50c7bc4097eff0ca5936c67a5fc37840 |
|
BLAKE2b-256 | 458685f7bb576ed403f1ef93e3d13662b8d05b8223e48c7611836e587a36b70f |
File details
Details for the file kappy-4.1.0-cp35-cp35m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp35-cp35m-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06d5c751f931b25551b0934565ecca222437a59fe00a88e0e0e86e2e4931d96c |
|
MD5 | d0c02380d75a7e72987c222f9fefb3ae |
|
BLAKE2b-256 | de152d32fd35400ec2b814023f812b048eafeda80748c4454b46c9358ce3dcbd |
File details
Details for the file kappy-4.1.0-cp27-cp27mu-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp27-cp27mu-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 2.7mu, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf3e45bb41c6eb3679ad89418dfb9dd9888f654c63bb6332d047839927843c15 |
|
MD5 | 56a8de5f056f4cb8ba193cff2ead8a64 |
|
BLAKE2b-256 | 637c6302d2f8592c42c97ddb86b42359f0472b572e9313fbd3badf562723cf9e |
File details
Details for the file kappy-4.1.0-cp27-cp27m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp27-cp27m-manylinux2010_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 2.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25fb63d01d93c5b6c503f50163553d66750fa2dcd865305488975fa89aa91a33 |
|
MD5 | d76c9147cacb104a4eee0d3f64195bb0 |
|
BLAKE2b-256 | 53a3a5d0f6de4db2324651314712fa74054a8e1f4dc710052352e27be8089b3a |
File details
Details for the file kappy-4.1.0-cp27-cp27m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: kappy-4.1.0-cp27-cp27m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 2.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc71661a17045912dfb0d8633838de7b8b4bd658487fd61d77b58f735ccde099 |
|
MD5 | 7b880aec461b5a7a3570032b3ccc473d |
|
BLAKE2b-256 | ce85c9a789e91e419d1770b1a1ce8b330a5cdd9a8a08b5b38a644509d7f821b2 |