Skip to content

Commit

Permalink
Fix comp syntax (#300)
Browse files Browse the repository at this point in the history
* New mamba action

Signed-off-by: zethson <lukas.heumos@posteo.net>

* Fix comp syntax

---------

Signed-off-by: zethson <lukas.heumos@posteo.net>
  • Loading branch information
Zethson committed Sep 21, 2024
1 parent 6461a5c commit 6ff9120
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
47 changes: 27 additions & 20 deletions jupyter-book/conditions/compositional.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@
}
],
"source": [
"pt.pl.coda.boxplots(\n",
"sccoda_model.plot_boxplots(\n",
" sccoda_data,\n",
" modality_key=\"coda\",\n",
" feature_name=\"condition\",\n",
Expand Down Expand Up @@ -855,7 +855,7 @@
}
],
"source": [
"pt.pl.coda.stacked_barplot(\n",
"sccoda_model.plot_stacked_barplot(\n",
" sccoda_data, modality_key=\"coda\", feature_name=\"condition\", figsize=(4, 2)\n",
")\n",
"plt.show()"
Expand Down Expand Up @@ -1265,7 +1265,7 @@
}
],
"source": [
"pt.pl.coda.effects_barplot(sccoda_data, \"coda\", \"condition\")\n",
"sccoda_model.plot_effects_barplot(sccoda_data, \"coda\", \"condition\")\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -1386,8 +1386,6 @@
"adata.layers[\"logcounts\"] = sc.pp.log1p(adata.layers[\"counts\"]).copy()\n",
"adata.X = adata.layers[\"logcounts\"].copy()\n",
"sc.pp.neighbors(adata, n_neighbors=10, n_pcs=30, random_state=1234)\n",
"\n",
"# Calculate UMAP for visualization purposes\n",
"sc.tl.umap(adata)"
]
},
Expand All @@ -1414,7 +1412,10 @@
},
"pycharm": {
"name": "#%%\n"
}
},
"tags": [
"hide-output"
]
},
"outputs": [
{
Expand Down Expand Up @@ -1895,7 +1896,7 @@
}
],
"source": [
"pt.pl.coda.draw_tree(tasccoda_data)"
"tasccoda_model.plot_draw_tree(tasccoda_data)"
]
},
{
Expand Down Expand Up @@ -2002,7 +2003,11 @@
"cell_type": "code",
"execution_count": 26,
"id": "68cca84d",
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -2839,7 +2844,7 @@
}
],
"source": [
"pt.pl.coda.draw_effects(\n",
"tasccoda_model.plot_draw_effects(\n",
" tasccoda_data,\n",
" modality_key=\"coda\",\n",
" tree=\"tree\",\n",
Expand Down Expand Up @@ -2868,7 +2873,7 @@
}
],
"source": [
"pt.pl.coda.draw_effects(\n",
"tasccoda_model.plot_draw_effects(\n",
" tasccoda_data,\n",
" modality_key=\"coda\",\n",
" tree=\"tree\",\n",
Expand Down Expand Up @@ -2897,7 +2902,7 @@
}
],
"source": [
"pt.pl.coda.draw_effects(\n",
"tasccoda_model.plot_draw_effects(\n",
" tasccoda_data,\n",
" modality_key=\"coda\",\n",
" tree=\"tree\",\n",
Expand Down Expand Up @@ -2948,7 +2953,9 @@
}
],
"source": [
"pt.pl.coda.effects_barplot(tasccoda_data, modality_key=\"coda\", covariates=\"condition\")"
"tasccoda_model.plot_effects_barplot(\n",
" tasccoda_data, modality_key=\"coda\", covariates=\"condition\"\n",
")"
]
},
{
Expand Down Expand Up @@ -2992,7 +2999,7 @@
],
"source": [
"kwargs = {\"ncols\": 3, \"wspace\": 0.25, \"vcenter\": 0, \"vmax\": 1.5, \"vmin\": -1.5}\n",
"pt.pl.coda.effects_umap(\n",
"tasccoda_model.plot_effects_umap(\n",
" tasccoda_data,\n",
" effect_name=[\n",
" \"effect_df_condition[T.Salmonella]\",\n",
Expand Down Expand Up @@ -4022,7 +4029,7 @@
"source": [
"milo.build_nhood_graph(mdata)\n",
"with matplotlib.rc_context({\"figure.figsize\": [10, 10]}):\n",
" pt.pl.milo.nhood_graph(mdata, alpha=0.1, min_size=5, plot_edges=False)\n",
" milo.plot_nhood_graph(mdata, alpha=0.1, min_size=5, plot_edges=False)\n",
" sc.pl.umap(mdata[\"rna\"], color=\"cell_label\", legend_loc=\"on data\")"
]
},
Expand Down Expand Up @@ -4087,7 +4094,7 @@
}
],
"source": [
"pt.pl.milo.da_beeswarm(mdata)\n",
"milo.plot_da_beeswarm(mdata)\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -4207,7 +4214,7 @@
],
"source": [
"with matplotlib.rc_context({\"figure.figsize\": [10, 10]}):\n",
" pt.pl.milo.nhood_graph(mdata, alpha=0.1, min_size=5, plot_edges=False)"
" milo.plot_nhood_graph(mdata, alpha=0.1, min_size=5, plot_edges=False)"
]
},
{
Expand Down Expand Up @@ -4236,7 +4243,7 @@
}
],
"source": [
"pt.pl.milo.da_beeswarm(mdata)\n",
"milo.plot_da_beeswarm(mdata)\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -4287,7 +4294,7 @@
"]\n",
"\n",
"plt.title(\"Enterocyte\")\n",
"pt.pl.milo.nhood_counts_by_cond(\n",
"milo.plot_nhood_counts_by_cond(\n",
" mdata, test_var=\"Hpoly_timecourse\", subset_nhoods=entero_ixs\n",
")\n",
"plt.show()\n",
Expand All @@ -4299,7 +4306,7 @@
" & (mdata[\"milo\"].var[\"nhood_annotation\"] == \"Tuft\")\n",
"]\n",
"plt.title(\"Tuft cells\")\n",
"pt.pl.milo.nhood_counts_by_cond(\n",
"milo.plot_nhood_counts_by_cond(\n",
" mdata, test_var=\"Hpoly_timecourse\", subset_nhoods=tuft_ixs\n",
")\n",
"plt.show()"
Expand Down Expand Up @@ -4811,7 +4818,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.12.2"
},
"vscode": {
"interpreter": {
Expand Down
2 changes: 1 addition & 1 deletion jupyter-book/conditions/perturbation_modeling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.2"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 6ff9120

Please sign in to comment.