Skip to content

Commit

Permalink
2nd. Fixed bugs in EnrichmentPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao-njmu committed Sep 13, 2023
1 parent 3838101 commit fa5dec2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/SCP-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -12712,16 +12712,17 @@ EnrichmentPlot <- function(srt, db = "GO_BP", group_by = NULL, test.use = "wilco
if (!is.null(group_use)) {
res <- res[res[["Groups"]] %in% group_use, , drop = FALSE]
}

metric <- ifelse(is.null(padjustCutoff), "pvalue", "p.adjust")
if (length(id_use) > 0) {
pvalueCutoff <- Inf
padjustCutoff <- Inf
compare_only_sig <- FALSE
topTerm <- Inf
res <- res[res[["ID"]] %in% id_use, , drop = FALSE]
}

metric <- ifelse(is.null(padjustCutoff), "pvalue", "p.adjust")
metric_value <- ifelse(is.null(padjustCutoff), pvalueCutoff, padjustCutoff)

pvalueCutoff <- ifelse(is.null(pvalueCutoff), Inf, pvalueCutoff)
padjustCutoff <- ifelse(is.null(padjustCutoff), Inf, padjustCutoff)

Expand Down

0 comments on commit fa5dec2

Please sign in to comment.