-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
97 lines (77 loc) · 4.02 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
---
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%"
)
```
# InterOpt
<!-- badges: start -->
<!-- badges: end -->
<img src="https://github.com/asalimih/InterOpt/blob/8eaf86e459fc14f54594429d44097b8a4e252ef4/man/figures/TheGraphics_v2.jpg" width="512" height="512" />
The goal of InterOpt is to improve qPCR data normalization by providing optimal weights for weighted mean of multiple internal controls (reference genes). It can be easily utilized in combination with usual ΔΔCT method. Here instead of taking average of multiple internal controls (which is the common method) you use weighted mean.
## Online web application
Please visit [interopt.ir](https://interopt.ir/) for more information.
## Installation
You can install the development version from GitHub with:
``` r
# install.packages("devtools")
devtools::install_github("asalimih/InterOpt")
```
## Use Cases
### 1) qPCR with multiple reference genes
You have multiple internal controls (usually 2 or 3) and their corresponding raw CT values. Here is how you can aggregate them into one new internal control using weighted geometric mean:
```{r example1}
library(InterOpt)
controls = c('RNU48','hsa-miR-16-5p')
x = data_GSE78870[controls,]
# x is a matrix of raw CT values, each row is an internal control and columns are samples
w = calcWeight(x, ctVal = TRUE, weight_method = 'geom_sd_plus')
new_control = colSums(w*x)
# new_control is the weighted mean of the internal controls which can be used like a new internal control
```
### 2) Aggregated reference gene selection
You have a dataset containing lots of genes. Here is how you can check all possible pair combinations (k=2) and calculate their corresponding aggregation weights (optimal weights to use in weighted mean) along with the stability measures (SD and CV) of each resulting aggregated combination.
```{r example2}
library(InterOpt)
# only check miRNAs which have CT values less than 37 in all samples
mirs_for_combinations = rownames(data_GSE50013)[rowSums(data_GSE50013>37)==0]
result = run_experiment(data_source = data_GSE50013,
gr_source = groups_GSE50013,
ctVal_source = T,
sub_names = mirs_for_combinations,
norm_method = 'high_exp',
norm_method_exp_thr = 35,
k = 2,
weight_methods=c('geom', 'geom_sd_hybrid'),
output_agg_refs = T,
mc.cores=4,
verbose=F)
# Note: the data is automatically normalized using the norm_method and the aggregation weights
# are calculated based on the normalized data by default. Moreover, the stability measures
# are also calculated based on the normalized data.
# The calculated weights:
head(result$res_source$geom_sd_hybrid)
# The corresponding weighted mean of the miRNAs:
head(result$aggregated_refs$geom_sd_hybrid[,1:7])
```
In order to have NormFinder and Genorm stability measures in the output, you need to first add `InterOptCuda` to your PATH (Please check [InterOptCuda](https://github.com/asalimih/InterOptCuda)). Then just add `algors=c('SD','CV','Genorm','NormFinder')` argument in `run_experiment`
## Datasets
The following pre-processed datasets and their sample groups are available in the package. for more information please refer to the manual (e.g. ?data_GSE78870):
- `data_GSE78870`, `groups_GSE78870`
- `data_GSE50013`, `groups_GSE50013`
- `data_GSE57661`, `groups_GSE57661`
- `data_GSE59520`, `groups_GSE59520`
- `data_GSE67075`, `groups_GSE67075`
- `data_GSE90828`, `groups_GSE90828`
- `data_TCGA_BRCA`, `groups_TCGA_BRCA`
## Note
The documentation for the package is in progress ...
## Citation
If you used this method in your studies please cite the following paper:
[Salimi, Adel, Saeid Rahmani, and Ali Sharifi-Zarchi. "InterOpt: Improved gene expression quantification in qPCR experiments using weighted aggregation of reference genes." iScience 26.10 (2023)](https://doi.org/10.1016/j.isci.2023.107945)