-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQC.Rmd
81 lines (71 loc) · 3.95 KB
/
QC.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
---
title: "QC"
author: "Rance Nault"
date: "October 5, 2019"
---
__Rance Nault__
__09/27/19__
Data was collected as part of preliminary method development and testing for single-nuclei RNA-sequencing from mouse livers of 2,3,7,8-tetrachlorodibenzo-p-dioxin (TCDD) treated mice. For experimental and model details see the following publications (pubs). A total of 4 samples (2 vehicle, 2 TCDD) were examined by snRNA-seq. Samples were run in two batches (Day 1 - VEH64; Day 2 - VEH62, TCDD51, TCDD59).
#__Environment Variables and Packages__
```{r message=FALSE, echo=FALSE}
# Load librariers and set workind directory
library(scales)
library(dplyr)
library(ggplot2)
library(Seurat)
library(cowplot)
#Set working directory where files are stored and will be saved
setwd("C://Users/Rance/Downloads/NovoG2/")
#Increase the limit size to deal with very large objects (may not be needed for later R versions, not applicable to linux).
memory.limit(size = 32000)
```
Analysis was performed using `r R.version.string`, Seurat v`r packageVersion('Seurat')`, dplyr v`r packageVersion('dplyr')`, Cowplot v`r packageVersion('Cowplot')`, ggplot v`r packageVersion('ggplot2')`, and scales v`r packageVersion('scales')`. Aligned reads were generated using CellRanger v3.0.2 and aligned to the mm10-3.0.0_premrna mouse build.
#*__Section 1:__* __Data import and preprocessing__
##__Importing CellRanger data__
<span style="background-color: #dbdbdb">Read10X</span> is used to import individual datasets from CellRanger. Datasets are filtered to include only genes detected in at least __3__ nuclei, and nuclei which express at least __100__ unique genes (features). Nuclei express fewer genes compared to whole cell, therefore these numbers are lower than some single-cell RNA-sequencing datasets. Cells which possess >= __5%__ mitochondrial RNA are excluded from future analyses. Nuclei isolation should result in little to no mitochondrial contamination.
```{r}
cellmin = 3
featmin = 100
mtmax = 5
#VEH62
VEH62.data <- Read10X(data.dir = "C://Users/Rance/Downloads/NovoG2/VEH62/outs/filtered_feature_bc_matrix/")
VEH62 <- CreateSeuratObject(counts = VEH62.data, project = "VEH62", min.cells = cellmin, min.features = featmin)
VEH62[["percent.mt"]] <- PercentageFeatureSet(VEH62, pattern = "^mt-")
VEH62$treatment <- 'CONTROL'
VEH62 <- subset(VEH62, subset = percent.mt < mtmax)
rm(VEH62.data)
#
#VEH64
VEH64.data <- Read10X(data.dir = "C://Users/Rance/Downloads/NovoG2/VEH64/outs/filtered_feature_bc_matrix/")
VEH64 <- CreateSeuratObject(counts = VEH64.data, project = "VEH64", min.cells = cellmin, min.features = featmin)
VEH64[["percent.mt"]] <- PercentageFeatureSet(VEH64, pattern = "^mt-")
VEH64$treatment <- 'CONTROL'
VEH64 <- subset(VEH64, subset = percent.mt < mtmax)
rm(VEH64.data)
#
#TCDD51
TCDD51.data <- Read10X(data.dir = "C://Users/Rance/Downloads/NovoG2/TCDD51/outs/filtered_feature_bc_matrix/")
TCDD51 <- CreateSeuratObject(counts = TCDD51.data, project = "TCDD51", min.cells = cellmin, min.features = featmin)
TCDD51[["percent.mt"]] <- PercentageFeatureSet(TCDD51, pattern = "^mt-")
TCDD51$treatment <- 'TCDD'
TCDD51 <- subset(TCDD51, subset = percent.mt < mtmax)
rm(TCDD51.data)
#
#TCDD59
TCDD59.data <- Read10X(data.dir = "C://Users/Rance/Downloads/NovoG2/TCDD59/outs/filtered_feature_bc_matrix/")
TCDD59 <- CreateSeuratObject(counts = TCDD59.data, project = "TCDD59", min.cells = cellmin, min.features = featmin)
TCDD59[["percent.mt"]] <- PercentageFeatureSet(TCDD59, pattern = "^mt-")
TCDD59$treatment <- 'TCDD'
TCDD59 <- subset(TCDD59, subset = percent.mt < mtmax)
rm(TCDD59.data)
```
##__Summarizing datasets__
```{r}
data.summary <- rbind(dim(VEH62), dim(VEH64), dim(TCDD51), dim(TCDD59))
row.names(data.summary) <- c("VEH62", "VEH64", "TCDD51", "TCDD59")
colnames(data.summary) <- c("Number of Genes", "Number of Nuclei")
```
*__Table 1.__* Number of genes and nuclei sequenced in liver samples of mice gavaged with sesame oil vehicle or 30 ug/kg TCDD every 4 days for 28 days.
```{r echo=FALSE}
data.summary
```