-
Notifications
You must be signed in to change notification settings - Fork 1
/
1_setup.qmd
104 lines (71 loc) · 3.74 KB
/
1_setup.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
title: "Setup"
engine: knitr
---
## Material
{{< downloadthis assets/pdf/01_introduction.pdf dname="01_introduction" label="Download the presentation" icon="filetype-pdf" >}}
## Exercises
### Login and set up
Log in to Rstudio server with the provided link, username and password.
### Create a project
Now that you have access to an environment with the required installations, we will set up a project in a new directory. On the top right choose the button **Project (None)** and select **New Project...**
![](assets/images/create_new_project.png){width=200}
Continue by choosing **New Directory**
![](assets/images/choose_new_directory.png){width=300}
As project type select **New Project**
![](assets/images/choose_new_project.png){width=300}
Finally, type in the project name. This should be `spatial_transcriptomics_course`. Finish by clicking **Create Project**.
![](assets/images/define_directory_name.png){width=300}
Now that we have setup a project and a project directory (it is in `/home/rstudio/spatial_transcriptomics_course`), we can download the data that is required for this course. We will use the built-in terminal of Rstudio. To do this, select the **Terminal** tab:
![](assets/images/select_terminal_tab.png){width=300}
### Downloading the course data
To download and extract the dataset, copy-paste these commands inside the terminal tab:
```{bash}
#| output: false
mkdir -p course_data/Anterior
mkdir -p course_data/Posterior
# Anterior
cd course_data/Anterior
LINK_PREFIX=https://cf.10xgenomics.com/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Anterior/V1_Mouse_Brain_Sagittal_Anterior
curl -o filtered_feature_bc_matrix.h5 "$LINK_PREFIX"_filtered_feature_bc_matrix.h5
curl -o spatial.tar.gz "$LINK_PREFIX"_spatial.tar.gz
curl -o web_summary.html "$LINK_PREFIX"_web_summary.html
tar -xf spatial.tar.gz
rm spatial.tar.gz
# Posterior
cd ../Posterior
LINK_PREFIX=https://cf.10xgenomics.com/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Posterior/V1_Mouse_Brain_Sagittal_Posterior
curl -o filtered_feature_bc_matrix.h5 "$LINK_PREFIX"_filtered_feature_bc_matrix.h5
curl -o spatial.tar.gz "$LINK_PREFIX"_spatial.tar.gz
curl -o web_summary.html "$LINK_PREFIX"_web_summary.html
tar -xf spatial.tar.gz
rm spatial.tar.gz
```
Have a look at the data directory you have downloaded. It should contain the required data for two slices, the anterior side of a sagittal brain slice, and a posterior side:
```
course_data/
├── Anterior
│ ├── filtered_feature_bc_matrix.h5
│ ├── spatial
│ │ ├── aligned_fiducials.jpg
│ │ ├── detected_tissue_image.jpg
│ │ ├── scalefactors_json.json
│ │ ├── tissue_hires_image.png
│ │ ├── tissue_lowres_image.png
│ │ └── tissue_positions_list.csv
│ └── web_summary.html
└── Posterior
├── filtered_feature_bc_matrix.h5
├── spatial
│ ├── aligned_fiducials.jpg
│ ├── detected_tissue_image.jpg
│ ├── scalefactors_json.json
│ ├── tissue_hires_image.png
│ ├── tissue_lowres_image.png
│ └── tissue_positions_list.csv
└── web_summary.html
4 directories, 16 files
```
This data is provided by 10x genomics, and further information, like material and methods can be found here:
- Anterior: [https://www.10xgenomics.com/datasets/mouse-brain-serial-section-1-sagittal-anterior-1-standard-1-1-0](https://www.10xgenomics.com/datasets/mouse-brain-serial-section-1-sagittal-anterior-1-standard-1-1-0)
- Posterior: [https://www.10xgenomics.com/datasets/mouse-brain-serial-section-1-sagittal-posterior-1-standard-1-1-0](https://www.10xgenomics.com/datasets/mouse-brain-serial-section-1-sagittal-posterior-1-standard-1-1-0)