Getting Started
What is PyEnzyme?
Section titled “What is PyEnzyme?”PyEnzyme is the Python interface to the EnzymeML data model, offering a convenient way to document and model research data. With its lightweight syntax, PyEnzyme enables rapid development of data management solutions in enzymology and biocatalysis.
PyEnzyme provides reproducible documentation of enzymatic and biocatalytic experiments, allowing you to import from and export to the EnzymeML format and more. You can fetch entities from official databases like CheBI, UniProt, PubChem, RHEA, and PDB, and visualize experimental results for inspection and publication.
Quick Start
Section titled “Quick Start”Here’s a quick example showing what PyEnzyme can do. This snippet demonstrates creating an EnzymeML document, fetching data from databases, and working with measurements:
import pyenzyme as pe
# Create a simple EnzymeML documentenzmldoc = pe.EnzymeMLDocument(name="My Experiment")
# Add a vessel (reaction container)vessel = enzmldoc.add_to_vessels( id="vessel_1", name="Vessel 1", volume=1.0, unit="l", # Units are automatically converted)
# Fetch a protein from UniProtprotein = pe.fetch_uniprot("P07327", vessel_id=vessel.id)enzmldoc.proteins.append(protein)
# Fetch a reaction from RHEA databasereaction, participants = pe.fetch_rhea("RHEA:22864", vessel_id=vessel.id)enzmldoc.small_molecules += participantsenzmldoc.reactions.append(reaction)
# Parse experimental data from a filemeasurements = pe.from_excel( path="measurements.xlsx", data_unit="mmol / l", time_unit="h",)enzmldoc.measurements += measurements
# Save to EnzymeML formatpe.write_enzymeml(enzmldoc, "enzmldoc.json")
# Load from EnzymeML formatenzmldoc = pe.read_enzymeml("enzmldoc.json")This example shows how PyEnzyme simplifies working with enzymatic data by automatically handling unit conversions, fetching metadata from databases, and providing a clean interface for creating structured experimental documentation.
Next Steps
Section titled “Next Steps”Ready to get started? Follow these guides to set up PyEnzyme and begin creating your own EnzymeML documents: