|
190 | 190 | "source": [
|
191 | 191 | "from spatialdata import get_extent\n",
|
192 | 192 | "\n",
|
193 |
| - "data_extent = get_extent(sdata[\"Visium_HD_Mouse_Small_Intestine_full_image\"], coordinate_system=\"global\")\n", |
| 193 | + "data_extent = get_extent(\n", |
| 194 | + " sdata[\"Visium_HD_Mouse_Small_Intestine_full_image\"], coordinate_system=\"Visium_HD_Mouse_Small_Intestine\"\n", |
| 195 | + ")\n", |
194 | 196 | "data_extent"
|
195 | 197 | ]
|
196 | 198 | },
|
|
208 | 210 | " min_coordinate=[data_extent[\"x\"][0], data_extent[\"y\"][0]],\n",
|
209 | 211 | " max_coordinate=[data_extent[\"x\"][1], data_extent[\"y\"][1]],\n",
|
210 | 212 | " axes=(\"x\", \"y\"),\n",
|
211 |
| - " target_coordinate_system=\"global\",\n", |
| 213 | + " target_coordinate_system=\"Visium_HD_Mouse_Small_Intestine\",\n", |
212 | 214 | ")\n",
|
213 | 215 | "sdata[\"queried_cytassist\"] = queried_cytassist"
|
214 | 216 | ]
|
|
254 | 256 | "\n",
|
255 | 257 | "\n",
|
256 | 258 | "crop0(sdata).pl.render_images(\"Visium_HD_Mouse_Small_Intestine_full_image\").pl.show(\n",
|
257 |
| - " ax=axes[0], title=\"Full image\", coordinate_systems=\"global\"\n", |
| 259 | + " ax=axes[0], title=\"Full image\", coordinate_systems=\"Visium_HD_Mouse_Small_Intestine\"\n", |
258 | 260 | ")\n",
|
259 | 261 | "crop0(sdata).pl.render_images(\"queried_cytassist\").pl.show(\n",
|
260 |
| - " ax=axes[1], title=\"CytAssit image\", coordinate_systems=\"global\"\n", |
| 262 | + " ax=axes[1], title=\"CytAssit image\", coordinate_systems=\"Visium_HD_Mouse_Small_Intestine\"\n", |
261 | 263 | ")"
|
262 | 264 | ]
|
263 | 265 | },
|
|
601 | 603 | "gene_name = \"AA986860\"\n",
|
602 | 604 | "\n",
|
603 | 605 | "for bin_size in [16, 8]:\n",
|
604 |
| - " sdata_small.pl.render_images(\"Visium_HD_Mouse_Small_Intestine_hires_image\").pl.render_shapes(\n", |
| 606 | + " sdata_small.pl.render_images(\"Visium_HD_Mouse_Small_Intestine_full_image\").pl.render_shapes(\n", |
605 | 607 | " f\"Visium_HD_Mouse_Small_Intestine_square_{bin_size:03}um\", color=gene_name, cmap=new_cmap\n",
|
606 | 608 | " ).pl.show(coordinate_systems=\"Visium_HD_Mouse_Small_Intestine\", title=f\"bin_size={bin_size}µm\", figsize=(10, 10))"
|
607 | 609 | ]
|
|
641 | 643 | " )\n",
|
642 | 644 | "\n",
|
643 | 645 | "\n",
|
644 |
| - "crop1(sdata_small).pl.render_images(\"Visium_HD_Mouse_Small_Intestine_hires_image\").pl.render_shapes(\n", |
| 646 | + "crop1(sdata_small).pl.render_images(\"Visium_HD_Mouse_Small_Intestine_full_image\").pl.render_shapes(\n", |
645 | 647 | " \"Visium_HD_Mouse_Small_Intestine_square_002um\", color=gene_name, cmap=new_cmap, method=\"matplotlib\"\n",
|
646 | 648 | ").pl.show(coordinate_systems=\"Visium_HD_Mouse_Small_Intestine\", title=\"bin_size=2µm\", figsize=(10, 10))"
|
647 | 649 | ]
|
|
772 | 774 | "outputs": [],
|
773 | 775 | "source": [
|
774 | 776 | "%%time\n",
|
775 |
| - "crop1(sdata).pl.render_images(\"Visium_HD_Mouse_Small_Intestine_hires_image\").pl.render_shapes(\n", |
| 777 | + "crop0(sdata).pl.render_images(\"Visium_HD_Mouse_Small_Intestine_full_image\").pl.render_shapes(\n", |
776 | 778 | " \"Visium_HD_Mouse_Small_Intestine_square_016um\", color=\"Cluster\"\n",
|
777 | 779 | ").pl.show(coordinate_systems=\"Visium_HD_Mouse_Small_Intestine\", title=\"bin_size=016µm\", figsize=(10, 10))"
|
778 | 780 | ]
|
|
0 commit comments