PyEnzyme is the interface to the data model EnzymeML and offers a convenient way to document and model research data. Lightweight syntax for rapid development of data management solution in enzymology and biocatalysis.
Get started with PyEnzyme by running the following command
# Using PyPI
python -m pip install pyenzyme
Or build by source
git clone https://github.com/EnzymeML/PyEnzyme.git
cd PyEnzyme
python3 setup.py install
PyEnzyme comes with many flavors, choose whether you want only the base installation, the modeling package or all of it using the following options.
# COPASI - modeling
python -m pip install "pyenzyme[copasi]"
# PySCeS - modeling
python -m pip install "pyenzyme[pysces]"
# Modeling package
python -m pip install "pyenzyme[modeling]"
# REST API
python -m pip install "pyenzyme[rest]"
# Dataverse
python -m pip install "pyenzyme[dataverse]"
# Complete
python -m pip install "pyenzyme[all]"
If you want to deploy PyEnzyme as a server and use our REST-API to access PyEnzyme from any HTTP-capable programming language, use our official docker image or simply copy and past the following.
docker pull enzymeml/pyenzyme:latest
docker run -p 8000:8000 enzymeml/pyenzyme:latest
See the API documentation for details on our endpoints. You can also use our self-hosted PyEnzyme instance if you have no server space - Use https://api.enzymeml.org as base URL to the endpoints.
This example will demonstrate how to create a simple EnzymeML document using PyEnzyme and how to use initializers from official databases Chebi and UniProt to gather metadata. For more examples, please visit our documentation (Work in progress)
import pyenzyme as pe
# Initialize your document
enzmldoc = pe.EnzymeMLDocument(name="MyDoc")
# Create a vessel and add it to the document
vessel = pe.Vessel(name="Falcon Tube", volume=10.0, unit="ml")
vessel_id = enzmldoc.addVessel(vessel)
# Set up reactants and proteins from databases
protein = pe.Protein.fromUniProtID(
uniprotid="P07327", vessel_id=vessel_id,
init_conc=10.0, unit="fmole / l"
)
substrate = pe.Reactant.fromChebiID(
chebi_id="CHEBI:16236", vessel_id=vessel_id,
init_conc=200.0, unit="mmole / l"
)
product = pe.Reactant.fromChebiID(
chebi_id="CHEBI:15343", vessel_id=vessel_id,
init_conc=0.0, unit="mmole / l"
)
# ... and add each to the document
protein_id = enzmldoc.addProtein(protein)
substrate_id = enzmldoc.addReactant(substrate)
product_id = enzmldoc.addReactant(product)
# Build the reaction
reaction = pe.EnzymeReaction.fromEquation(
equation="ethanol -> acetaldehyde",
modifiers=[protein_id],
name="Alocohol dehydrogenation",
enzmldoc=enzmldoc
)
# ... and add it to the document
reaction_id = enzmldoc.addReaction(reaction)
# Finally, save the document to an OMEX archive
enzmldoc.toFile(".", name="ADH Experiment")
(Code should run as it is)
Explore all the features of PyEnzyme in our documentation and take part in Discussions and/or Issues.
PyEnzyme
is free and open-source software licensed under the BSD 2-Clause License.