Skip to main content

EMASP

Elementary Modes of metabolic networks using Answer Set Programming (ASP) :

  • Elementary Flux Modes (EFM) with emasp efm enumerate ...

Install

EMASP is available in pypi :

pip install emasp

If you cannot use the pypi packages (OS support, or versions), you can also use the development version (see below).

EFM enumeration

EFM computation details

# EFM illustrated by a Carlson 2004 example, available on the git :
cd example/

# EFM enumeration : 1658 EFM
emasp efm enumerate carlson_2004.xml
emasp efm enumerate carlson_2004.xml -o efms.jsonl # File output

# EFM with enzyme cost constraint. Try betas in the [1,10] range to see effect of threshold on EFM count
emasp efm enumerate carlson_2004.xml --enzymatic-cost 1 --kcat-csv apparent_kcat_carlson_2004.csv --csv-delimiter ';' --mass-value 100000 # ~134 EFM
emasp efm enumerate carlson_2004.xml --enzymatic-cost 10 --kcat-csv apparent_kcat_carlson_2004.csv --csv-delimiter ';' --mass-value 100000 # ~809 EFM

# EFM with thermodynamic constraint : ~1133 EFM
emasp efm enumerate carlson_2004.xml --csv-delimiter ';' --thermodynamic --concentration-csv concentration_carlson.csv --deltag0-csv deltaGo_carlson.csv

# EFM with both constraints : ~618 EFM
emasp efm enumerate carlson_2004.xml --enzymatic-cost 10 --kcat-csv apparent_kcat_carlson_2004.csv --csv-delimiter ';' --mass-value 100000 --thermodynamic --concentration-csv concentration_carlson.csv --deltag0-csv deltaGo_carlson.csv

# Advanced users mode for ASP-speaking-people : equivalent to above, but provides access to ASP code for inspection or tweaks.
emasp efm model-to-asp carlson_2004.xml -o model.clp # Encode SBML model to ASP
emasp efm enzymatic-cost-to-asp model.clp --beta 10 --kcat-csv apparent_kcat_carlson_2004.csv --csv-delimiter ';' --mass-value 100000 -o enzyme_cost.clp # Optional: generate enzyme cost constraints
emasp efm thermodynamics-to-asp model.clp --deltag0-csv deltaGo_carlson.csv --concentration-csv concentration_carlson.csv --csv-delimiter ';' -o thermo.clp # Optional: generate thermodynamic constraints
emasp efm clingolpx model.clp enzyme_cost.clp thermo.clp # Perform enumeration with explicit ASP files. 

EFM workflow

EFM output example : the first 10 EFMs for the carlson_2004.xml example. Each EFM is a JSON object on 1 line.

Example of Python code to read the set of EFMs as Python objects.

References

  • Emma Crisci, Maxime Mahout, Sabine Peres. Computing Thermodynamically Consistent Elementary Flux Modes with Answer Set Programming. CMSB 2024 - 22nd International Conference Computational Methods in Systems Biology, Sep 2024, Pise, Italy. pp.80-88, hal-04707880

Useful tools

Development

Run the development version from git

Clone the git and install the dependencies using the tool of your choice.

For example, with uv :

git clone https://gitlab.inria.fr/erable/emasp.git
cd emasp
uv run emasp

C++ module

EMASP includes a C++ compiled module for fast output formatting, as the pure Python formatter slows the enumeration speed by 2. A C/C++ compiler must be installed on your system (apt install binutils on Debian / Ubuntu). You can disable the C++ module during package build with the EMASP_DISABLE_CPP environment variable as a fallback :

# UV example
uv clean # clean package cache
EMASP_DISABLE_CPP=1 uv pip install . # force rebuild the package without C++
uv run emasp ... # will use a slower python fallback

Roadmap / todo

Optional

  • Extension CI tests ?
  • thermodynamics constraints : retrieve deltaG0 from iQ (separate command). Currently, only present as an example python script
  • mparser: Load model from other formats ?
  • EFM enumeration CSV output ? (id, flux_reaction_0, ..., flux_reaction_n)
  • Enzyme cost: get kcat / enzyme mass from SBML ? Some code left to read from sbml
  • Remove C++ formatter if too brittle ? Formatting cost will be on small benchmarks

Release process

Use cibuildwheel to generate wheels for many python versions. Then upload to pypi manually ; less fragile than doing it through the CI.

Linux is easily covered by this. Windows and MacOS : maybe use the free github runners by referencing this as an external project ? TODO

There is an option to generate a pure python package with the no CPP option.

Metadata

Release files for emasp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emasp 1.0.0
File Size Uploaded Provenance Actions
emasp-1.0.0.tar.gz 34.5 kB Without provenance Details for emasp-1.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for emasp 1.0.0
File Actions
emasp-1.0.0-py3-none-any.whl Python 3 none any Details for emasp-1.0.0-py3-none-any.whl
emasp-1.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp315-cp315t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp315-cp315t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp315-cp315-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp315-cp315-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ x86-64, Linux glibc 2.28+ x86-64 Details for emasp-1.0.0-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
emasp-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details for emasp-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
emasp-1.0.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details for emasp-1.0.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Total release size: 11.7 MB

Release files / emasp-1.0.0.tar.gz

