Home

Awesome

PEtab Importer

This project holds the code to import the parameter estimation benchmark problems into COPASI. The test cases it ought to be able to deal with are from this project:

These models are encoded in the PEtab format with this documentation. The format specifies:

So this converter 1. reads the SBML file and converts it to the COPASI format, then converts the experimental data so we can use it in COPASI, and provides the mapping to the observables. Once the converter is done, and you run the parameter estimation you will get the current solution displayed.

The benchmarks are also added as submodule to this repo. So if you do want to use those, be sure to check it out as well, running:

git submodule init 
git submodule update

Run PEtab the easy way

This project is used direclty from basico, where we directly implement a PetabSimulator. So if you are interested in just running PEtab problems with COPASI, I recommend to

pip install copasi-basico[petab]

and then follow the basico petab example. Otherwise, this project can of course be used on its own as described below.

Setup

Create a new virtual environment, and then run pip install -r requirements.txt. This will install all the dependencies, these are:

You can also directly install the importer in one line directly from git (including the dependencies) using:

pip install git+https://github.com/copasi/python-petab-importer.git

and you can run directly:

copasi_petab_import  [<petab_dir>]  <model_name> <output_dir>

Usage

Once installed, you can use the graphical user interface, specify the benchmark directory, select the test and the model, and you ought to be able to open the generated COPASI file directly. You do this by running:

python PEtab.py
<img src="./doc/demo.gif">

Alternatively you cold convert the benchmark models directly by invoking the converter:

python convert_petab.py <benchmark_dir> <model_name> <output_dir>

where:

Also added a bulk converter:

python convert_all_petab.py <base_dir> <output_dir>

where:

License

Just as COPASI, the packages available on this page are provided under the Artistic License 2.0, which is an OSI approved license. This license allows non-commercial and commercial use free of charge.