Command Line Interface
This notebook shows the command line interface of yaml2sbml
, using the “Lotka Volterra” example. For details on * the definition of the .yaml
file * simulation of the SBML model using AMICI (Python) * fitting the PEtab problem using pyPESTO (Python),
see the corresponding notebook
YAML validation:
yaml2sbml
allows to validate the input YAML
via
yaml2sbml_validate <yaml_inout_file>
[1]:
!yaml2sbml_validate ../Lotka_Volterra_python/Lotka_Volterra_basic.yml
Path to yaml file: ../Lotka_Volterra_python/Lotka_Volterra_basic.yml
Validating...
YAML file is valid ✅
SBML generation
yaml2sbml
generates an **SBML** via
yaml2sbml <yaml_input_file> <sbml_output_file>
[2]:
!yaml2sbml ../Lotka_Volterra_python/Lotka_Volterra_basic.yml Lotka_Volterra_basic.xml
Path to yaml file: ../Lotka_Volterra_python/Lotka_Volterra_basic.yml
Path to sbml file: Lotka_Volterra_basic.xml
Converting...
PEtab generation:
The basic way of generating **PEtab** tables is given by
yaml2petab <yaml_input_file> <petab_output_directory> <model_name>
[3]:
# create target directory, if it doesn't exist yet
!mkdir -p ./Lotka_Volterra_PEtab/
# needed .yml /measurement files in current directory.
!cp ../Lotka_Volterra_python/Lotka_Volterra_PEtab/measurement_table.tsv ./Lotka_Volterra_PEtab/
!cp ../Lotka_Volterra_python/Lotka_Volterra_PEtab.yml .
[4]:
# This is the actual command
!yaml2petab Lotka_Volterra_PEtab.yml ./Lotka_Volterra_PEtab Lotka_Volterra
Path to yaml file: Lotka_Volterra_PEtab.yml
Output directory: ./Lotka_Volterra_PEtab
Path to sbml/petab files: Lotka_Volterra
Converting...
Further Options:
Two further optional arguments to the yaml2petab
command allow to create a PEtab yaml file and a measurement table. A PEtab yaml allows for a easier input of a PEtab problem to some toolboxes: * In the directory , given by --petab_yaml
, a yaml file, that groups the PEtab problem, will be created. * --measurement_table
allows to specify the measurement table. This option is only possible in combination with --petab_yaml
.
[5]:
# now generate the PEtab table:
!yaml2petab Lotka_Volterra_PEtab.yml ./Lotka_Volterra_PEtab Lotka_Volterra --petab_yaml petab_problem.yml --measurement_table measurement_table.tsv
Path to yaml file: Lotka_Volterra_PEtab.yml
Output directory: ./Lotka_Volterra_PEtab
Path to sbml/petab files: Lotka_Volterra
Converting...
Checking the PEtab files
Finally, PEtab offers a PEtab-linter (no output = no error found). (This is a feature of the PEtab python library, not of yaml2sbml.)
[6]:
!petablint -vy Lotka_Volterra_PEtab/petab_problem.yml
Checking SBML model...
Checking measurement table...
Checking condition table...
Checking observable table...
Checking parameter table...
OK