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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mater-0.7.0.tar.gz.
File metadata
- Download URL: mater-0.7.0.tar.gz
- Upload date:
- Size: 614.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1c38436d02242d8bf014e884517e4ed8715be8cb2b16e5fe07b8cc4c2436809
|
|
| MD5 |
ed064191bdb41948221d7951bb237248
|
|
| BLAKE2b-256 |
58aa1ba6108961abbd78fdbffe60ced7e7aa858f1b9508cdb94f1dcc62234cff
|
File details
Details for the file mater-0.7.0-py3-none-any.whl.
File metadata
- Download URL: mater-0.7.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ef3b07e0af0aefeb831d951413f146382d71fc9d2b8c2d63f85b5b2703a103f
|
|
| MD5 |
c64af80b9a7e61262d097adf75d01f03
|
|
| BLAKE2b-256 |
c52b25d7b04eb51abd51a29967a7cfb300da28c8eadd12a32aa31a8851fb5008
|