You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: materials/01-LoadingData.qmd
+61-22Lines changed: 61 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -316,34 +316,21 @@ To re-read the object later on, you can use:
316
316
```{r}
317
317
#| label: load-visium-object
318
318
#| eval: false
319
-
#| purl: false
320
319
321
320
# Load the Seurat object from disk
322
321
visium <- readRDS("results/visium_brain.rds")
323
322
```
324
323
325
-
<!--
326
-
Hugo note: I have for now commented this out, to keep things simple and focused on Visium, which forms the main component of the detailed workflow chapters. Perhaps these details can be added to the case study later on?
327
-
328
-
## Loading Xenium Data into Seurat
324
+
## Loading Xenium Data
329
325
330
326
If you are working with 10X Genomics Xenium data, you can use the `LoadXenium()` function to load the data into a Seurat object.
331
327
This function is specifically designed to handle the unique structure of Xenium data, which includes spatial transcriptomics data with high-resolution spatial coordinates and associated images.
332
328
333
-
::: {.callout-warning}
334
-
#### Xenium data is large!
335
-
336
-
Xenium datasets can be quite large, so make sure you have enough memory available to load the data.
337
-
If you encounter memory issues, consider using a machine with more RAM or using a subset of the data for analysis.
338
-
:::
339
-
340
329
We will use another dataset from the 10X examples.
341
330
The data is available on the 10X website and has been downloaded for you in the course materials at `data/human_melanoma_xenium`.
The FOV (Field of View) parameter allows you to specify which field of view to load if the dataset contains multiple fields.
353
340
In this case, we are loading the default field of view.
354
341
355
-
To visualise the Xenium data we will use the `ImageDimPlot()` function to plot the spatial distribution of cells or spots in the tissue slide.
356
-
We can also visualise the number of features measured in each location using `ImageFeaturePlot()`.
357
-
This shows that while the spatial resolution is very high, the number of features measured per location is quite low compared to other spatial transcriptomics technologies.
358
-
In this case only 382 genes were measured.
342
+
For single-cell resolution methods like Xenium, we can use the `ImageDimPlot()` function to plot the spatial distribution of cells or spots in the tissue slide:
359
343
360
344
```{r}
361
345
#| label: visualise-xenium-data
362
-
#| eval: false
363
-
#| purl: false
364
346
365
-
# Visualise the dots representing the locations of the transcripts on the tissue slide
347
+
# Visualise the locations of the transcripts on the tissue slide
366
348
ImageDimPlot(xenium)
349
+
```
350
+
351
+
We can also visualise the number of features measured in each location using `ImageFeaturePlot()`:
352
+
353
+
```{r}
354
+
#| label: visualise-xenium-nfeature
367
355
368
356
# Visualise the transcript density on the tissue slide
369
357
ImageFeaturePlot(
@@ -373,7 +361,58 @@ ImageFeaturePlot(
373
361
)
374
362
```
375
363
376
-
-->
364
+
This shows that while the spatial resolution is very high, the number of features measured per location is low compared to other spatial transcriptomics technologies.
365
+
In this case only `r nrow(xenium)` genes were measured, and the visualisation above shows the scale only going up to a maximum of 150 features detected per position.
366
+
367
+
We can compare the range of features detected between the two technologies here:
368
+
369
+
```{r}
370
+
#| label: compare-nfeature
371
+
372
+
# Summary of number of detected features
373
+
summary(xenium$nFeature_Xenium)
374
+
summary(visium$nFeature_Spatial)
375
+
```
376
+
377
+
You will explore this dataset more fully in the [_Xenium: Human Melanoma_ case study](11-XeniumExample.qmd).
378
+
379
+
::: {.callout-warning}
380
+
#### Xenium data is large!
381
+
382
+
Xenium datasets can be quite large, so make sure you have enough memory available to load the data.
383
+
If you encounter memory issues, consider using a machine with more RAM or using a subset of the data for analysis.
384
+
:::
385
+
386
+
## Example MERFISH file
387
+
388
+
As an example, we provide a pre-processed MERFISH file of the Human heart, which has been saved as a Seurat object:
0 commit comments