forked from sulab-wmu/scPagwas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
87 lines (68 loc) · 3.6 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
---
title: "scPagwas"
date: "Last Updated: `r format(Sys.time(), '%d, %B, %Y at %H:%M')`"
output:
md_document:
variant: markdown_github
editor_options:
chunk_output_type: console
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# About scPagwas
**scPagwas** employs a polygenic regression model to prioritize a set of trait-relevant genes and uncover trait-relevant cell subpopulations by incorporating pathway activity transformed single-cell RNA sequencing (scRNA-seq) data with genome-wide association studies (GWAS) summary data.
<img src="./man/figures/Figure1.png" width="100%" style="display: block; margin: auto;" />
Please cite this article in press as: Ma et al.,Polygenic regression uncovers trait-relevant cellular contexts through pathway activation transformation of single-cell RNA sequencing data,Cell Genomics (2023),https://doi.org/10.1016/j.xgen.2023.100383
Code for reproducing the analysis from the paper is available [here](https://github.com/dengchunyu/scPagwas_reproduce), or [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8137370.svg)](https://doi.org/10.5281/zenodo.8137370)
For further usage on the scPagwas package, you can visit the [website](https://dengchunyu.github.io/about/). A vignette for using also can be accessed using browseVignettes("scPagwas")
Some important data can be download from [here](https://drive.google.com/drive/folders/1z7uQtzjnieJhYLhLmgmIz2jk6a6hes4l?usp=drive_link)
## Installation
You can install the released version of scPagwas from [github](https://github.com/sulab-wmu/scPagwas) with:
``` r
#install some dependence packages
install.packages("Seurat")
install.packages("ggpubr")
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("GenomicRanges")
BiocManager::install("IRanges")
devtools::install_github("sulab-wmu/scPagwas")
```
In many cases, installing packages using `devtools::install_github` may fail.
```r
library(devtools)
install_git("https://github.com/sulab-wmu/scPagwas.git", ref = "main")
```
Or, download the package file from [here](https://api.github.com/repos/sulab-wmu/scPagwas/tarball/HEAD)
Then install it locally.
```r
devtools::install_local("sulab-wmu-scPagwas-****.tar.gz")
```
## Usage
quick-start example:
```{r message=FALSE, eval = FALSE}
library(scPagwas)
system.time(
#1.start to run the wrapper functions for example.
Pagwas_data<-scPagwas_main(Pagwas = NULL,
gwas_data =system.file("extdata", "GWAS_summ_example.txt", package = "scPagwas"), # The GWAS Summary statistics files
Single_data =system.file("extdata", "scRNAexample.rds", package = "scPagwas"),# scRNA-seq data in seruat format with "RNA" assays and normalized.
output.prefix="test", # the prefix name for output files
output.dirs="scPagwastest_output",# the directory file's name for output
block_annotation = block_annotation_hg37,# gene position in chromosome is provided by package. default is hg38, block_annotation_hg37 is hg37.
assay="RNA", # the assays for scRNA-seq data to use.
Pathway_list=Genes_by_pathway_kegg,# pathway list is provided by package, including gene symbols.
n.cores=1,
iters_singlecell = 10,
chrom_ld = chrom_ld,# The LD data is provided by package.
singlecell=T, # Whether to run the singlecell process.
celltype=T# Whether to run the celltype process.
)
)
```