Demo 04 disease
In [ ]:
Copied!
"""Demo 04: Disease — perturbation effects and symptom detection."""
"""Demo 04: Disease — perturbation effects and symptom detection."""
In [ ]:
Copied!
from __future__ import annotations
from __future__ import annotations
In [ ]:
Copied!
import sys
from pathlib import Path
import sys
from pathlib import Path
In [ ]:
Copied!
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / "src"))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / "src"))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
In [ ]:
Copied!
import matplotlib
matplotlib.use("Agg")
import matplotlib
matplotlib.use("Agg")
In [ ]:
Copied!
from _core import demo_04_disease
from alienbio.viz import save_or_show
from _core import demo_04_disease
from alienbio.viz import save_or_show
In [ ]:
Copied!
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "04_disease"
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "04_disease"
In [ ]:
Copied!
def main() -> None:
symptoms, fig_traj, fig_symp = demo_04_disease()
print(f" Detected {len(symptoms)} symptom(s)")
save_or_show(fig_traj, OUTPUT / "diseased_trajectories.png")
save_or_show(fig_symp, OUTPUT / "symptoms.png")
print("demo_04_disease: OK")
def main() -> None:
symptoms, fig_traj, fig_symp = demo_04_disease()
print(f" Detected {len(symptoms)} symptom(s)")
save_or_show(fig_traj, OUTPUT / "diseased_trajectories.png")
save_or_show(fig_symp, OUTPUT / "symptoms.png")
print("demo_04_disease: OK")
In [ ]:
Copied!
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()