From 4e2ef664474151b1dfd3334a4f8a7249f0914258 Mon Sep 17 00:00:00 2001 From: theHumanBorch Date: Wed, 23 Jul 2025 13:10:29 -0500 Subject: [PATCH] Adding sort to gseaEnrichment levels #169 per issue --- R/gseaEnrichment.R | 4 ++-- vignettes/escape.Rmd | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/gseaEnrichment.R b/R/gseaEnrichment.R index e6dbc42..847a112 100644 --- a/R/gseaEnrichment.R +++ b/R/gseaEnrichment.R @@ -151,9 +151,9 @@ gseaEnrichment <- function(input.data, labNES <- formatC(nes, digits = digits, format = "f") labP <- ifelse(is.na(pval), "NA", formatC(pval, digits = 2, format = "e")) - pretty.grp <- paste0(groups, + pretty.grp <- sort(paste0(groups, " (NES = ", labNES, - ", p = ", labP, ")") + ", p = ", labP, ")")) ## ---- 4. Data frames for ggplot ------------------------------------------ running.df <- data.frame( diff --git a/vignettes/escape.Rmd b/vignettes/escape.Rmd index b90daa1..cc954e5 100644 --- a/vignettes/escape.Rmd +++ b/vignettes/escape.Rmd @@ -21,7 +21,7 @@ vignette: > --- ```{r, echo=FALSE, results="hide", message=FALSE} -knitr::opts_chunk$set(error=FALSE, message=FALSE, warning=FALSE) +knitr::opts_chunk$set(tidy=FALSE, error=FALSE, message=FALSE, warning=FALSE) library(BiocStyle) ``` @@ -195,7 +195,8 @@ ggplot(data = as.data.frame(enrichment.scores), mapping = aes(enrichment.scores[,1], enrichment.scores[,2])) + geom_point() + theme_classic() + - theme(axis.title = element_blank()) + xlab(colnames(enrichment.scores)[1]) + + ylab(colnames(enrichment.scores)[2]) ``` 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).