-
Notifications
You must be signed in to change notification settings - Fork 1
/
TrimaAnalysis.R
34 lines (28 loc) · 1.84 KB
/
TrimaAnalysis.R
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
#########################################################
## Analysis of Trima-separated PBMCs in 8-donor data ####
## Chris McGinnis, Gartner Lab, UCSF, 06/26/2020 ########
#########################################################
library(Seurat)
## Step 1: Add Ficoll vs Trima prepraton metadata ----------------------------------------------------------------------------------------------------------------------------
[email protected][,"Prep"] <- rep("ficoll")
[email protected][which([email protected]$Donor %in% c("D","E","F","G","H")),"Prep"] <- rep("trima")
## Step 2: Subset by cell type -----------------------------------------------------------------------------------------------------------------------------------------------
seu_NK <- SubsetData(seu_pbmc_clean, cells = rownames([email protected])[which([email protected]$CellType == "NK")])
seu_NK <- SCTransform(seu_NK)
seu_NK <- RunPCA(seu_NK)
seu_NK <- RunUMAP(seu_NK, dims = 1:10)
seu_NK <- FindNeighbors(seu_NK, dims = 1:10)
seu_NK <- FindClusters(seu_NK, resolution = 0.8)
seu_CD14Mono <- SubsetData(seu_pbmc_clean, cells = rownames([email protected])[which([email protected]$CellType == "CD14Mono")])
seu_CD14Mono <- SCTransform(seu_CD14Mono)
seu_CD14Mono <- RunPCA(seu_CD14Mono)
seu_CD14Mono <- RunUMAP(seu_CD14Mono, dims = 1:17)
seu_CD14Mono <- FindNeighbors(seu_CD14Mono, dims = 1:17)
seu_CD14Mono <- FindClusters(seu_CD14Mono, resolution = 0.8)
## Remove outlier CD14 Mono cluster
seu_CD14Mono <- SubsetData(seu_CD14Mono, cells = rownames([email protected])[which([email protected] != 10)])
seu_CD14Mono <- SCTransform(seu_CD14Mono)
seu_CD14Mono <- RunPCA(seu_CD14Mono)
seu_CD14Mono <- RunUMAP(seu_CD14Mono, dims = 1:18)
seu_CD14Mono <- FindNeighbors(seu_CD14Mono, dims = 1:18)
seu_CD14Mono <- FindClusters(seu_CD14Mono, resolution = 0.8)