Combo ecosystem
In [ ]:
Copied!
"""Combo: Ecosystem — organism heatmap and envelope violations."""
"""Combo: Ecosystem — organism heatmap and envelope violations."""
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 combo_ecosystem
from alienbio.viz import save_or_show
from _core import combo_ecosystem
from alienbio.viz import save_or_show
In [ ]:
Copied!
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "combo_ecosystem"
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "combo_ecosystem"
In [ ]:
Copied!
def main() -> None:
fig_heat, fig_env = combo_ecosystem()
save_or_show(fig_heat, OUTPUT / "heatmap.png")
save_or_show(fig_env, OUTPUT / "envelope.png")
print("combo_ecosystem: OK")
def main() -> None:
fig_heat, fig_env = combo_ecosystem()
save_or_show(fig_heat, OUTPUT / "heatmap.png")
save_or_show(fig_env, OUTPUT / "envelope.png")
print("combo_ecosystem: OK")
In [ ]:
Copied!
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()