-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
99 lines (63 loc) · 4.09 KB
/
README.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
99
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# PICsnATAC
<!-- badges: start -->
<!-- badges: end -->
The goal of PICsnATAC is to accurately quantify snATAC-seq data. The two key components are:
#### 1. <span style="text-decoration:underline">Constructing cell-by-peak matrix</span> with Paired Insertion Counting (PIC).
##### **Motivation**:
There are two common counting approaches for snATAC-seq data, **fragment-based counting** and **insertion-based counting**. They generate inconsistent results (see figure below).
```{r, results='asis', echo = FALSE}
cat('
<div style="display: flex;">
<img src="man/figures/README-F1c.svg" width="280" style="margin-right: 10px;">
<img src="man/figures/README-F1d.svg" width="280" >
</div>
')
```
_Here, we present PIC as a uniform counting choice for various assays, including 10X Genomics snATAC-seq, sci-ATAC-seq, SNARE-seq, dsc-ATAC-seq, s3-ATAC-seq, and scNANO-ATAC._
#### 2. Conducting <span style="text-decoration:underline">Differential Accessible Region (DAR)</span> identification analysis using the PIC matrix.
##### **Motivation**:
Two insertion events with correct primer configurations are required for one viable fragment. We derived the **probability distribution of fragment count** as a function of insertion rate and derived a **model-based insertion rate estimation framework**. We further applied a likelihood ratio test approach to detect DARs between populations.
![ ](man/figures/README-F1a.png){width=85%}
_Building upon our model-based insertion rate estimation framework, this analysis provides a more sensitive test of DAR between cell groups (cell types)._
## Dependencies
Please install the dependent libraries by running the following codes
``` r
install.packages('data.table') ## (please make sure it is newer than 1.8)
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("GenomicRanges")
```
## Installation
You can install the most up-to-date version of PICsnATAC from [GitHub](https://github.com/Zhen-Miao/PICsnATAC) with:
``` r
# install.packages("devtools")
devtools::install_github("Zhen-Miao/PIC-snATAC")
```
PIC-snATAC is a light-weight package. Installation typically takes <5 min.
## Example
This is a basic example which shows you how to construct PIC-based cell by peak matrix:
```{r eval = FALSE}
library("PICsnATAC")
pic_matrix <- PIC_counting(cells, fragment_tsv_gz_file_location, peak_sets)
```
## Vignette and Interactive Notebooks
Notebook 1: [Run PIC counting on PBMC data.](https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/Run_PIC_counting_on_pbmc_3k_data.ipynb)
Notebook 2: [Run PIC DAR on SNARE-seq2 brain data.](https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/Run_PIC_on_human_brain_data.ipynb)
_You can run the above notebooks with Google Colab (processed example data and link provided), but it is recommended that you run it using computing cluster for large datasets_
Vignette 1: [PIC counting from Cell Ranger output.](https://htmlpreview.github.io/?https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/vignette-1----PIC-counting-with-10X-Cell-Ranger-output.html)
Vignette 2: [PIC counting in Seurat/Signac workflow.](https://htmlpreview.github.io/?https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/vignette-2----PIC-counting-in-Seurat-workflow.html)
Vignette 3: [PIC counting in ArchR workflow.](https://htmlpreview.github.io/?https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/vignette-3----PIC-counting-in-ArchR-workflow.html)
vignette 4: [PIC counting with dsc-ATAC-seq data.](https://htmlpreview.github.io/?https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/vignette-4----PIC-counting-with-dsc-ATAC-seq-data.html)
vignette 5: [DAR test with PIC parametric test framework.](https://htmlpreview.github.io/?https://github.com/Zhen-Miao/PICsnATAC/blob/main/vignettes/vignette-5----DAR-analysis-with-PIC-parametric-framework.html)