Skip to content

Commit 93b7862

Browse files
Merge pull request #170 from BorchLab/ordering_correction
Adding sort to gseaEnrichment levels
2 parents add6885 + 4e2ef66 commit 93b7862

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

R/gseaEnrichment.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ gseaEnrichment <- function(input.data,
151151
labNES <- formatC(nes, digits = digits, format = "f")
152152
labP <- ifelse(is.na(pval), "NA",
153153
formatC(pval, digits = 2, format = "e"))
154-
pretty.grp <- paste0(groups,
154+
pretty.grp <- sort(paste0(groups,
155155
" (NES = ", labNES,
156-
", p = ", labP, ")")
156+
", p = ", labP, ")"))
157157

158158
## ---- 4. Data frames for ggplot ------------------------------------------
159159
running.df <- data.frame(

vignettes/escape.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ vignette: >
2121
---
2222

2323
```{r, echo=FALSE, results="hide", message=FALSE}
24-
knitr::opts_chunk$set(error=FALSE, message=FALSE, warning=FALSE)
24+
knitr::opts_chunk$set(tidy=FALSE, error=FALSE, message=FALSE, warning=FALSE)
2525
library(BiocStyle)
2626
```
2727

@@ -195,7 +195,8 @@ ggplot(data = as.data.frame(enrichment.scores),
195195
mapping = aes(enrichment.scores[,1], enrichment.scores[,2])) +
196196
geom_point() +
197197
theme_classic() +
198-
theme(axis.title = element_blank())
198+
xlab(colnames(enrichment.scores)[1]) +
199+
ylab(colnames(enrichment.scores)[2])
199200
```
200201

201202
Multi-core support is for all methods is available through [BiocParallel](https://bioconductor.org/packages/release/bioc/html/BiocParallel.html). To add more cores, use the argument **BPPARAM** to ```escape.matrix()```. Here we will use the ```SnowParam()``` for it's support across platforms and explicitly call 2 workers (or cores).

0 commit comments

Comments
 (0)