Skip to content

Commit f585bb6

Browse files
author
Czarnewski
committed
fix typo and removes unused files
1 parent b105c87 commit f585bb6

13 files changed

+45
-40872
lines changed

labs/compiled/scater/scater_07_spatial.Rmd

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Seurat: Spatial Transcriptomics"
2+
title: "Scater/Scran:: Spatial Transcriptomics"
33
author: "Åsa Björklund & Paulo Czarnewski"
44
date: '`r format(Sys.Date(), "%B %d, %Y")`'
55
output:
@@ -23,7 +23,7 @@ output:
2323
collapsed: false
2424
smooth_scroll: true
2525
toc_depth: 3
26-
editor_options:
26+
editor_options:
2727
chunk_output_type: console
2828
---
2929

@@ -39,7 +39,6 @@ p.caption {font-size: 0.9em;font-style: italic;color: grey;margin-right: 10%;mar
3939
# Spatial transcriptomics
4040
***
4141

42-
This tutorial is adapted from the Seurat vignette: https://satijalab.org/seurat/v3.2/spatial_vignette.html
4342

4443
Spatial transcriptomic data with the Visium platform is in many ways similar to scRNAseq data. It contains UMI counts for 5-20 cells instead of single cells, but is still quite sparse in the same way as scRNAseq data is, but with the additional information about spatial location in the tissue.
4544

@@ -97,9 +96,9 @@ suppressPackageStartupMessages(require(cowplot))
9796
We can first load and merge the objects into one SCE object.
9897

9998
```{r}
100-
sce.a <- Spaniel::createVisiumSCE(tenXDir="data/visium/Anterior",
99+
sce.a <- Spaniel::createVisiumSCE(tenXDir="data/visium/Anterior",
101100
resolution="Low")
102-
sce.p <- Spaniel::createVisiumSCE(tenXDir="data/visium/Posterior",
101+
sce.p <- Spaniel::createVisiumSCE(tenXDir="data/visium/Posterior",
103102
resolution="Low")
104103
105104
sce <- cbind(sce.a , sce.p)
@@ -191,8 +190,8 @@ Select all spots with less than 25% mitocondrial reads, less than 20% hb-reads a
191190

192191

193192
```{r}
194-
sce <- sce[ , sce$detected > 500 &
195-
sce$subsets_mt_percent < 25 &
193+
sce <- sce[ , sce$detected > 500 &
194+
sce$subsets_mt_percent < 25 &
196195
sce$subsets_hb_percent < 20]
197196
dim(sce)
198197
```
@@ -339,7 +338,7 @@ plot_grid(ncol=2, plotlist = plist)
339338

340339
Quite often there are strong batch effects between different ST sections, so it may be a good idea to integrate the data across sections.
341340

342-
We will do a similar integration as in the Data Integration lab.
341+
We will do a similar integration as in the Data Integration lab.
343342

344343
```{r}
345344
mnn_out <- batchelor::fastMNN(sce, subset.row = hvgs,
@@ -513,7 +512,7 @@ Next, we select the highly variable genes that are present in both datasets.
513512
#Find common highly variable genes
514513
common_hvgs <- allen.hvgs[allen.hvgs %in% hvgs]
515514
516-
#Predict cell classes
515+
#Predict cell classes
517516
pred.grun <- SingleR(test=sce.anterior[common_hvgs,],
518517
de.n = 20,
519518
ref=allen_reference_sce[common_hvgs,],
@@ -522,7 +521,7 @@ pred.grun <- SingleR(test=sce.anterior[common_hvgs,],
522521
523522
#Transfer the classes to the SCE object
524523
sce.anterior$cell_prediction <- pred.grun$labels
525-
sce.anterior@colData <- cbind(sce.anterior@colData,
524+
sce.anterior@colData <- cbind(sce.anterior@colData,
526525
as.data.frame.matrix(table(list(1:ncol(sce.anterior),sce.anterior$cell_prediction))))
527526
```
528527

labs/compiled/scater/scater_07_spatial.html

+17-20,315
Large diffs are not rendered by default.

labs/compiled/scater/scater_07_spatial.md

+10-20,309
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading

labs/convert_scanpy_labs.R

-110
This file was deleted.

labs/environment_r.yml

-62
This file was deleted.

labs/environment_r2.yml

-42
This file was deleted.

labs/scanpy/environment_scanpy.yaml

-14
This file was deleted.

labs/scater/scater_07_spatial.Rmd

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
title: "Seurat: Spatial Transcriptomics"
2+
title: "Scater/Scran:: Spatial Transcriptomics"
33
#CSS_ALL:
4-
editor_options:
4+
editor_options:
55
chunk_output_type: console
66
---
77

88
#CHUNK_OPT:
99

1010
#ST_TITLE:
1111

12-
This tutorial is adapted from the Seurat vignette: https://satijalab.org/seurat/v3.2/spatial_vignette.html
1312

1413
#ST_ALL1:
1514

@@ -63,9 +62,9 @@ suppressPackageStartupMessages(require(cowplot))
6362
We can first load and merge the objects into one SCE object.
6463

6564
```{r}
66-
sce.a <- Spaniel::createVisiumSCE(tenXDir="data/visium/Anterior",
65+
sce.a <- Spaniel::createVisiumSCE(tenXDir="data/visium/Anterior",
6766
resolution="Low")
68-
sce.p <- Spaniel::createVisiumSCE(tenXDir="data/visium/Posterior",
67+
sce.p <- Spaniel::createVisiumSCE(tenXDir="data/visium/Posterior",
6968
resolution="Low")
7069
7170
sce <- cbind(sce.a , sce.p)
@@ -154,8 +153,8 @@ plot_grid(ncol=2, plotlist = plist)
154153

155154

156155
```{r}
157-
sce <- sce[ , sce$detected > 500 &
158-
sce$subsets_mt_percent < 25 &
156+
sce <- sce[ , sce$detected > 500 &
157+
sce$subsets_mt_percent < 25 &
159158
sce$subsets_hb_percent < 20]
160159
dim(sce)
161160
```
@@ -298,7 +297,7 @@ plot_grid(ncol=2, plotlist = plist)
298297

299298
#ST_ALL8:
300299

301-
We will do a similar integration as in the Data Integration lab.
300+
We will do a similar integration as in the Data Integration lab.
302301

303302
```{r}
304303
mnn_out <- batchelor::fastMNN(sce, subset.row = hvgs,
@@ -466,7 +465,7 @@ Next, we select the highly variable genes that are present in both datasets.
466465
#Find common highly variable genes
467466
common_hvgs <- allen.hvgs[allen.hvgs %in% hvgs]
468467
469-
#Predict cell classes
468+
#Predict cell classes
470469
pred.grun <- SingleR(test=sce.anterior[common_hvgs,],
471470
de.n = 20,
472471
ref=allen_reference_sce[common_hvgs,],
@@ -475,7 +474,7 @@ pred.grun <- SingleR(test=sce.anterior[common_hvgs,],
475474
476475
#Transfer the classes to the SCE object
477476
sce.anterior$cell_prediction <- pred.grun$labels
478-
sce.anterior@colData <- cbind(sce.anterior@colData,
477+
sce.anterior@colData <- cbind(sce.anterior@colData,
479478
as.data.frame.matrix(table(list(1:ncol(sce.anterior),sce.anterior$cell_prediction))))
480479
```
481480

0 commit comments

Comments
 (0)