Skip to content

Commit

Permalink
Sort decreasing only for DOSE YuLab-SMU#58
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-Gon committed Dec 6, 2021
1 parent a89a61e commit d17f195
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/gsea.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ GSEA_internal <- function(geneList,
...) {

by <- match.arg(by, c("fgsea", "DOSE"))
if (!is.sorted(geneList))

if (all(!is.sorted(geneList), by == "DOSE")){
stop("geneList should be a decreasing sorted vector...")
}
if (by == 'fgsea') {
.GSEA <- GSEA_fgsea
} else {
Expand Down

0 comments on commit d17f195

Please sign in to comment.