Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Jun 19, 2024
1 parent 79404bc commit 3c42304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/Seurat.Utils.Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -3251,7 +3251,7 @@ scBarplotEnrichr <- function(df.enrichment,
nr_input_genes <- length(df.enrichment@'gene')

pobj <-
if(nrow(df.enrichment) < 1) {
if(nrow(df.enrichment) < 1 | is.null (df.enrichment)) {
warning("No enriched terms input!", immediate. = TRUE)
ggplot() + theme_void() + annotate("text", x = 1, y = 1, label = "NO ENRICHMENT",
size = 8, color = "red", hjust = 0.5, vjust = 0.5)
Expand Down

0 comments on commit 3c42304

Please sign in to comment.