@@ -32,7 +32,10 @@ Please also have a look at
32
32
- [ tidyHeatmap] ( https://stemangiola.github.io/tidyHeatmap/ ) for heatmaps
33
33
produced with tidy principles
34
34
35
- ![ visual cue] ( man/figures/logo_interaction-01.png )
35
+ <figure >
36
+ <img src =" man/figures/logo_interaction-01.png " alt =" visual cue " />
37
+ <figcaption aria-hidden =" true " >visual cue</figcaption >
38
+ </figure >
36
39
37
40
# Introduction
38
41
@@ -165,7 +168,7 @@ Here we plot number of features per cell.
165
168
166
169
``` r
167
170
pbmc_small %> %
168
- tidyseurat :: ggplot(aes(nFeature_RNA , fill = groups )) +
171
+ ggplot(aes(nFeature_RNA , fill = groups )) +
169
172
geom_histogram() +
170
173
my_theme
171
174
```
@@ -176,7 +179,7 @@ Here we plot total features per cell.
176
179
177
180
``` r
178
181
pbmc_small %> %
179
- tidyseurat :: ggplot(aes(groups , nCount_RNA , fill = groups )) +
182
+ ggplot(aes(groups , nCount_RNA , fill = groups )) +
180
183
geom_boxplot(outlier.shape = NA ) +
181
184
geom_jitter(width = 0.1 ) +
182
185
my_theme
@@ -196,7 +199,7 @@ pbmc_small %>%
196
199
my_theme
197
200
```
198
201
199
- ![ ] ( man/figures/unnamed-chunk-12 -1.png ) <!-- -->
202
+ ![ ] ( man/figures/unnamed-chunk-15 -1.png ) <!-- -->
200
203
201
204
# Preprocess the dataset
202
205
@@ -283,27 +286,24 @@ frame.
283
286
284
287
``` r
285
288
pbmc_small_cluster %> %
286
- tidyseurat :: count(groups , seurat_clusters )
289
+ count(groups , seurat_clusters )
287
290
```
288
291
289
- ## # A tibble: 8 × 3
292
+ ## # A tibble: 6 × 3
290
293
## groups seurat_clusters n
291
294
## <chr> <fct> <int>
292
- ## 1 g1 0 17
293
- ## 2 g1 1 14
294
- ## 3 g1 2 9
295
- ## 4 g1 3 4
296
- ## 5 g2 0 13
297
- ## 6 g2 1 12
298
- ## 7 g2 2 6
299
- ## 8 g2 3 5
295
+ ## 1 g1 0 23
296
+ ## 2 g1 1 17
297
+ ## 3 g1 2 4
298
+ ## 4 g2 0 17
299
+ ## 5 g2 1 13
300
+ ## 6 g2 2 6
300
301
301
302
We can identify cluster markers using Seurat.
302
303
303
304
<!-- If this is Seurat v4, comment out the v3 markers -->
304
305
<!--
305
-
306
-
306
+
307
307
```r
308
308
# Identify top 10 markers per cluster
309
309
markers <-
@@ -312,16 +312,14 @@ markers <-
312
312
FindAllMarkers(only.pos = TRUE) %>%
313
313
group_by(cluster) %>%
314
314
top_n(10, avg_logFC)
315
-
316
- # Plot heatmap
315
+ # Plot heatmap
317
316
pbmc_small_cluster %>%
318
317
DoHeatmap(
319
318
features = markers$gene,
320
319
group.colors = friendly_cols
321
320
)
322
321
```
323
-
324
- -->
322
+ -->
325
323
<!-- If this is Seurat v3, comment out the v4 markers -->
326
324
327
325
``` r
@@ -363,7 +361,10 @@ pbmc_small_UMAP %>%
363
361
)
364
362
```
365
363
366
- ![ screenshot plotly] ( man/figures/plotly.png )
364
+ <figure >
365
+ <img src =" man/figures/plotly.png " alt =" screenshot plotly " />
366
+ <figcaption aria-hidden =" true " >screenshot plotly</figcaption >
367
+ </figure >
367
368
368
369
## Cell type prediction
369
370
@@ -397,7 +398,7 @@ pbmc_small_cell_type <-
397
398
398
399
# Reorder columns
399
400
pbmc_small_cell_type %> %
400
- tidyseurat :: select(cell , first.labels , everything())
401
+ select(cell , first.labels , everything())
401
402
```
402
403
403
404
We can easily summarise the results. For example, we can see how cell
@@ -514,18 +515,3 @@ In tidyseurat, cell aggregation can be achieved using the
514
515
pbmc_small %> %
515
516
aggregate_cells(groups , assays = " RNA" )
516
517
```
517
-
518
- ## # A tibble: 460 × 6
519
- ## .feature .sample RNA groups .aggregated_cells orig.ident
520
- ## <chr> <chr> <dbl> <chr> <int> <fct>
521
- ## 1 MS4A1 g2 35.5 g2 36 SeuratProject
522
- ## 2 CD79B g2 52.8 g2 36 SeuratProject
523
- ## 3 CD79A g2 37.2 g2 36 SeuratProject
524
- ## 4 HLA-DRA g2 130. g2 36 SeuratProject
525
- ## 5 TCL1A g2 29.5 g2 36 SeuratProject
526
- ## 6 HLA-DQB1 g2 65.5 g2 36 SeuratProject
527
- ## 7 HVCN1 g2 29.8 g2 36 SeuratProject
528
- ## 8 HLA-DMB g2 43.2 g2 36 SeuratProject
529
- ## 9 LTB g2 111. g2 36 SeuratProject
530
- ## 10 LINC00926 g2 9.91 g2 36 SeuratProject
531
- ## # ℹ 450 more rows
0 commit comments