From 320d3a51f667dedaab7046aed28d8f9cea1dc30f Mon Sep 17 00:00:00 2001 From: pswain <peter.swain@ed.ac.uk> Date: Thu, 2 May 2024 12:19:57 +0100 Subject: [PATCH] change: updated to match new dataloader --- examples/plot_kymograph.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/examples/plot_kymograph.py b/examples/plot_kymograph.py index c6d468b..0a31406 100644 --- a/examples/plot_kymograph.py +++ b/examples/plot_kymograph.py @@ -1,30 +1,27 @@ -from wela.dataloader import dataloader -from wela.plotting import kymograph, plot_lineage - -# from genutils import figs2pdf import matplotlib.cm - +from wela.figs2pdf import figs2pdf +from wela.dataloader import dataloader, sort_df +from wela.plotting import kymograph, plot_lineage datasets = ["Pdr5_3_11_22", "Pdr5_flc_10ugml_1676"] for dataname in datasets: - dl = dataloader(".", "/Users/pswain/wip/tsv_data") + dl = dataloader(".", "/Users/pswain/wip/tsv_data/pdr_with_gr/") dl.load(dataname, use_tsv=True) - df = dl.get_sorted_df("median_GFP") + sdf = sort_df(dl.df, "median_GFP") title = dataname.split(".")[0] - kymograph(df, hue="buddings", title=title) - kymograph(df, hue="median_GFP", title=title) + kymograph(sdf, hue="buddings", title=title) + kymograph(sdf, hue="median_GFP", title=title) kymograph( - df, + sdf, hue="bud_growth_rate", title=title, vmin=-50, vmax=50, cmap=matplotlib.cm.Spectral, ) - # df.id = df.id.astype("object") - # df.to_csv(dataname + ".tsv", sep="\t", index=False) -# figs2pdf("fluconazole") + if False: + figs2pdf("fluconazole") plot_lineage(dl.ids[34], dl.df) -- GitLab