Skip to content

Commit 797766d

Browse files
Merge branch 'read_data' of github.com:dcgc-bfx/spatial-analysis-xenium-training into read_data
2 parents 6e4f554 + b39a973 commit 797766d

15 files changed

+972
-838
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.Rproj
2+
*.Rproj.user
3+
.Rhistory
4+
.RData
5+
.Ruserdata
6+
/.quarto/
7+
**/*.quarto_ipynb
8+
datasets/
9+
.Rproj.user

README.md

Lines changed: 10 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
![Banner](docs/spatial_banner.png)
1+
![Banner](docs/Xenium_banner.png)
22

3-
# Analysis of Spatial Transcriptomics Data (Visium HD)
3+
# Analysis of Spatial Transcriptomics Data (Xenium)
44

5-
Welcome to our **hands-on workbook collection** to learn spatial transcriptomics data analysis, with a focus on 10x Genomics Visium HD data!
5+
Welcome to our **hands-on workbook collection** to learn spatial transcriptomics data analysis, with a focus on 10x Genomics Xenium data!
66

7-
Spatial transcriptomics allows us to measure gene expression across tissue sections while preserving spatial information, helping us understand not just **what** genes are active, but **where** they are active.
7+
Spatial transcriptomics allows us to measure gene expression across tissue sections while preserving spatial information, helping us understand not just **which** genes are active, but also **where** they are active.
88

99
With our workbooks, you will explore how to analyze spatial transcriptomics data using **R** and **RStudio**. Whether you're new to spatial data or already familiar with single-cell workflows, our guides will walk you through the essential steps.
1010

@@ -16,18 +16,18 @@ With our workbooks, you will explore how to analyze spatial transcriptomics data
1616
- [Citation](#citation)
1717
- [Quick Start](#quick-start-)
1818

19-
## Workbooks overview 📘
19+
## Workbooks overview
2020

2121
Our workbooks cover:
2222

23-
- Learn how to load spatial data into R and examine how the data is structured
24-
- Key steps in the analysis workflow, including quality control, preprocessing, clustering and visualisation, cluster annotation, spatial clustering, and integration with single-cell transcriptomics data.
23+
- Learn how to [load spatial data into R](workbooks/read_dataset_to_seurat.qmd) and examine how the data is structured
24+
- Key steps in the [analysis workflow](workbooks/analyze_spatial_dataset.qmd), including quality control, preprocessing, clustering and visualisation, cluster annotation, spatial clustering, and reference mapping.
2525

26-
## Credits 👥
26+
## Credits
2727

28-
The workbooks are being written by [Katrin Sameith](https://github.com/ktrns) and [Andreas Petzold](https://github.com/andpet0101) at the [DRESDEN-concept Genome Center](https://genomecenter.tu-dresden.de/about-us).
28+
The workbooks are being written by [Katrin Sameith](https://github.com/ktrns), [Andreas Petzold](https://github.com/andpet0101), [Ulrike Friedrich](https://github/ulrikefriedrich), and [Rajinder Gupta](https://github.com/rajinder4489) at the [DRESDEN-concept Genome Center](https://genomecenter.tu-dresden.de/about-us).
2929

30-
## Contributions 🤝
30+
## Contributions
3131

3232
We welcome contributions! To contribute:
3333

@@ -39,49 +39,5 @@ We welcome contributions! To contribute:
3939

4040
If you used our workbooks to analyze your data, please cite it by mentioning the DRESDEN-concept Genome Center URL "https://genomecenter.tu-dresden.de".
4141

42-
## Quick Start 🚀
43-
44-
On a linux laptop, you can get started right away using our containerized environment:
45-
46-
```bash
47-
# Clone the repository
48-
git clone git@github.com:dcgc-bfx/2025-ngs-cn-summer-school.git
49-
50-
# Container image
51-
SINGULARITY_IMAGE=oras://gcr.hrz.tu-chemnitz.de/dcgc-bfx/singularity/singularity-single-cell:Unstable
52-
53-
# Set user, password and port
54-
export SINGULARITYENV_RSTUDIO_USER=$(whoami)
55-
export SINGULARITYENV_RSTUDIO_PASSWORD="verysecret"
56-
export SINGULARITYENV_RSTUDIO_PORT=9999
57-
58-
# Define temporary directory
59-
workdir=...
60-
mkdir -p ${workdir}/singularity ${workdir}/tmp ${workdir}/rserver
61-
62-
# Start R-Server
63-
singularity exec \
64-
--cleanenv \
65-
--scratch /run,/var/lib/rstudio-server \
66-
--workdir ${workdir}/singularity \
67-
--bind ${workdir}/tmp \
68-
--bind ${workdir}/rserver \
69-
${SINGULARITY_IMAGE} \
70-
micromamba run --name single-cell /usr/lib/rstudio-server/bin/rserver --server-user=${SINGULARITYENV_RSTUDIO_USER} --www-port=${SINGULARITYENV_RSTUDIO_PORT}
71-
```
72-
73-
Once you have started Rstudio with our container, you can start your analysis.
74-
75-
- Open your web browser (we recommend Chrome or Firefox).
76-
- Navigate to:
77-
- `localhost:${SINGULARITYENV_RSTUDIO_PORT}`
78-
- Log in with the credentials:
79-
- Username: `${SINGULARITYENV_RSTUDIO_USER}`
80-
- Password: `${SINGULARITYENV_RSTUDIO_PASSWORD}`
81-
- Download required datasets with the `datasets/download.R` script
82-
- Open `workbooks/read_dataset_to_seurat.qmd`
83-
84-
You're now ready to explore the workbooks in a fully configured RStudio environment!
85-
8642
**Happy coding & exploring spatial data!**
8743

_quarto.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ project:
22
type: "default"
33
execute-dir: "project"
44
render:
5-
- "workbooks/our_first_workbook.qmd"
65
- "workbooks/read_dataset_to_seurat.qmd"
76
- "workbooks/analyze_spatial_dataset.qmd"
87

@@ -12,26 +11,30 @@ project:
1211
execute:
1312
echo: true
1413
warning: false
14+
message: false
1515

1616
#################
1717
# Knitr options #
1818
#################
1919
knitr:
2020
opts_chunk:
21-
dpi: 400
21+
timeit: true
22+
dpi: 200
2223
fig-width: 8
2324
fig-height: 5
2425
dev:
2526
- "png"
2627
dev.args:
2728
png:
2829
type: "cairo"
29-
30+
3031
##################
3132
# Format options #
3233
##################
3334
format:
3435
html:
36+
toc: true
37+
toc-location: left
3538
theme:
3639
- "serif"
3740
- "css/html.scss"

datasets/download.R

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ curl::curl_download(url="https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_
1010
destfile="datasets/Xenium_Prime_Mouse_Brain_Coronal_FF_outs.zip")
1111
unzip(zipfile="datasets/Xenium_Prime_Mouse_Brain_Coronal_FF_outs.zip", exdir="datasets/xenium_mouse_brain")
1212
unlink("datasets/Xenium_Prime_Mouse_Brain_Coronal_FF_outs.zip")
13-
untar("datasets/xenium_mouse_brain/cell_feature_matrix.tar.gz", exdir="output_dir")
13+
untar("datasets/xenium_mouse_brain/cell_feature_matrix.tar.gz", exdir="datasets/xenium_mouse_brain/")
1414

1515

1616
# Download H&E images
@@ -19,3 +19,15 @@ curl::curl_download(url="https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_
1919
curl::curl_download(url="https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Brain_Coronal_FF/Xenium_Prime_Mouse_Brain_Coronal_FF_he_imagealignment.csv",
2020
destfile="datasets/xenium_mouse_brain/Xenium_Prime_Mouse_Brain_Coronal_FF_he_imagealignment.csv")
2121

22+
23+
# Allen Brain Atlas from Seurat Visium HD vignette. Seurat object. Reduced to 200,000 cells (and rare cell types <25 cells have been removed).
24+
curl::curl_download(url="https://www.dropbox.com/scl/fi/r1mixf4eof2cot891n215/allen_scRNAseq_ref.Rds?rlkey=ynr6s6wu1efqsjsu3h40vitt7&dl=1",
25+
destfile="datasets/allen_scRNAseq_ref.Rds")
26+
27+
# Pre-computed SpaNorm data
28+
h = curl::new_handle()
29+
curl::handle_setopt(handle=h, userpwd="XpC3kSoZQqt2kYK:1234")
30+
curl::handle_setheaders(h, "X-Requested-With"="XMLHttpRequest")
31+
curl::curl_download(url="https://datashare.tu-dresden.de/public.php/webdav/",
32+
destfile="datasets/spanorm.rds",
33+
handle=h)

docs/DcGC_Bfx_GitHub.png

696 KB
Loading

docs/DcGC_Bfx_Team.png

2.22 MB
Loading

docs/DcGC_LinkedIn.png

890 KB
Loading

docs/SpatialAnalysisFlowchart.png

101 KB
Loading

docs/Xenium_banner.png

1.08 MB
Loading

docs/spatial_banner.png

-1.27 MB
Binary file not shown.

0 commit comments

Comments
 (0)