-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
130 lines (91 loc) · 5.32 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
---
output: github_document
bibliography: ["material/citation.bib"]
---
```{r, include=FALSE}
knitr::knit_hooks$set(pngquant = knitr::hook_pngquant)
knitr::opts_chunk$set(
echo = T,
message = FALSE,
fig.path = "man/figures/README-",
collapse = TRUE,
comment = "",
dev = "ragg_png",
dpi = 72,
fig.retina = 2,
fig.width = 10.6667,
fig.height = 3.3334,
fig.align = "center",
out.width = "100%",
pngquant = "--speed=1 --quality=50"
)
```
# transGI: Nonparametric transformation method of transcriptome based on prior gene interactions <img src="man/figures/transGI.png" align="right" width="120" />
The interaction between genes can be represented as a scale-free directed network. A common practice is to infer the strength of signals for genes and their downstream functions based on gene expression levels. Although this approach is simple, it does not consider prior information on gene-gene interactions.
To incorporate prior information on gene interactions into the model, a non-parametric transformation of transcript expression is a worthwhile consideration. transGI has compiled several methods and pairs of gene interactions from previously published literature, allowing users to quantitatively construct gene interaction networks de novo.
Nonparametric transformation method of transcriptome based on prior gene interactions has the following potential advantages:
1. It allows users to construct a gene interaction network for single samples, by comparing it with a reference network or selecting high-variance features from it, quantifying the perturbation effects of gene expression in specific tissues or central networks that promote biological events;
2. Non-parametric transformation methods have good cross-dataset performance and can robustly remove batch effects between data sets. For microarrays and RNA-seq, due to differences in platforms, technologies, quantification methods, and sensitivities between the two, the effectiveness of nonparametric transformation methods is comparable to traditional methods such as quantile regression;
3. Nonparametric transformation methods rely on fewer assumptions.
Currently, the functions supported by transGI include:
1. Using transformation methods from previously publication like deltarank or pairwise calculation methods to construct single-sample networks on prior gene interaction pairs.
2. Providing a gene enrichment method that uses prior gene interaction pairs as background gene sets. Simply put, it is a weighted gene enrichment method that uses the node degree of each prior gene interaction pair as weight.
3. Providing a series of methods for selecting features with high variance or correlation with certain indicators, as well as visualizing gene interaction networks.
## Installation
You can install the development version of transGI from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("Vinnish-A/transGI")
```
## Example
Use the `transGI` function to transform transcriptome data.
```{r}
library(transGI)
testMat = system.file('extdata', 'testMat.csv', package = 'transGI') |>
read.csv(row.names = 'symbol') |>
as.matrix() |>
_[1:2000, ]
res = transGI(testMat, 'deltarank', 'reactome')
```
Use `future` component to implement parallel computing.
```{r eval=FALSE}
future::plan('multisession', workers = 4)
res = transGI(testMat, 'deltarank', 'reactome')
```
Use `cal_HR` and a series of evaluation function to select features. Execute `selector` to get existing methods.
```{r}
testPhen = system.file('extdata', 'testPhen.csv', package = 'transGI') |>
read.csv(row.names = 'sample')
res_eval = sapply(res$converted, cal_HR, time_ = testPhen$time, event_ = testPhen$event) |> t()
symbols = net2gene(res$genepair, rownames(res_eval)[res_eval[, 'p'] < 0.05])
```
Use `enrichGraph` to calculate the enrichment results of genes in the background gene interaction network, while `autoBar` and `autoBubble` provides delicate visualization of enrich result.
```{r}
db = read_gmt('material/h.all.v2023.2.Hs.symbols.gmt')
res_enrich = enrichGraph(symbols, db_ = db, pathways_ = 'all', bgNet_ = 'reactome')
autoBar(res_enrich)
```
Use `visNet` to visualize gene interactions.
```{r warning=FALSE}
visNet(symbols, degree_ = 1)
```
## Future Plan
Currently, transGI has implemented a series of functions including feature engineering, feature selection, gene enrichment, and simple visualization. In the future, we plan to add the following features to transGI:
1. Infer new potential gene pairs for interaction based on perturbation effects in experimental and control groups
2. For networks of interactions between two or more genes, add functions such as network comparison and key node selection
3. Add more methods for constructing or evaluating single-sample interaction networks and calculating perturbation effects.
## Citation
The calculation method for deltarank is obtained from [@10.1093/bib/bbaa268], and the pairwise calculation method is obtained from [@10.1093/bib/bbac344]
If you use transGI in your research, please cite:
```{r echo=FALSE}
citation_of = function(...) {
pkgs_ = unlist(list(...))
each_of_ = function(pkg_) {
c(capture.output(utils:::print.bibentry(citation(pkg_), style = "Bibtex")), "")
}
unlist(lapply(pkgs_, each_of_))
}
citation_of('transGI') |>
cat(sep = '\n')
```
## reference