-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
75 lines (57 loc) · 2.08 KB
/
Copy pathREADME.Rmd
File metadata and controls
75 lines (57 loc) · 2.08 KB
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
---
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%",
message = FALSE,
warning = FALSE
)
```
# STRINGutils
<!-- badges: start -->
<!-- badges: end -->
STRINGutils provides additional utilities for [STRINGdb](https://www.bioconductor.org/packages/release/bioc/html/STRINGdb.html) such as getting SVG file of STRING network and highlighting features of interest.
## Installation
You can install STRINGutils with:
```{r install, results = "hide"}
devtools::install_github("chiasinL/STRINGutils")
```
## Quick demo
For more thorough walkthrough of the package, please see the [vignette](https://chiasinl.github.io/STRINGutils/articles/STRINGutils_Vignette.html).
Getting SVG file of STRING network:
```{r doc_setup, echo = FALSE, result = "hide"}
library(STRINGutils)
data(list = c("example1_mapped", "string_db"))
hits <- example1_mapped$STRING_id[1:200]
feature_of_int <- c("VSTM2L","TBC1D2","LENG9","TMEM27","TSPAN1",
"TNNC1","MGAM","TRIM22","KLK11","TYROBP")
colors_vec <- rep("rgb(101,226,11)", length(feature_of_int))
names(colors_vec) <- feature_of_int
```
```{r get_svg, results = "hide"}
library(STRINGutils)
svg <- get_svg(string_db, hits, file = "my_network.svg")
```
```{r view_svg1, out.width = "80%", echo = FALSE}
magick::image_read_svg("my_network.svg")
```
If we have a list of proteins of interest, the **full** or **sub-** STRING network of the proteins can be obtained. These proteins will be highlighted by the colors of choice.
For full network:
```{r get_full_network, results = "hide"}
plot_features(example1_mapped, colors_vec, string_db, entire = TRUE)
```
```{r view_svg2, out.width = "80%", echo = FALSE}
magick::image_read_svg("features_of_int.svg")
```
For subnetwork:
```{r get_subnetwork, results = "hide"}
plot_features(example1_mapped, colors_vec, string_db)
```
```{r view_svg3, out.width = "80%", echo = FALSE}
magick::image_read_svg("features_of_int.svg")
```