11## CSAMA
22
3- ### preamble
3+ In this demo, we'll be analyzing 5K-plex Xenium (10x Genomics)
4+ data on a tissue section from a human breast cancer biopsy,
5+ derived from [ here] ( https://www.10xgenomics.com/datasets/xenium-prime-ffpe-human-breast-cancer ) .
6+ These include the following elements:
7+
8+ - two ` image ` s (histology and immunofluorescence)
9+ - two ` shape ` s (nuclei and membrane boundaries)
10+ - one ` table ` (gene $\times$ cell data)
11+ - one ` point ` (RNA transcripts)
12+
13+ A size-reduced example dataset has been deposited on Zenodo.
14+ We'll first retrieve the compressed * .zarr* store programatically,
15+ decompress it, and stash the data's on-disk file path for later:
16+
17+ ``` {r load-zarr}
18+ # retrieve .zarr store from the web
19+ url <- "https://zenodo.org/records/20083116/files/BC_xenium_sdata_lowres.zarr.zip?download=1"
20+ zip <- tempfile("sd", fileext=".zarr.zip")
21+ download.file(url, zip, quiet=TRUE)
22+ # decompress, stash & view contents
23+ nm <- unzip(zip, exdir=dirname(zip))
24+ zs <- grepv("zarr$", dirname(nm))
25+ ```
26+
27+ ``` {r show-zarr, echo=FALSE}
28+ htmltools::pre(
29+ style="max-height:400px; overflow-y:auto;",
30+ paste(capture.output(fs::dir_tree(zs, recurse = 2)), collapse="\n"))
31+ ```
32+
33+ ### dependencies
434
535``` {r load-libs, message=FALSE, warning=FALSE}
636library(sf)
@@ -16,21 +46,6 @@ library(SpatialData.plot)
1646library(SingleCellExperiment)
1747```
1848
19- ### data
20-
21- A size-reduced example dataset has been deposited on Zenodo.
22- We'll first retrieve the compressed * .zarr* store programatically,
23- decompress it, and stash the data's on-disk file path for later:
24-
25- ``` {r load-zarr}
26- url <- "https://zenodo.org/records/20083116/files/BC_xenium_sdata_lowres.zarr.zip?download=1"
27- zip <- tempfile("sd", fileext=".zarr.zip")
28- download.file(url, zip, quiet=TRUE)
29- nm <- unzip(zip, exdir=dirname(zip))
30- zs <- grepv("zarr$", dirname(nm))
31- basename(zs)
32- ```
33-
3449### setup
3550
3651We can instruct our session to use an existing environment with our Python
0 commit comments