-
Notifications
You must be signed in to change notification settings - Fork 0
/
getting_started.qmd
52 lines (32 loc) · 3.27 KB
/
getting_started.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: "Getting Started"
format:
html:
code-link: true
---
If you are new to spatial omics data and would like to jump into some analysis, this page is a great place to start.
## What technologies is our software applicable to?
Our suite of packages is geared towards analysing single-cell resolution assays, and the workflow described here focuses on single-cell resolution assays that have spatial context, i.e., each of the cells has an x-y coordinate. Technologies that generate this type of data include Imaging Mass Cytometry, MIBI-TOF, Xenium, CosMx, and MERFISH.
Please check out our [scdney](https://sydneybiox.github.io/scdney/) suite of packages for how to analyse many different types of single cell resolution assays.
## Using our packages
It is important to know that our packages are interoperable with many other awesome packages out there. We highly recommend that you reflect on your needs or what you would like to find in *your data*, and then choose the analytical methods that will be most appropriate for *your data*.
To get started with our packages, we recommend that you read the descriptions of our packages on the [Software page](packages.qmd). Clicking on the beautiful hex stickers will take you to the package vignettes that will explain their functionality in depth.
We also recommend that you browse our analysis examples in the case studies chapter. Here, you will find the application of combinations of our packages to answer multi-component questions on a diverse range of spatially-resolved single-cell assays. While reading this, keep the specific assay in mind for context, but also recognize that most of the demonstrated analytical approaches can be applied to a wide range of assays.
## SpatialExperiment
In keeping with interoperability, we use the `SpatialExperiment` object from the [SpatialExperiment](https://www.bioconductor.org/packages/release/bioc/html/SpatialExperiment.html) package as the central linking framework across many of the packages.
```{r load libraries, echo=FALSE, results="hide", warning=FALSE}
suppressPackageStartupMessages({
library(readxl)
library(Seurat)
})
```
```{r, eval = FALSE}
library(readxl)
library(Seurat)
```
### Creating a SpatialExperiment
- The [vignette](https://www.bioconductor.org/packages/release/bioc/vignettes/SpatialExperiment/inst/doc/SpatialExperiment.html) for the SpatialExperiment package explains how to turn a `matrix` or `data.frame` into a `SpatialExperiment`.
- If you have a .csv file or a .xlsx file, this can be read into R using `read_csv()` and `read_xlsx()` from the `readxl` package and converted into a `matrix` or `data.frame`. You could also use `read.csv()` or `read.delim()` in base R.
- If you have a `Seurat` object, you can convert this to a `SingleCellExperiment` using the `as.SingleCellExperiment()` function or back again using `as.Seurat()`.
- A `SpatialExperiment` object is very similar to a `SingleCellExperiment` but with spatial coordinates stored in the `spatialCoords()` slot. Many people analyse spatial data using a `SingleCellExperiment` object with the spatial coordinates stored in `colData`. Most of our packages are accepting of this approach.
- For visualisations, we recommend duplicating your `spatialCoords()` in the `reducedDim()` slot and in the `colData`.