Unified Mechanistic Inference from Multimodal Imaging and Counts
Project description
U-MIMIC
Unified Mechanistic Inference from Multimodal Imaging and Counts
Developed by: Data Analysis Team @KaziLab.se
U-MIMIC is a Python package for modeling and analyzing tumor population dynamics under drug treatment. It combines mechanistic simulation with statistical inference to support both in-vitro and in-vivo experimental workflows.
Features
- Mechanistic dynamics -- ODE, Gillespie SSA, and tau-leaping simulation of P/Q/A/R cell-state models with dose-response modulation
- Pharmacokinetics -- One- and two-compartment PK models with flexible dosing
schedules, unified via
ExposureProfile - Observation models -- Cell counts (Negative Binomial), bioluminescence
imaging, tumor volume, and biomarkers; combinable via
MultimodalObservation - Inference -- MLE (multi-start), MCMC (emcee/PyMC), SMC, Kalman filtering, and hierarchical Bayesian estimation
- Public datasets -- Loaders for BESTDR, PhenoPop, Hafner/Niepel GR, TSHS Tumor Growth, and NCI-60
- CLI --
umimic simulate,fit,generate,dashboardcommands with YAML configuration and run logging
Installation
pip install .
With optional extras:
pip install ".[inference]" # MCMC backends (emcee, PyMC)
pip install ".[dashboard]" # Streamlit dashboard
pip install ".[all]" # Everything
Requires Python >= 3.11.
Quickstart
CLI
# Run a dose-response simulation
umimic simulate --drug-type cytotoxic --output results/sim
# Fit model to data
umimic fit --config experiment.yaml --data data.csv --output results/fit
# Generate synthetic data
umimic generate --config experiment.yaml --output results/synthetic
Python API
from umimic.pipeline.config import ExperimentConfig
from umimic.pipeline.experiment import Experiment
config = ExperimentConfig(
dosing={"concentrations": [0, 0.1, 1, 10]},
simulation={"method": "ode", "t_max": 72.0},
)
exp = Experiment(config)
# Simulate
results = exp.simulate(concentrations=[0, 0.1, 1, 10])
# Generate synthetic data and fit
dataset = exp.generate_synthetic()
result = exp.fit(dataset)
print(result.mle.parameters)
Configuration
U-MIMIC uses YAML configuration validated by Pydantic. See docs/configuration.md for the full reference.
Minimal example:
name: my_experiment
dynamics:
states: [P, Q]
dosing:
concentrations: [0, 0.1, 0.3, 1, 3, 10, 30]
simulation:
method: gillespie
t_max: 72.0
inference:
mode: mle
n_restarts: 5
Run Logging
CLI commands support execution logging:
umimic simulate --output results/sim --log-file results/sim/run.log --log-level DEBUG
If --log-file is not provided, a timestamped log file is written to the
command output directory. Logging uses a package-scoped logger (umimic) and
does not interfere with other logging configuration.
Documentation
Full documentation is available on Read the Docs. To build locally:
pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html
Contributing
See CONTRIBUTING.md for development setup, code style, and how to add new simulation methods, observation models, or dataset loaders.
Changelog
See CHANGELOG.md for version history.
License
MIT
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 umimic-0.0.2.tar.gz.
File metadata
- Download URL: umimic-0.0.2.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4573856d74b7e55844575386d4af0ceafa7f88374d71ece340550708fb4e3f55
|
|
| MD5 |
435a295cff816b2de89dbf9c0261e906
|
|
| BLAKE2b-256 |
6f00b93b5485ae6844d9e460a47263ecc3aa555e82c184303616a14e6184437c
|
File details
Details for the file umimic-0.0.2-py3-none-any.whl.
File metadata
- Download URL: umimic-0.0.2-py3-none-any.whl
- Upload date:
- Size: 70.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60df80343d44179bf1d72e7cef3836930f16e7470138afedf0aa603b082c02ad
|
|
| MD5 |
98c6f03e7e7194e762723aecbc10ba68
|
|
| BLAKE2b-256 |
9a2f974f0628aa812cde1a6411ee7d2b8865c6c2607573d760b96f9c2521cf42
|