Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix heading and img urls #135

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions docs/source/tutorial_gallery/Data_Prep_Guide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"\n",
"For the purposes of Bento, we will represent data as `Points` (molecules) and `Shapes` (cell & nuclear boundaries). Gene expression is automatically calculated from spatially aggregating transcript counts by shapes and saved as a `Table`.\n",
"\n",
"# Loading platform-specific data\n",
"## Platform-specific data\n",
"\n",
"Steps to ingest your data will depend on how it was generated. Data from some platforms should work out of the box while others will require some more custom formatting.\n",
"\n",
Expand All @@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {
"metadata": {}
},
Expand All @@ -74,8 +74,8 @@
"import seaborn as sns\n",
"import spatialdata as sd\n",
"from cellpose import models\n",
"from cellpose.io import imread\n",
"from shapely.geometry import Polygon\n",
"from skimage.io import imread\n",
"from skimage.measure import find_contours\n",
"from spatialdata.models import PointsModel, ShapesModel"
]
Expand All @@ -91,18 +91,18 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {
"metadata": {}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fb53cf64b20>"
"<matplotlib.image.AxesImage at 0x7f136e3e6050>"
]
},
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -118,7 +118,9 @@
}
],
"source": [
"img = imread(\"/mnt/d/bento-tools/bento/datasets/tutorial/cell_stain.tif\")\n",
"img = imread(\n",
" \"https://github.com/ckmah/bento-tools/raw/master/bento/datasets/tutorial/cell_stain.tif\"\n",
")\n",
"plt.imshow(img, \"binary_r\")"
]
},
Expand All @@ -131,18 +133,18 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {
"metadata": {}
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fb5394cc0a0>"
"<matplotlib.image.AxesImage at 0x7f136c2091e0>"
]
},
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -315,7 +317,7 @@
}
],
"source": [
"img2 = imread(\"/mnt/d/bento-tools/bento/datasets/tutorial/nuclear_stain.tif\")\n",
"img2 = imread(\"https://github.com/ckmah/bento-tools/raw/master/bento/datasets/tutorial/nuclear_stain.tif\")\n",
"plt.imshow(img2, \"binary_r\")"
]
},
Expand Down Expand Up @@ -599,7 +601,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Save data as SpatialData object\n",
"### Save SpatialData object\n",
"\n",
"Finally, we will save the data as a `SpatialData` object. We use each element type's `parse()` method to guarantee that we have formatted the data correctly.\n",
"\n",
Expand Down
Loading