Skip to content

Commit 6e95107

Browse files
committed
Fixed legend p<0.05
1 parent 447d5e6 commit 6e95107

14 files changed

+76
-102
lines changed

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: EnrichIntersect
22
Type: Package
33
Title: Enrichment Analysis and Intersecting Sankey Diagram
4-
Version: 0.6
5-
Date: 2023-02-24
4+
Version: 0.7
5+
Date: 2024-03-14
66
URL: https://github.com/ocbe-uio/EnrichIntersect
77
BugReports: https://github.com/ocbe-uio/EnrichIntersect/issues
88
Authors@R: c(person("Zhi", "Zhao", email = "zhi.zhao@medisin.uio.no", role = c("aut","cre")), person("Manuela", "Zucknick", email = "manuela.zucknick@medisin.uio.no", role = c("aut")), person("Tero", "Aittokallio", email = "t.a.aittokallio@medisin.uio.no", role = c("ctb")))
@@ -17,7 +17,7 @@ Suggests: knitr
1717
LazyData: true
1818
VignetteBuilder: knitr
1919
NeedsCompilation: no
20-
Packaged: 2023-02-24 22:30:53 UTC; zhiz
20+
Packaged: 2024-03-14 15:18:31 UTC; zhiz
2121
Author: Zhi Zhao [aut, cre],
2222
Manuela Zucknick [aut],
2323
Tero Aittokallio [ctb]

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# EnrichIntersect 0.7
2+
3+
- Fixed issue with the legend of p<0.05
4+
- Added REAMD.md
5+
16
# EnrichIntersect 0.6
27

38
- Automatically filter out non-edge data from the input object of `intersectSankey()`

R/enrichment.R

