-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathREADME.Rmd
133 lines (94 loc) · 4.52 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```
[![R-CMD-check](https://github.com/Olink-Proteomics/OlinkRPackage/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Olink-Proteomics/OlinkRPackage/actions/workflows/R-CMD-check.yaml)
[![](https://img.shields.io/badge/DOI-10.32614/CRAN.package.OlinkAnalyze-1f57b6?style=flat&link=https://doi.org/10.32614/CRAN.package.OlinkAnalyze)](https://doi.org/10.32614/CRAN.package.OlinkAnalyze)
# Olink® Analyze
The goal of Olink® Analyze is to provide a versatile toolbox to enable easy and smooth handling of Olink NPX data to speed up your proteomic research. Olink® Analyze provides functions ranging from reading Olink NPX data as exported by NPX Manager to various statistical tests and modelling, via different QC plot functions. Thereby providing a convenient pipeline for your Olink NPX data analysis.
## Installation
Olink® Analyze is now available on CRAN: https://cran.r-project.org/web/packages/OlinkAnalyze/index.html
```{r, eval=FALSE}
install.packages("OlinkAnalyze")
```
## Vignette
```{r, eval=FALSE}
browseVignettes("OlinkAnalyze")
```
## Usage
### Reading Olink NPX data
```{r read_data,eval = FALSE}
# open package
library(OlinkAnalyze)
# reading Olink NPX data
my_NPX_data <- read_NPX(filename = "path/to/my_NPX_data.xlsx")
```
### QC plot functions
There are several plot functions, below follows two examples using the package provided npx_data1 dataset:
```{r dist_plot, eval=FALSE}
# visualize the NPX distribution per sample per panel, example for one panel
olink_dist_plot(npx_data1 %>% filter(Panel == 'Olink CARDIOMETABOLIC')) +
theme(axis.text.x = element_blank(),
axis.ticks.x = element_blank()) +
scale_fill_manual(values = c('turquoise3', 'red'))
```
![dist_plot_example](figures/example_distplot.png)
```{r qc_plot, eval=FALSE}
# visualize potential outliers by IQR vs. sample median per panel, example for one panel
olink_qc_plot(npx_data1 %>% filter(Panel == 'Olink CARDIOMETABOLIC')) +
scale_color_manual(values = c('turquoise3', 'red'))
```
![qc_plot_example](figures/example_qcplot.png)
### Normalization
Olink® Analyze provides several means of normalization when analyzing multiple datasets. Below follows an example of reference sample (aka bridge) normalization using the two package provided npx_data1 and npx_data2 datasets:
```{r norm_example,eval=FALSE}
# identify bridge samples
bridge_samples <- intersect(x = npx_data1$SampleID,
y = npx_data2$SampleID)
# bridge normalize
bridge_normalized_data <- olink_normalization(df1 = npx_data1,
df2 = npx_data2,
overlapping_samples_df1 = bridge_samples,
df1_project_nr = "20200001",
df2_project_nr = "20200002",
reference_project = "20200001")
```
### Statistical tests and models
Olink® Analyze provides several statistical tests and model tools. Below follows an example of how to perform a t-test and how to visualize the t-test output in a volcano plot using the package provided npx_data1 dataset:
```{r stats, eval=FALSE}
# t-test npx_data1
ttest_results_NPX1 <- olink_ttest(df = npx_data1,
variable = "Treatment")
# select names of the top #10 most significant proteins
ttest_sign_NPX1 <- ttest_results_NPX1 %>%
head(n=10) %>%
pull(OlinkID)
# volcano plot with annotated top #10 most significant proteins
olink_volcano_plot(p.val_tbl = ttest_results_NPX1,
olinkid_list = ttest_sign_NPX1) +
scale_color_manual(values = c('turquoise3', 'red'))
```
![volcano_plot_example](figures/example_volcanoplot.png)
## Learn more
Please see the function specific help pages. Moreover, Olink® Analyze includes two simulated NPX datasets for your convenience to help you explore the package and its functions.
## Issues
Please report any issues (good or bad) to <biostattools[a]olink.com> or use the github [issue function](https://github.com/Olink-Proteomics/OlinkRPackage/issues).
## Alternative install methods
To install directly from the github repository:
```{r, eval=FALSE}
# install.packages("remotes")
remotes::install_github(repo ='Olink-Proteomics/OlinkRPackage/OlinkAnalyze', ref = "main", build_vignettes = TRUE)
```
To install Olink Analyze into a new [conda](https://docs.conda.io/en/latest/) environment:
```{bash, eval=FALSE}
conda create -n OlinkAnalyze -c conda-forge r-olinkanalyze
```
## Credits
Olink® Analyze is developed and maintained by the Olink Proteomics Data Science Team.