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
Hashes for kappy-4.1.2-cp312-cp312-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f52747279a20c36e90ac8f149394d58a1258e72c6e9ab237fa2bc3cf8fcca9 |
|
MD5 | 0422fdb85beae400368e64429495ee60 |
|
BLAKE2b-256 | de0ad5cc1e3cff0270b2fb77f562d0b6f1f3699d21b74e14f571d2673f23a50f |
Hashes for kappy-4.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7b186d84f0b3a32f91d0cfbfe4e96f00df345b3cc3d97d0466e53f9c37a5337 |
|
MD5 | 4d859d1230af5ba1637975c3642f7fb8 |
|
BLAKE2b-256 | 696d88b830075d3beb3ba0af0c483e91b8a63c2fbb94a4a0175e8b96db7332c0 |
Hashes for kappy-4.1.2-cp310-cp310-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbc6b9e8960c90734ab8eb948b18e3fb357dc98b892877599f7af1400ac07951 |
|
MD5 | a9e01acdf72a44abd2f59c0e86f52e91 |
|
BLAKE2b-256 | 705d8a4f04e0ffd6496820b5999af1c318510059887869fff1625e9cafc3ef85 |
Hashes for kappy-4.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa5b38c8289e6888735ac820018a2ead1210af2047489a4bdcfd3ebfb897eeb4 |
|
MD5 | 56db92b5e60387775cfd2cc4c7c80402 |
|
BLAKE2b-256 | 781865a396b7b2f8807034103e04022094db7b84ba17cb5ff87c4c93e6fb804d |
Hashes for kappy-4.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dac96c7e7bdc53e59808a5f3e9b41678b84b6cd906a66ec2e8007b0e12713a2 |
|
MD5 | c7d4cdd6c3caff8a8850f7ac6353fe61 |
|
BLAKE2b-256 | 701d321b44c39757eb5f33b5a459013ad1e64bf0a9c6fa891cebc2559110fbc0 |
Hashes for kappy-4.1.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a5e9f4d87b3f0aa603022cb0c6f49f141c0c64ec5a7aa97e7acecb9e345be30 |
|
MD5 | 7609ed436c2325dcaffa26085f7343e1 |
|
BLAKE2b-256 | 5bef055d99753fd6241cbf287ed8b8b9823c4af6ed3d17b2866ada738b424688 |
Hashes for kappy-4.1.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 019e92be7a5bbd782892528f649826b12984bb201354dfd150a26ad0c71ded8b |
|
MD5 | 6fed764e3ae6a0d5bc3cc8de85b2c08d |
|
BLAKE2b-256 | e8a74fe9d43e44fcd04c59782b0f17b05fec60ec209b9b8435c2c1ee85103e24 |
Hashes for kappy-4.1.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8de8bcd857823215fcc3c184f68de5f1d80dc3b3352107749b8156f85d32ff4 |
|
MD5 | 8ce219a325a4432672139ad48a4116c3 |
|
BLAKE2b-256 | aca4306c4aa4aa178df434a56be20225b3429db20e901c38939047436d0fe2f6 |
Hashes for kappy-4.1.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e320d72a8281d62db23c35dfff5f1ee3afb614394468a53903716e47000d39 |
|
MD5 | 4de6c692392738be19031dc66a23b8c5 |
|
BLAKE2b-256 | d69b94da0b91341c94cd5288e243e356aff3b27e697829e4b930babf3e5a6128 |
Hashes for kappy-4.1.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fc1e1f1b273382fb06ac5c547fd242cb9a75f2e9822c6f7429794f2b6105324 |
|
MD5 | c1a58f2cb3c6fbdb71e015b4f11e1262 |
|
BLAKE2b-256 | e061c583c460008fb875297ff41ec937eea58abc10c80fe449a92a5b18b99305 |
Hashes for kappy-4.1.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6ce688ec320aefd4adf4405a16af968b05aeeafb887b3da4737ad66d9e92f4c |
|
MD5 | 1f68c04563d6453bfacff88af8d574b7 |
|
BLAKE2b-256 | c259b25aa36850eb010d5d8695147e4e60bcd020dc332a8847fdc31f1e673178 |
Hashes for kappy-4.1.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b6349b5d57c8c21956f1f13ec2ca7a506f47e16fd3bce71477508d408e5eebb |
|
MD5 | 5802d8a9af75079e60cad0eb8aeebc22 |
|
BLAKE2b-256 | af087b0fd476f8bcfe14add68d434fb98fc4d90419d2f3cf4e6c1c96a68ed20f |
Hashes for kappy-4.1.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81fcd2019c17497404160b88345c594899192fff5c86445adcc72b3dda2dbacc |
|
MD5 | 182dd9d4075d1e44c5bbab81e3a67f69 |
|
BLAKE2b-256 | d1bcd911eb398c785483474a96d5f17efc2ff4f68cd9d45b0f895dcad9924523 |
Hashes for kappy-4.1.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff72986deddf7579bddcdf7e3a6c96a281211a1f22ba06ffc1ba89163586e1e |
|
MD5 | 5540448b82f257bfff035bfe3ca65055 |
|
BLAKE2b-256 | ea356b8b0dc9807f02dcbf467dfd6d104060fd077f143da9e55428c04067657c |
Hashes for kappy-4.1.2-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f68a7e88898fc47c6904849e1d4f1ab75ec96003e53423ec9a1316a55ad3b4 |
|
MD5 | 7841fda03815e903bcbbd06f284867b1 |
|
BLAKE2b-256 | b4e4c64726ad51c86ef04f5cc234f17156b39eea556f8b09de959215fc36bb52 |
Hashes for kappy-4.1.2-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fc36a989af597648557dcdcfdf3b23f8acd536b85302538d007bda6fb1806c8 |
|
MD5 | f447682b318a18f12094fb0e45aaced5 |
|
BLAKE2b-256 | 32f9afeb442446162a002090d72a4bfb92f7c34d70e4b78b04192ebbcb5715c3 |
Hashes for kappy-4.1.2-cp27-cp27m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b256d3a4cccf27e7d17cd0f6d0f3051f817b4e3cab92e2d4b576515bcb0e0f88 |
|
MD5 | 62f0423eaecd09faf5ee766cd19569bc |
|
BLAKE2b-256 | 4b1af57cb979b8294ae59edfd87df26bcfa49623db57d0c496f3fece1cad4a78 |