+7-4
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,18 @@ enrichment <- function(x, custom.set, alpha = 0, normalize = TRUE,
227227
guides(colour = guide_legend(override.aes = list(size = 5))) +
228228
scale_size(name = ES.name, range = c(1, 5), breaks = c(0, 1, 2, 3),
229229
guide = guide_legend(keyheight = .8)) +
230-
theme(axis.text.x = element_text(size = 8, angle = angle,
231-
vjust = 1, hjust = 1)) +
230+
theme(axis.text.x =
231+
element_text(size = 8, angle = angle, vjust = 1, hjust = 1),
232+
legend.margin = margin(-0.1,0,0,0, unit="cm")) +
232233
xlab("") + ylab("")
233234

234235
if (pvalue.cutoff == 0.05) {
235-
g <- g + scale_color_manual(name = NULL, values = c("p<0.05" = "red"))
236+
g <- g + scale_color_manual(name = NULL,
237+
values = c(`red` = "red"), labels = "p<0.05")
236238
} else {
237239
if (pvalue.cutoff == 0.1) {
238-
g <- g + scale_color_manual(name = NULL, values = c("p<0.1" = "red"))
240+
g <- g + scale_color_manual(name = NULL,
241+
values = c(`red` = "red"), labels = "p<0.1")
239242
} else {
240243
g <- g + scale_color_manual(name = NULL, values = c("gray", "red"),
241244
labels = paste0("p", c(">=", "<"),

README.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@
44

55
This is a flexible R package for enrichment analysis based on user-defined sets. It allows users to perform over-representation analysis of the custom sets among any specified ranked feature list, hence making enrichment analysis applicable to various types of data from different scientific fields. EnrichIntersect also enables an interactive means to visualize identified associations based on, for example, the mix-lasso model ([Zhao et al., 2022](https://doi.org/10.1016/j.isci.2022.104767)) or similar methods. A user-manual description of features, function calls and examples can be found from the [vignette](https://cran.r-project.org/web/packages/EnrichIntersect/vignettes/EnrichIntersect.html) of our package.
66

7-
## Citation
8-
9-
> Zhi Zhao, Manuela Zucknick, Tero Aittokallio (2022).
10-
> EnrichIntersect: an R package for custom set enrichment analysis and
11-
> interactive visualization of intersecting sets. _Bioinformatics Advances_,
12-
> vbac073. DOI: [10.1093/bioadv/vbac073](https://doi.org/10.1093/bioadv/vbac073).
13-
14-
> Zhi Zhao, Shixiong Wang, Manuela Zucknick, Tero Aittokallio (2022).
15-
> Tissue-specific identification of multi-omics features for pan-cancer
16-
> drug response prediction. _iScience_, 25(8): 104767. DOI:
17-
> [10.1016/j.isci.2022.104767](https://doi.org/10.1016/j.isci.2022.104767).
18-
197
## Installation
208

219
Install the latest released version from [CRAN](https://CRAN.R-project.org/package=EnrichIntersect)
@@ -46,7 +34,7 @@ set.seed(123)
4634
enrich <- enrichment(x, custom.set, permute.n = 5)
4735
```
4836

49-
![](https://github.com/zhizuio/EnrichIntersect/blob/main/README_plot_enrich.png)<!-- -->
37+
<img src="man/figures/plot_enrich.png" width="90%" />
5038

5139
### Plot Sankey diagram for intersecting set through an array
5240

@@ -57,4 +45,18 @@ data(cancers_genes_drugs, package = "EnrichIntersect")
5745
intersectSankey(cancers_genes_drugs, step.names = c("Cancers","Genes","Drugs"))
5846
```
5947

60-
![](https://github.com/zhizuio/EnrichIntersect/blob/main/README_plot_sankey.png)<!-- -->
48+
<img src="man/figures/plot_sankey.png" width="90%" />
49+
50+
51+
52+
## Citation
53+
54+
> Zhi Zhao, Manuela Zucknick, Tero Aittokallio (2022).
55+
> EnrichIntersect: an R package for custom set enrichment analysis and
56+
> interactive visualization of intersecting sets. _Bioinformatics Advances_,
57+
> vbac073. DOI: [10.1093/bioadv/vbac073](https://doi.org/10.1093/bioadv/vbac073).
58+
59+
> Zhi Zhao, Shixiong Wang, Manuela Zucknick, Tero Aittokallio (2022).
60+
> Tissue-specific identification of multi-omics features for pan-cancer
61+
> drug response prediction. _iScience_, 25(8): 104767. DOI:
62+
> [10.1016/j.isci.2022.104767](https://doi.org/10.1016/j.isci.2022.104767).

README_plot_enrich.png

-546 KB
Binary file not shown.

README_plot_sankey.png

-6.34 MB
Binary file not shown.

build/vignette.rds

0 Bytes
Binary file not shown.

inst/CITATION

+4-38
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
citHeader("To cite EnrichIntersect in publications use:")
2-
3-
citEntry(entry = "Article",
4-
title = "EnrichIntersect: an R package for custom set enrichment analysis and interactive visualization of intersecting sets",
1+
bibentry(bibtype = "Article",
2+
title = "{EnrichIntersect}: an {R} package for custom set enrichment analysis and interactive visualization of intersecting sets",
53
author = c(person(given = "Zhi",
64
family = "Zhao",
75
email = "zhi.zhao@medisin.uio.no"),
@@ -16,38 +14,6 @@ citEntry(entry = "Article",
1614
volume = "2",
1715
number = "1",
1816
pages = "vbac073",
19-
doi = "10.1093/bioadv/vbac073",
20-
textVersion =
21-
paste("Zhi Zhao, Manuela Zucknick, Tero Aittokallio (2022).",
22-
"EnrichIntersect: an R package for custom set enrichment analysis and interactive visualization of intersecting sets.",
23-
"Bioinformatics Advances, 2(1), vbac073.",
24-
"doi: 10.1093/bioadv/vbac073.")
25-
)
26-
27-
citEntry(entry = "Article",
28-
title = "Tissue-specific identification of multi-omics features for pan-cancer drug response prediction",
29-
author = c(person(given = "Zhi",
30-
family = "Zhao",
31-
email = "zhi.zhao@medisin.uio.no"),
32-
person(given = "Shixiong",
33-
family = "Wang",
34-
email = "shixiong.wang@rr-research.no"),
35-
person(given = "Manuela",
36-
family = "Zucknick",
37-
email = "manuela.zucknick@medisin.uio.no"),
38-
person(given = "Tero",
39-
family = "Aittokallio",
40-
email = "t.a.aittokallio@medisin.uio.no")),
41-
journal = "iScience",
42-
year = "2022",
43-
volume = "25",
44-
number = "8",
45-
pages = "104767",
46-
doi = "10.1016/j.isci.2022.104767",
47-
textVersion =
48-
paste("Zhi Zhao and Shixiong Wang and Manuela Zucknick and Tero Aittokallio (2022).",
49-
"Tissue-specific identification of multi-omics features for pan-cancer drug response prediction.",
50-
"iScience, 25(8), 104767.",
51-
"doi: 10.1016/j.isci.2022.104767."),
52-
header = "If mix-lasso is used, please also cite:"
17+
doi = "10.1093/bioadv/vbac073",
18+
header = "To cite EnrichIntersect in publications use:"
5319
)

inst/doc/EnrichIntersect.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## ----setup, include=FALSE-----------------------------------------------------
22
knitr::opts_chunk$set(echo = TRUE)
33

4-
## ---- eval=TRUE---------------------------------------------------------------
4+
## ----eval=TRUE----------------------------------------------------------------
55
library("EnrichIntersect")
66

7-
## ----enrichment_map, results="hide", fig.width=7, fig.height=5----------------
7+
## ----enrichment_map, results="hide", fig.width=7.2, fig.height=5--------------
88
x <- cancers_drug_groups$score
99
custom.set <- cancers_drug_groups$custom.set
1010
set.seed(123)

inst/doc/EnrichIntersect.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library("EnrichIntersect")
2828

2929
An example input data object `cancers_drug_groups` is an R `list` provided in our package, which includes a `data.frame` object with 147 cancer drugs as rows and nine cancer types as columns, and another `data.frame` that groups the 147 drugs (second column) into nine user-defined drug classes (first column). The default setup of `enrichment()` uses the classic K-S test statistic to calculate the normalized enrichment score that quantifies the degree to which the features in a feature set are over-represented at the top or bottom of the entire ranked list of features (e.g. a list of drugs), using as default 100 permutations for the empirical null test statistic. In the visualization, the statistically significantly enriched feature sets are marked with red coloured circles given a pre-specified significance level. The pre-specified significance level will be adjusted automatically if argument `padj.method` is one of `c("holm","hochberg","hommel","bonferroni","BH","BY","fdr","none")`. Users can specify the argument `alpha` for calculating a weighted enrichment score, argument `normalize=FALSE` for using the standard enrichment score rather than the normalized score, argument `permute.n` for the number of permutations of the ranked feature list used for estimating the empirical null test statistic, and the argument `pvalue.cutoff` for marking enriched categories at a specific significance level. See the following code for an example.
3030

31-
```{r enrichment_map, results="hide", fig.width=7, fig.height=5}
31+
```{r enrichment_map, results="hide", fig.width=7.2, fig.height=5}
3232
x <- cancers_drug_groups$score
3333
custom.set <- cancers_drug_groups$custom.set
3434
set.seed(123)

inst/doc/EnrichIntersect.html

+37-39
Large diffs are not rendered by default.

man/figures/plot_enrich.png

168 KB
Loading

man/figures/plot_sankey.png

695 KB
Loading

vignettes/EnrichIntersect.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library("EnrichIntersect")
2828

2929
An example input data object `cancers_drug_groups` is an R `list` provided in our package, which includes a `data.frame` object with 147 cancer drugs as rows and nine cancer types as columns, and another `data.frame` that groups the 147 drugs (second column) into nine user-defined drug classes (first column). The default setup of `enrichment()` uses the classic K-S test statistic to calculate the normalized enrichment score that quantifies the degree to which the features in a feature set are over-represented at the top or bottom of the entire ranked list of features (e.g. a list of drugs), using as default 100 permutations for the empirical null test statistic. In the visualization, the statistically significantly enriched feature sets are marked with red coloured circles given a pre-specified significance level. The pre-specified significance level will be adjusted automatically if argument `padj.method` is one of `c("holm","hochberg","hommel","bonferroni","BH","BY","fdr","none")`. Users can specify the argument `alpha` for calculating a weighted enrichment score, argument `normalize=FALSE` for using the standard enrichment score rather than the normalized score, argument `permute.n` for the number of permutations of the ranked feature list used for estimating the empirical null test statistic, and the argument `pvalue.cutoff` for marking enriched categories at a specific significance level. See the following code for an example.
3030

31-
```{r enrichment_map, results="hide", fig.width=7, fig.height=5}
31+
```{r enrichment_map, results="hide", fig.width=7.2, fig.height=5}
3232
x <- cancers_drug_groups$score
3333
custom.set <- cancers_drug_groups$custom.set
3434
set.seed(123)

0 commit comments

Comments
 (0)