-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
173 lines (121 loc) · 6.79 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
always_allow_html: true
---
<!-- 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%"
)
```
# RexMS
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://bioconductor.org/checkResults/release/bioc-LATEST/RexMS)
[](https://bioconductor.org/checkResults/devel/bioc-LATEST/RexMS)
[](http://bioconductor.org/packages/stats/bioc/RexMS/)
[](https://support.bioconductor.org/tag/RexMS)
[](https://bioconductor.org/packages/release/bioc/html/RexMS.html#since)
[](http://bioconductor.org/checkResults/devel/bioc-LATEST/RexMS/)
[](https://bioconductor.org/packages/release/bioc/html/RexMS.html#since)
[](https://github.com/ococrook/RexMS/actions/workflows/R-CMD-check-bioc.yaml)
[](https://app.codecov.io/gh/ococrook/RexMS?branch=devel)
<!-- badges: end -->
The goal of `RexMS` is to analyse hydrogen deuterium exchange mass spectrometry
(HDX-MS) data at the residue level. The package is designed to be used with
data from various platforms that have already been process at Spectrum-level.
`RexMS` takes the processed peptide-level data and infers the residue level
deuterium uptake. The underlying model is a Bayesian non-parametric model that
recasts HDX-MS data analysis as a (latent) change-point detection problem.
The unique benefits of this model are the following:
(1) It can provide statistical confidence at the level of residues (e.g.
a probability of change)
(2) Borrow statistical power from overlapping peptides
(3) Infer uptake patterns that are hidden at the peptide-level because of
averaging
(4) Provide global and per-residue resolution metrics
(5) It can perform single protein analysis, differential analysis and
conformational signature analysis (many states/compounds), linking results
to downstream functional outcomes
(6) You can build predictive models with the inferred uptakes using partial
least squares discriminant analysis (PLS-DA).
(7) You can costumize the model to your specific needs.
## Documentation
The official documentation is available at
[ococrook.github.io/RexMS](https://ococrook.github.io/RexMS/). We encourage
use to look there and in particular the vignettes. We suggest reading through
all of the vignettes first so you understand which part of `RexMS` you need to use.
## Installation instructions
Get the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `RexMS` from [Bioconductor](http://bioconductor.org/) using the following code:
Note that you cannot currently install from Bioconductor
```{r 'install', eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("RexMS")
```
To install the development version of `RexMS`, it's easiest to use the
`remotes` package.
```{r 'install_dev', eval = FALSE}
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("ococrook/RexMS")
```
## Example
RexMS has structure visualisation at part of its core functionality.
Below is an example of how to use the `hdx_to_pdb_colours` function to map HDX-MS data onto a PDB file.
```{r example, eval = requireNamespace('RexMS'), eval = FALSE}
library("RexMS")
library(NGLVieweR)
# generate random HDX data
v <- matrix(rnorm(n = 477), nrow = 1)
colnames(v) <- seq.int(ncol(v)) # residue numbering
v2 <- v[, seq.int(344, 477), drop = FALSE]
colnames(v2) <- seq.int(ncol(v2))
pdb_filepath <- system.file("extdata", "test_BRD4.pdb", mustWork = TRUE, package = "RexMS")
# generate a protection-deprotection colour mapping
mycolor_parameters <- hdx_to_pdb_colours(v2, pdb = pdb_filepath, cmap_name = "ProtDeprot")
# Note this will open in a view
view_structure(pdb_filepath = pdb_filepath, color_parameters = mycolor_parameters)
```
The expected output is a 3D structure of the protein with the HDX-MS data mapped
onto it. The colouring is based on the protection-deprotection scale.The
following image is indicative and may not be the same as the output you will see.

## Shiny Application
You may be interested in interesting ways to display your data or interact
with our results. Here are links to some shiny applications that use `RexMS`:
https://olivercrook.shinyapps.io/BRD4-ReX/
and
https://olivercrook.shinyapps.io/ConformationalSignatureAnalysis/
## Citation
Below is the citation output from using `citation('RexMS')` in R. Please
run this yourself to check for any updates on how to cite __RexMS__.
```{r 'citation', eval = requireNamespace('RexMS')}
print(citation("RexMS"), bibtex = TRUE)
```
Please note that the `RexMS` 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 `RexMS` 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 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')`.