-
Notifications
You must be signed in to change notification settings - Fork 2
/
Example_human_BM.Rmd
103 lines (74 loc) · 2.88 KB
/
Example_human_BM.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
---
title: "sc2marker with HCA-BM (Human)"
author: "sc2marker"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float:
collapsed: false
smooth_scroll: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
suppressMessages(library(sc2marker))
suppressMessages(library(Seurat))
devtools::install_github('satijalab/seurat-data')
suppressMessages(library(SeuratData))
```
# load data
You can load the HCA-BM object by SeuratData.
```{r SeuratObject, warning=F,message=F}
#load reference data
InstallData("bmcite")
bmc <- LoadData(ds = "bmcite")
Idents(bmc) <- "celltype.l1"
table(bmc@active.ident)
```
# Markers for NK cell
To run sc2marker you need to execute the following command, providing a clustered single cell data sets (as Seurat object), the cell type of interest and the antibody databased (IHC, ICC or Flow).
```{r NK cell markers}
nk.markers <- Detect_single_marker(bmc, id = "NK", category = "Flow", org = "human", min.pct = 0.1)
get_antibody(nk.markers, org = "human")
```
```{r message=F, warning=F, fig.height=9, fig.width=9}
# Ridge plot of top 9 markers of NK cells
plot_ridge(bmc, id = "NK", genes = nk.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
```
# Markers for B cell
```{r B cell markers}
b.markers <- Detect_single_marker(bmc, id = "B cell", category = "Flow", org = "human", min.pct = 0.1)
get_antibody(b.markers, org = "human")
```
```{r message=F, warning=F, fig.height=9, fig.width=9}
# Ridge plot of top 9 markers of B cells
plot_ridge(bmc, id = "B cell", genes = b.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
```
# Markers for T cell
```{r T cell markers}
t.markers <- Detect_single_marker(bmc, id = "T cell", category = "Flow", org = "human", min.pct = 0.1)
get_antibody(t.markers, org = "human")
```
```{r message=F, warning=F, fig.height=9, fig.width=9}
# Ridge plot of top 9 markers of T cells
plot_ridge(bmc, id = "T cell", genes = t.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
```
# Markers for Progenitor cells
```{r Progenitor cell markers}
Prog.markers <- Detect_single_marker(bmc, id = "Progenitor cells", category = "Flow", org = "human", min.pct = 0.1)
get_antibody(Prog.markers, org = "human")
```
```{r message=F, warning=F, fig.height=9, fig.width=9}
# Ridge plot of top 9 markers of Progenitor cells
plot_ridge(bmc, id = "Progenitor cells", genes = Prog.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
```
# Markers for Mono/DC
```{r Mono/DC cell markers}
Mono.markers <- Detect_single_marker(bmc, id = "Mono/DC", category = "Flow", org = "human", min.pct = 0.1)
get_antibody(Mono.markers, org = "human")
```
```{r message=F, warning=F, fig.height=9, fig.width=9}
# Ridge plot of top 9 markers of Mono cells
plot_ridge(bmc, id = "Mono/DC", genes = Mono.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
```