Skip to content

EnzymeML/PyEnzyme

Repository files navigation

PyEnzyme
v1.1.5 Build Badge Documentation Status

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.

🧬 Features

  • Reproducible documentation of enzymatic and biocatalytic experiments.
  • Import from and export to the SBML-based markup language EnzymeML and more.
  • Perform database-specific validation prior to database upload.
  • Model your data using a Thin Layer to popular modeling platforms.
  • Visualize experimental results for inspection and publication.

⚡️ Quick start

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

⚙️ Package Options

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]"

🚀 PyEnzyme's REST-API

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.

⚙️ Example code

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)

📖 Documentation and more examples

Explore all the features of PyEnzyme in our documentation and take part in Discussions and/or Issues.

⚠️ License

PyEnzyme is free and open-source software licensed under the BSD 2-Clause License.

About

🧬 - Data management and modeling framework based on EnzymeML.

Resources

License

Stars

Watchers

Forks

Packages

No packages published