3. Visualization#

[8]:
import sys
import os
import importlib
import pickle
import veloev as vev
os.makedirs("figs", exist_ok=True)
[9]:
with open("benchmark_info.pkl", "rb") as f:
    benchmark_info = pickle.load(f)

3.1 Task specific visualization#

3.1.1 Directional consistency#

Directional consistency evaluates biological plausibility using cross-boundary directional correctness (CBDir) and in-cluster coherence (ICVCoh).

[10]:
my_colors =  {'bar1': "#5b7e91",'bar2': "#e4ab9b",'rank_low': "#bf794e",'rank_high': "#e6b422"}
vev.viz.plot_task(benchmark_info, plot_type='directional',
                  color_palette=my_colors, base_dir='./demo', save_path="./figs/directional_summary.png")
Figure saved to ./figs/directional_summary.png
../_images/tutorials_03_visualization_5_1.png

3.1.2 Temporal prediction#

Temporal precision assesses the accuracy of inferred CLT via cluster temporal ordering (CTO) and temporal Spearman correlation (TSC).

[11]:
my_colors =  {'bar1': "#5b7e91",'bar2': "#e4ab9b",'rank_low': "#bf794e",'rank_high': "#e6b422"}
vev.viz.plot_task(benchmark_info, plot_type='temporal',
                  color_palette=my_colors, base_dir='./demo', save_path="./figs/temporal_summary.png")
Figure saved to ./figs/temporal_summary.png
../_images/tutorials_03_visualization_7_1.png

3.1.3 Negative control robustness#

Negative control robustness assesses the ability to avoid spurious dynamics in mature cell populations using the self-transition score (STS) and effective entropy score (EES).

[12]:
my_colors =  {'bar1': "#5b7e91",'bar2': "#e4ab9b",'rank_low': "#bf794e",'rank_high': "#e6b422"}
vev.viz.plot_task(benchmark_info, plot_type='negative_control',
                  color_palette=my_colors, base_dir='./demo', save_path="./figs/negative_control_summary.png")
Figure saved to ./figs/negative_control_summary.png
../_images/tutorials_03_visualization_9_1.png

3.2 Overall performance visualization#

[13]:
my_colors =  {'rank_low': "#bf794e",'rank_high': "#e6b422"}
type_colors = {'directional': '#ae7c58', 'temporal': '#6b6f59', 'negative_control': '#6c848d'}
vev.viz.plot_overall(benchmark_info, include_types=['directional', 'temporal','negative_control'],
                     color_palette=my_colors, type_colors=type_colors,
                     base_dir='./demo', save_path='./figs/overall_summary.png')
Figure saved to ./figs/overall_summary.png
../_images/tutorials_03_visualization_11_1.png