@@ -168,10 +168,7 @@ Such labels could be morphological regions annotated by pathologists.
168168
169169``` {r merfish-read}
170170dir.create(td <- tempfile())
171- pa <- unzip_spd_demo(
172- zipname="merfish.zarr.zip",
173- dest=td, source="biocOSN")
174- (x <- readSpatialData(pa, anndataR=FALSE))
171+ (x <- MouseBrainMERFISH(td))
175172```
176173
177174There are only ` r length(SpatialData::shape(x, "cells")) ` cells, but
@@ -207,10 +204,7 @@ Mouse intestine, 1GB; 4 image resolutions and 3 shapes at 2, 8, and 16 $\mu$m.
207204
208205``` {r visiumhd-read}
209206dir.create(td <- tempfile())
210- pa <- unzip_spd_demo(
211- zipname="visium_hd_3.0.0_io.zip",
212- dest=td, source="biocOSN")
213- (x <- readSpatialData(pa, images=4, shapes=3, tables=FALSE))
207+ (x <- MouseIntestineVisHD(td))
214208```
215209
216210``` {r visiumhd-plot}
@@ -226,10 +220,7 @@ Colorectal carcinoma, 25 MB; no shapes, no points.
226220
227221``` {r mibitof-read}
228222dir.create(td <- tempfile())
229- pa <- unzip_spd_demo(
230- zipname="mibitof.zip",
231- dest=td, source="biocOSN")
232- (x <- readSpatialData(pa, anndataR=FALSE))
223+ (x <- ColorectalCarcinomaMIBITOF(td))
233224```
234225
235226``` {r mibitof-plot, fig.width=10, fig.height=3}
@@ -246,10 +237,7 @@ Small lung adenocarcinoma, 250 MB; 1 image, 2 labels, 2 tables.
246237
247238``` {r mcmicro-read}
248239dir.create(td <- tempfile())
249- pa <- unzip_spd_demo(
250- zipname="mcmicro_io.zip",
251- dest=td, source="biocOSN")
252- (x <- readSpatialData(pa, anndataR=FALSE))
240+ x <- LungAdenocarcinomaMCMICRO(td)
253241```
254242
255243Getting channel names for the image:
@@ -273,34 +261,32 @@ plotSpatialData() + plotImage(x,
273261
274262``` {r steinbock-read}
275263dir.create(td <- tempfile())
276- pa <- unzip_spd_demo(
277- zipname="steinbock_io.zip",
278- dest=td, source="biocOSN")
279- x <- readSpatialData(pa, anndataR=FALSE)
264+ # x <- MulticancerSteinbock(td)
265+ # TODO: readSpatialData fails here, commenting out below code
280266```
281267
282268### channels
283269
284270``` {r steinbock-ch}
285- plotSpatialData() + plotImage(x,
286- i="Patient3_003_image",
287- ch=c(6, 22, 39),
288- c=c("blue", "cyan", "yellow"))
271+ # plotSpatialData() + plotImage(x,
272+ # i="Patient3_003_image",
273+ # ch=c(6, 22, 39),
274+ # c=c("blue", "cyan", "yellow"))
289275```
290276
291277### contrasts
292278
293279``` {r steinbock-cl, fig.width=9, fig.height=3}
294- i <- image(x, "Patient3_003_image")
295- image(x, "crop") <- i[, 200:400, 200:400]
296- lapply(list(c(0.2, 1), c(0, 0.8), c(0, 1.2)), \(.) {
297- plotSpatialData() + plotImage(x,
298- i="crop",
299- ch=c(6, 22, 39),
300- cl=list(1, 1, .),
301- c=c("blue", "cyan", "yellow")) +
302- ggtitle(sprintf("[%s, %s]", .[1], .[2]))
303- }) |> wrap_plots(nrow=1) + plot_layout(guides="collect")
280+ # i <- image(x, "Patient3_003_image")
281+ # image(x, "crop") <- i[, 200:400, 200:400]
282+ # lapply(list(c(0.2, 1), c(0, 0.8), c(0, 1.2)), \(.) {
283+ # plotSpatialData() + plotImage(x,
284+ # i="crop",
285+ # ch=c(6, 22, 39),
286+ # cl=list(1, 1, .),
287+ # c=c("blue", "cyan", "yellow")) +
288+ # ggtitle(sprintf("[%s, %s]", .[1], .[2]))
289+ # }) |> wrap_plots(nrow=1) + plot_layout(guides="collect")
304290```
305291
306292# Masking
0 commit comments