Skip to main content

Metabolic Analysis for Transdisciplinary Ecological Research

Project description

MATER

Metabolic Analysis for Transdisciplinary Ecological Research

[TOC]

📋 Requirements

  • Python 3.12 or higher

We recommend using one virtual environment per Python project to manage dependencies and maintain isolation. You can use a package manager like uv to help you with library dependencies and virtual environments.

📦 Install the Mater Package

Install the mater package via pip:

pip install mater

⚙️ Run a Simulation

The mater command line interface (CLI) makes it easy to run simulations. Ensure the required Excel input file (chose a compatible version) is located in the root of your working directory.

Run the following command to start a simulation from your excel file:

mater run -i <YOUR_INPUT_FILE_NAME>

📊 Visualize Variables

Simulation results are stored locally in Parquet (.mater) files.

User Interface

Results can be visualize in a built-in user interface. Go to the directory containing the result folder and use the following command :

mater plot -o <YOUR_RESULT_FOLDER_NAME>

Accessing the Results from a Python Script

Below is an example Python script using pandas and matplotlib to plot specific simulation results. Each folder in the output directory corresponds to a variable that can be loaded with pandas.

# Import the MATER package and matplotlib.pyplot
import matplotlib.pyplot as plt
from mater import Mater

# Create a Mater instance
model = Mater()

# Select the output directory where the run results are stored
model.set_output_dir()  # Defaults to the working directory

# Set the run directory name
model.set_run_name("run0")

# Get a variable
in_use_stock = model.get("in_use_stock")

# Transform the dataframe and plot the results
in_use_stock.groupby(level=["location", "object"]).sum().T.plot()
plt.show()

This example demonstrates how to access and plot variables from simulation outputs. Adjust the code to fit your analysis needs.

🤝 Contributing

We welcome contributions to the MATER project! To get started, please refer to the CONTRIBUTING file for detailed guidelines.

📚 Online Documentation

For more information, refer to the official MATER documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mater-0.7.1.tar.gz (613.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mater-0.7.1-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file mater-0.7.1.tar.gz.

File metadata

  • Download URL: mater-0.7.1.tar.gz
  • Upload date:
  • Size: 613.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for mater-0.7.1.tar.gz
Algorithm Hash digest
SHA256 964e245b00c62008ce885f9fb4a546c1c5ba3fdf9a0a5d20f6ee9f5b3d25a542
MD5 f97688f11aaf3ac7350cd11e53eec6ad
BLAKE2b-256 105d9e8024ef16b3f8ff0b6f4c7e90bc70c53e12e360a237375b41cb50ac8e92

See more details on using hashes here.

File details

Details for the file mater-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: mater-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for mater-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 671ea62f96f03caabe53a62748c08138311d2995d3644f6300f7a1000f4a8cb2
MD5 34e81f34b43752fdf5fbd1df42c33434
BLAKE2b-256 920247da7f800d241642b94a77cb1ed6e1dd7f9e5c65189eb23ebb960f94a40e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page