Skip to content

Commit

Permalink
change default order, #60
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangchuangYu committed Dec 9, 2021
1 parent a89a61e commit 751ca5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DOSE
Type: Package
Title: Disease Ontology Semantic and Enrichment analysis
Version: 3.21.1
Version: 3.21.1.9001
Authors@R: c( person(given = "Guangchuang", family = "Yu", email = "[email protected]", role = c("aut", "cre")),
person(given = "Li-Gen", family = "Wang", email = "[email protected]", role = "ctb"),
person(given = "Vladislav", family = "Petyuk", email = "[email protected]", role = "ctb"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# DOSE 3.21.1.9001

+ update the default order of GSEA result (2021-12-09, Thu)
- if p.adjust is identical, sorted by `abs(NES)`


# DOSE 3.21.1

+ upate DisGeNET and NCG data (2021-11-14, Sun)
Expand Down
4 changes: 2 additions & 2 deletions R/gsea.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GSEA_fgsea <- function(geneList,
res <- res[!is.na(res$pvalue),]
res <- res[ res$pvalue <= pvalueCutoff, ]
res <- res[ res$p.adjust <= pvalueCutoff, ]
idx <- order(res$pvalue, decreasing = FALSE)
idx <- order(res$p.adjust, -abs(res$NES), decreasing = FALSE)
res <- res[idx, ]

if (nrow(res) == 0) {
Expand Down Expand Up @@ -311,7 +311,7 @@ GSEA_DOSE <- function(geneList,
res <- res[!is.na(res$pvalue),]
res <- res[ res$pvalue <= pvalueCutoff, ]
res <- res[ res$p.adjust <= pvalueCutoff, ]
idx <- order(res$pvalue, decreasing = FALSE)
idx <- order(res$p.adjust, -abs(res$NES), decreasing = FALSE)
res <- res[idx, ]

if (nrow(res) == 0) {
Expand Down

0 comments on commit 751ca5f

Please sign in to comment.