This is a single cell RNA dataset of microglia in postmortem brain tissue. There are 3 samples from 2 donors. - Samples MG_22 were isolated as sorted microglia from Hippocampus (HIPP) and medial frontal gyrus (MFG) - Sample 17_016 was isolated as single nuclei from unsorted medial frontal gyrus (MFG).
We will merge the two fresh microglia samples and keep the nuclei as a separate dataset.
#load libaries
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(Seurat)
library(patchwork)
print(paste("Seurat ", packageVersion("Seurat")))
## [1] "Seurat 3.2.3"
Load the fresh microglia samples
load("~/Raj_Lab/Microglia/seurat_object_MG_22_HIPP.Rdata")
MG22HIPP <- seurat_object_MG_22_HIPP
rm(seurat_object_MG_22_HIPP)
load("~/Raj_Lab/Microglia/seurat_object_MG_22_MFG.Rdata")
MG22MFG <- seurat_object_MG_22_MFG
rm(seurat_object_MG_22_MFG)
This is the microglia from the hippocampus
MG22HIPP
## An object of class Seurat
## 17936 features across 3967 samples within 1 assay
## Active assay: RNA (17936 features, 0 variable features)
head(MG22HIPP@meta.data)
## orig.ident nCount_RNA nFeature_RNA
## AAACCCAAGGTGCCTC-1 MG-22-HIPP 5124 2060
## AAACCCATCTTCTTCC-1 MG-22-HIPP 2397 1137
## AAACGAAAGAGTTGTA-1 MG-22-HIPP 2707 1125
## AAACGAACAACTCATG-1 MG-22-HIPP 1604 744
## AAACGAACACAGCTTA-1 MG-22-HIPP 1090 458
## AAACGAAGTTCAGCGC-1 MG-22-HIPP 2615 1151
This is the microglia from the medial frontal gyrus
MG22MFG
## An object of class Seurat
## 17960 features across 4622 samples within 1 assay
## Active assay: RNA (17960 features, 0 variable features)
head(MG22MFG@meta.data)
## orig.ident nCount_RNA nFeature_RNA
## AAACCCACAGACTGCC-1 MG-22-MFG 2255 1362
## AAACCCAGTTAAGTCC-1 MG-22-MFG 2782 1539
## AAACCCATCGCAATTG-1 MG-22-MFG 1622 1002
## AAACCCATCGCTAAAC-1 MG-22-MFG 3104 1712
## AAACCCATCGTCGACG-1 MG-22-MFG 2291 1228
## AAACGAACAGTACTAC-1 MG-22-MFG 544 375
print("MG22HIPP")
## [1] "MG22HIPP"
MG22HIPP
## An object of class Seurat
## 17936 features across 3967 samples within 1 assay
## Active assay: RNA (17936 features, 0 variable features)
print("MG22MFG")
## [1] "MG22MFG"
MG22MFG
## An object of class Seurat
## 17960 features across 4622 samples within 1 assay
## Active assay: RNA (17960 features, 0 variable features)
MG22 <- merge(MG22HIPP, y = MG22MFG, add.cell.ids = c("HIPP", "MFG"), project = "MG22_Microglia")
saveRDS(MG22, file = "MG22_combined.rds")
print("Combined: MG22")
## [1] "Combined: MG22"
MG22
## An object of class Seurat
## 18991 features across 8589 samples within 1 assay
## Active assay: RNA (18991 features, 0 variable features)
data.frame("median transcripts" = c("MG22HIPP" = median(MG22HIPP@meta.data$nCount_RNA),
"MG22MFG" = median(MG22MFG@meta.data$nCount_RNA),
"Combined" = median(MG22@meta.data$nCount_RNA)),
"median genes" = c("MG22HIPP" = median(MG22HIPP@meta.data$nFeature_RNA),
"MG22MFG" = median(MG22MFG@meta.data$nFeature_RNA),
"Combined" = median(MG22@meta.data$nFeature_RNA)))
## median.transcripts median.genes
## MG22HIPP 2136 1092
## MG22MFG 1609 979
## Combined 1793 1024