Skip to content

Commit 946a5e7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent abb8d7b commit 946a5e7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

notebooks/examples/napari_rois.ipynb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,9 +1143,7 @@
11431143
"\n",
11441144
"for shape in [\"lasso\", \"my_shapes\", \"my_shapes_2\"]:\n",
11451145
" for polygon in visium_sdata[shape].geometry:\n",
1146-
" table = polygon_query(\n",
1147-
" visium_sdata, polygon=polygon, target_coordinate_system=\"aligned\"\n",
1148-
" )[\"table\"]\n",
1146+
" table = polygon_query(visium_sdata, polygon=polygon, target_coordinate_system=\"aligned\")[\"table\"]\n",
11491147
" filtered_tables_unmerged[shape].append(table)\n",
11501148
" filtered_tables[shape] = ad.concat(filtered_tables_unmerged[shape])"
11511149
]
@@ -1302,9 +1300,7 @@
13021300
"categories = [\"unassigned\"] + list(filtered_tables.keys())\n",
13031301
"n = len(visium_sdata[\"table\"])\n",
13041302
"\n",
1305-
"visium_sdata[\"table\"].obs[\"annotation\"] = pd.Categorical(\n",
1306-
" [\"unassigned\" for _ in range(n)], categories=categories\n",
1307-
")\n",
1303+
"visium_sdata[\"table\"].obs[\"annotation\"] = pd.Categorical([\"unassigned\" for _ in range(n)], categories=categories)\n",
13081304
"\n",
13091305
"for shape, subtable in filtered_tables.items():\n",
13101306
" in_shape = subtable.obs.index\n",
@@ -1389,9 +1385,8 @@
13891385
"plt.figure(figsize=(12, 7))\n",
13901386
"ax = plt.gca()\n",
13911387
"(\n",
1392-
" visium_sdata.pl.render_images(\n",
1393-
" \"CytAssist_FFPE_Human_Breast_Cancer_full_image\"\n",
1394-
" ).pl.render_shapes(\"CytAssist_FFPE_Human_Breast_Cancer\", color=\"annotation\")\n",
1388+
" visium_sdata.pl.render_images(\"CytAssist_FFPE_Human_Breast_Cancer_full_image\")\n",
1389+
" .pl.render_shapes(\"CytAssist_FFPE_Human_Breast_Cancer\", color=\"annotation\")\n",
13951390
" # .pl.render_shapes(\"lasso\", color=\"#00000040\")\n",
13961391
" # .pl.render_shapes(\"my_shapes\", color=\"#00000040\")\n",
13971392
" # .pl.render_shapes(\"my_shapes_2\", color=\"#00000040\")\n",

0 commit comments

Comments
 (0)