Download URL emasp-1.0.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
747d0aaf0ad1911d7212e5f76233f75c31840d1734f866157b23feb151a627b9
BLAKE2b-256 checksum
How to use checksums
d36e04c603290fcb75fc74f22d386a0abe744895dc9fda6a20f5f607d8f5f477
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-py3-none-any.whl

Download URL emasp-1.0.0-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
464d9ef0fe92c5e7f98fb30b415680b44a5a573c3cf772cddc48c4bb75ebcdde
BLAKE2b-256 checksum
How to use checksums
928998f4a86f77ecb87d51e4d49449fd5a5909ff89b63e6ea71de528503131e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
438ec3ddd8d2e81517802cbe0ce69066a0b25ee690e3a97f094eacd94e77c400
BLAKE2b-256 checksum
How to use checksums
f010902f4fbb1660cd6bb89177398e8c224fc6a628f9da9a124c5852b9c8e09d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp315-cp315t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp315-cp315t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 259.9 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f9d10cdf9e00dc1f005997589f7604ccfd938cc603a9656b768015dfbc1203ca
BLAKE2b-256 checksum
How to use checksums
d08660bfbc001a7a980e28112f979165c11d0807b698069a9dfed2a5ba2e0212
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp315-cp315-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp315-cp315-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
fec7e804e33f3383d4aee86c5f03b873c90b3e344e6a3d78c704b8b3c3aef486
BLAKE2b-256 checksum
How to use checksums
6f22a119827ca954114f28dffc3bbbbd6d87442638ae291eeb91ed4ab850f253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 260.6 kB
Tags CPython 3.15 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
43c044a481a5dddd4e9e6dff13b8361ff7b32b33408bea3554af5bc0a41a0732
BLAKE2b-256 checksum
How to use checksums
b0493e6433bf70620e11c45454117d73282e911d820280aa19b5e9d51c0e5695
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
ea7a26f7361ea0173d9d6a11a8770497d384cac718489fe1762b65fc847922e1
BLAKE2b-256 checksum
How to use checksums
56df5c08508663fd8532c559554b20852e361a54a84dff2bade003b6b1e33573
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 265.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
febdf8be51ccccd09ef79e7cec99e89f1630929b48ea8a92a3e332afe1fbf9cc
BLAKE2b-256 checksum
How to use checksums
9202e8716132a589202d6dcdd83a08e69aef1f96ba533dbe82fad0aecaef1106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
2b6a5563d9128d225c6abbede85ce63124cc193c0d82de31db47b2ffa243bc3c
BLAKE2b-256 checksum
How to use checksums
de0053ef86d2b071807897a4cee0bd4f845655870bac3a8d3bee79e8ed928896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 260.1 kB
Tags CPython 3.14 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
45ba814ca77d49cfecfc496cb2d3f44690f80f6c0edb6531da416e8ee1711370
BLAKE2b-256 checksum
How to use checksums
a48d78e54d686d1e5fb2a06cb1e8faf22a12fcbcea3e1c1974e575560782f3b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
372825e8c4377ea8cfbc21e068e506972d833645edf1e3e35c063c461a74e170
BLAKE2b-256 checksum
How to use checksums
952dc85344adfa7be3eb279f88747cb1c1ec22d337fb05e93f86932087ed4439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 260.0 kB
Tags CPython 3.13 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
53a7beb1597e4f4734046ec733b5c3fad4cb19d3ffb54a176ea30f2b79a880b4
BLAKE2b-256 checksum
How to use checksums
e8001115d16efa8b9efa8cfc039a2737f8990a8b814992fb75dc62951a5e74aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
0b1d9ac4a07729a3965c9ffeb1efc0e2a9c367463fee8b4eb717558bcf1655aa
BLAKE2b-256 checksum
How to use checksums
a3bb0807d7e1ef2f10f118cec5258b988b6b3d1ebf3b18ebfdc475f78effef33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 260.0 kB
Tags CPython 3.12 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
165939fba09b08a9c3f53a90d30bddfe81cb6882a3f7c9e942186129c5fa7ba7
BLAKE2b-256 checksum
How to use checksums
3302ae7f867d2e963dbd85eb8548a38e44a002c20579045f73d5a7773db44f88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
2cdd9485f6acbda7b9014ce9043afeb35f00dafc76f860704f70abf949750fa6
BLAKE2b-256 checksum
How to use checksums
2fd14b6266ced11d350e136b65458e3dc0ff6eef69cc74f61f834acecd3497cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 259.7 kB
Tags CPython 3.11 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f0258927523d4974c32736717c7bcfba01d58e8ea2dba84386c57e87b8d859a7
BLAKE2b-256 checksum
How to use checksums
1c85d46f4aeda7ddc9848ab4df2e319293ff90d51de657a9655f8ccb47da4bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL emasp-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
22e4f2550ad85bed7815335270adfd199f7114e8565b690ffaeb83c9def71216
BLAKE2b-256 checksum
How to use checksums
3cf69a9c34415afff1f91a55f0a7bd634a2d56d6aa50863eba3c6103e415347e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / emasp-1.0.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL emasp-1.0.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 259.7 kB
Tags CPython 3.10 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0a63d4cb8797aaa76434ebd5fb90439a32d438d5b1251bfc7ec7ed585eb613c4
BLAKE2b-256 checksum
How to use checksums
062ac5f02675f3620aa561bb64c0c6ee2812b6c7d7667d8a541c84a7ce619eda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for emasp 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

18 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page