Skip to content

Candlelight-XYJ/MEGA-ODE

Repository files navigation

MEGA-ODE

MEGA-ODE: Biologically Structured, Generalizable and Navigable Continuous Perturbation Dynamics from Sparse Omics.

MEGA-ODE architecture overview

MEGA-ODE is a multi-level graph-based framework for generalizable and interpretable modeling of omics dynamics. It embeds prior biological knowledge by defining the ODE state space on a molecular interaction network parameterized by graph attention networks, and uses a mixture-of-experts architecture to capture heterogeneous dynamic behaviors across perturbations, timepoints, and molecular programs.

Collaborators

Highlights

  • MoE-based GraphODE for modeling heterogeneous perturbation dynamics.
  • Graph attention over prior biological networks for interpretable molecular interactions.
  • Generalization across unseen perturbations, unseen timepoints, and unseen molecular features.
  • Expert-level interpretation through gating scores and attention weights.
  • Applications to pathway-level causal structure, drug perturbation response, disease-severity gene prioritization, and stem-cell differentiation programs.

Installation

Clone the repository and install MEGA-ODE in editable mode:

git clone https://github.com/Candlelight-XYJ/MEGA-ODE.git
cd MEGA-ODE
pip install -e .

A conda environment file is also provided:

conda env create -f environment.yml
conda activate megaode
pip install -e .

Quick Start

Run the bundled demo with one function:

from megaode import run_demo

result = run_demo("demo_data/")

Use the model API directly:

from megaode import MEGAODE, load_demo_data

data = load_demo_data("demo_data/")
model = MEGAODE(
    in_feats=data.num_features,
    hidden_size=64,
    num_experts=4,
    out_feats=data.num_features,
    time_tick_num=5,
    gate_hidden_dim=32,
)

model.fit(data, epochs=100, lr=1e-3)
pred = model.predict(data, input_key="x36", output_index=3)

About

MEGA-ODE: Biologically Structured, Generalizable and Navigable Continuous Perturbation Dynamics from Sparse Omics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages