forked from hemberg-lab/scRNA.seq.course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
17-exprs-overview-reads.Rmd
100 lines (89 loc) · 2.33 KB
/
17-exprs-overview-reads.Rmd
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
---
output: html_document
---
## Data visualization (Reads)
```{r, message=FALSE, warning=FALSE}
library(scater)
options(stringsAsFactors = FALSE)
reads <- readRDS("tung/reads.rds")
reads.qc <- reads[rowData(reads)$use, colData(reads)$use]
endog_genes <- !rowData(reads.qc)$is_feature_control
```
```{r, echo=FALSE}
library(knitr)
opts_chunk$set(out.width='90%', fig.align = 'center')
```
```{r expr-overview-pca-before-qc-reads1, fig.cap = "PCA plot of the tung data"}
plotPCA(
reads[endog_genes, ],
exprs_values = "counts",
colour_by = "batch",
size_by = "total_features",
shape_by = "individual"
)
```
```{r expr-overview-pca-before-qc-reads2, fig.cap = "PCA plot of the tung data"}
plotPCA(
reads[endog_genes, ],
exprs_values = "logcounts_raw",
colour_by = "batch",
size_by = "total_features",
shape_by = "individual"
)
```
```{r expr-overview-pca-after-qc-reads, fig.cap = "PCA plot of the tung data"}
plotPCA(
reads.qc[endog_genes, ],
exprs_values = "logcounts_raw",
colour_by = "batch",
size_by = "total_features",
shape_by = "individual"
)
```
```{r expr-overview-tsne-before-qc-reads, fig.cap = "tSNE map of the tung data"}
plotTSNE(
reads[endog_genes, ],
exprs_values = "logcounts_raw",
perplexity = 130,
colour_by = "batch",
size_by = "total_features",
shape_by = "individual",
rand_seed = 123456
)
```
```{r expr-overview-tsne-after-qc-reads, fig.cap = "tSNE map of the tung data"}
plotTSNE(
reads.qc[endog_genes, ],
exprs_values = "logcounts_raw",
perplexity = 130,
colour_by = "batch",
size_by = "total_features",
shape_by = "individual",
rand_seed = 123456
)
```
```{r expr-overview-tsne-after-qc-exercise2-1, fig.cap = "tSNE map of the tung data (perplexity = 10)", echo=FALSE}
plotTSNE(
reads.qc[endog_genes, ],
exprs_values = "logcounts_raw",
perplexity = 10,
colour_by = "batch",
size_by = "total_features",
shape_by = "individual",
rand_seed = 123456
)
```
```{r expr-overview-tsne-after-qc-exercise2-2, fig.cap = "tSNE map of the tung data (perplexity = 200)", echo=FALSE}
plotTSNE(
reads.qc[endog_genes, ],
exprs_values = "logcounts_raw",
perplexity = 200,
colour_by = "batch",
size_by = "total_features",
shape_by = "individual",
rand_seed = 123456
)
```
```{r}
sessionInfo()
```