Skip to content

Commit

Permalink
fix(ora): fix error when multiple databases are given to ORA (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblacksand authored Jul 1, 2024
1 parent be9344d commit beffc57
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions R/WebGestaltROra.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ WebGestaltROra <- function(organism = "hsapiens", enrichDatabase = NULL, enrichD
################ Check parameter ################
errorTest <- parameterErrorMessage(enrichMethod = enrichMethod, organism = organism, collapseMethod = collapseMethod, minNum = minNum, maxNum = maxNum, fdrMethod = fdrMethod, sigMethod = sigMethod, fdrThr = fdrThr, topThr = topThr, reportNum = reportNum, isOutput = isOutput, outputDirectory = outputDirectory, dagColor = dagColor, hostName = hostName, cache = cache)
if (!is.null(enrichDatabase)) {
if (enrichDatabase == "all") {
all_sets <- listGeneSet(organism = organism, hostName = hostName, cache = cache)
all_sets <- all_sets[all_sets$idType == "entrezgene", ]
enrichDatabase <- all_sets$name
enrichDatabaseType <- all_sets$idType
if (is.character(enrichDatabase) & length(enrichDatabase) == 1) {
if (enrichDatabase == "all") {
all_sets <- listGeneSet(organism = organism, hostName = hostName, cache = cache)
all_sets <- all_sets[all_sets$idType == "entrezgene", ]
enrichDatabase <- all_sets$name
enrichDatabaseType <- all_sets$idType
}
}
}
if (!is.null(errorTest)) {
Expand Down

0 comments on commit beffc57

Please sign in to comment.