-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
executable file
·171 lines (133 loc) · 5.99 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
output: github_document
editor_options:
markdown:
wrap: 72
---
<!-- 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%"
)
```
# DeconvoBuddies <img src="man/figures/logo.png" align="right" height="138"/>
<!-- badges: start -->
[![Codecov test
coverage](https://codecov.io/gh/lahuuki/DeconvoBuddies/branch/main/graph/badge.svg)](https://codecov.io/gh/lahuuki/DeconvoBuddies?branch=main)
[![check-bioc](https://github.com/LieberInstitute/DeconvoBuddies/actions/workflows/check-bioc.yml/badge.svg)](https://github.com/LieberInstitute/DeconvoBuddies/actions/workflows/check-bioc.yml)
[![Lifecycle:
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Bioc release
status](http://www.bioconductor.org/shields/build/release/bioc/DeconvoBuddies.svg)](https://bioconductor.org/checkResults/release/bioc-LATEST/DeconvoBuddies)
[![Bioc devel
status](http://www.bioconductor.org/shields/build/devel/bioc/DeconvoBuddies.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/DeconvoBuddies)
[![Bioc downloads
rank](https://bioconductor.org/shields/downloads/release/DeconvoBuddies.svg)](http://bioconductor.org/packages/stats/bioc/DeconvoBuddies/)
[![Bioc
support](https://bioconductor.org/shields/posts/DeconvoBuddies.svg)](https://support.bioconductor.org/tag/DeconvoBuddies)
[![Bioc
history](https://bioconductor.org/shields/years-in-bioc/DeconvoBuddies.svg)](https://bioconductor.org/packages/release/bioc/html/DeconvoBuddies.html#since)
[![Bioc last
commit](https://bioconductor.org/shields/lastcommit/devel/bioc/DeconvoBuddies.svg)](http://bioconductor.org/checkResults/devel/bioc-LATEST/DeconvoBuddies/)
<!-- badges: end -->
The goal of `DeconvoBuddies` is to provide helper functions for the
deconvolution process, as well as a paired dataset designed to test the
performance of deconvolution arguments. The dataset is from Human DLPFC,
and contains bulk RNA-seq, single nucleus RNA-seq, and estimated cell
type proportions from RNAScope/IF.
## Installation instructions
Get the latest stable `R` release from
[CRAN](http://cran.r-project.org/). Then install `DeconvoBuddies` using
from [Bioconductor](http://bioconductor.org/) the following code:
```{r 'install', eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("DeconvoBuddies")
```
And the development version from [GitHub](https://github.com/) with:
```{r 'install_dev', eval = FALSE}
BiocManager::install("LieberInstitute/DeconvoBuddies")
```
## Application of DeconvoBuddies
```{r 'load_packages', warning = FALSE, echo=FALSE}
suppressMessages({
library("DeconvoBuddies")
})
```
### Access Datasets
`DeconvoBuddies` contains paired snRNA-seq, bulk RNA-seq, and cell type proportion
data from the human DLPFC from [this study](https://github.com/LieberInstitute/Human_DLPFC_Deconvolution).
```{r `access data}
## Access data with fetch_deconvo_data
sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")
## explore the single cell experiment object
sce_DLPFC_example
```
### Find Marker Genes and Visualize Expression
`DeconvoBuddies` has tools for finding marker genes ideal for deconvolution,
and plotting functions to quickly visualize the expression of selected genes in a
snRNA-seq data.
```{r plot_gene_expression, echo=FALSE, warning=FALSE}
plot_gene_express(
sce = sce_DLPFC_example,
category = "cellType_broad_hc",
genes = c("GAD2", "CD22")
)
```
### Plot Deconvoltion Cell Type Proportions
Create composition bar plots of predicted cell type proportions.
```{r demo_plot_composition_bar, echo=FALSE}
set.seed(123)
## load example data
data("est_prop")
## pivot data to long format and join with test estimated proportion data
est_prop_long <- est_prop |>
tibble::rownames_to_column("RNum") |>
tidyr::pivot_longer(!RNum, names_to = "cell_type", values_to = "prop")
## composition bar plot
plot_composition_bar(
est_prop_long |>
dplyr::filter(RNum %in% sample(rownames(est_prop), 10)),
x_col = "RNum"
)
```
## Citation
Below is the citation output from using `citation('DeconvoBuddies')` in
R. Please run this yourself to check for any updates on how to cite
**DeconvoBuddies**.
```{r 'citation', eval = requireNamespace('DeconvoBuddies')}
print(citation("DeconvoBuddies"), bibtex = TRUE)
```
Please note that the `DeconvoBuddies` was only made possible thanks to
many other R and bioinformatics software authors, which are cited either
in the vignettes and/or the paper(s) describing this package.
## Code of Conduct
Please note that the DeconvoBuddies project is released with a
[Contributor Code of
Conduct](http://bioconductor.org/about/code-of-conduct/). By
contributing to this project, you agree to abide by its terms.
## Development tools
- Continuous code testing is possible thanks to [GitHub
actions](https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/)
through `r BiocStyle::CRANpkg('usethis')`,
`r BiocStyle::CRANpkg('remotes')`, and
`r BiocStyle::CRANpkg('rcmdcheck')` customized to use
[Bioconductor's docker
containers](https://www.bioconductor.org/help/docker/) and
`r BiocStyle::Biocpkg('BiocCheck')`.
- Code coverage assessment is possible thanks to
[codecov](https://codecov.io/gh) and `r BiocStyle::CRANpkg('covr')`.
- The [documentation website](http://.github.io/DeconvoBuddies) is
automatically updated thanks to `r BiocStyle::CRANpkg('pkgdown')`.
- The code is styled automatically thanks to
`r BiocStyle::CRANpkg('styler')`.
- The documentation is formatted thanks to
`r BiocStyle::CRANpkg('devtools')` and
`r BiocStyle::CRANpkg('roxygen2')`.
For more details, check the `dev` directory.
This package was developed using `r BiocStyle::Biocpkg('biocthis')`.
This package is submitted to [Bioconductor](https://github.com/Bioconductor/Contributions/issues/3503)