From 5264c49236c99d2ad71a1e093ea77c8fe220f0ee Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Thu, 1 Jun 2023 10:12:12 -0700 Subject: [PATCH] reordered cells to enable correct plotting (#204) Co-authored-by: Matthew Gregory Jones --- jupyter-book/trajectories/lineage_tracing.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jupyter-book/trajectories/lineage_tracing.ipynb b/jupyter-book/trajectories/lineage_tracing.ipynb index 0d57c6fc..4b38a109 100644 --- a/jupyter-book/trajectories/lineage_tracing.ipynb +++ b/jupyter-book/trajectories/lineage_tracing.ipynb @@ -1717,6 +1717,10 @@ } ], "source": [ + "tree.cell_meta = pd.DataFrame(\n", + " kptracer_adata.obs.loc[tree.leaves, \"Cluster-Name\"].astype(str)\n", + ")\n", + "\n", "cas.pl.plot_matplotlib(tree, meta_data=[\"Cluster-Name\"])" ] }, @@ -1749,10 +1753,6 @@ } ], "source": [ - "tree.cell_meta = pd.DataFrame(\n", - " kptracer_adata.obs.loc[tree.leaves, \"Cluster-Name\"].astype(str)\n", - ")\n", - "\n", "parsimony = cas.tl.score_small_parsimony(tree, meta_item=\"Cluster-Name\")\n", "\n", "plasticity = parsimony / len(tree.nodes)\n", @@ -2002,7 +2002,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.10.5 64-bit", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -2016,7 +2016,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.9.12" }, "vscode": { "interpreter": {