diff --git a/R/Seurat.Utils.Visualization.R b/R/Seurat.Utils.Visualization.R index 7067fc1..e5b3880 100644 --- a/R/Seurat.Utils.Visualization.R +++ b/R/Seurat.Utils.Visualization.R @@ -3171,13 +3171,14 @@ scGOEnrichment <- function(genes, universe = NULL, is.character(ont) ) + if ( is.null(genes) | length(genes) == 0 ) return(NULL) + # check.gene.symbols if (check.gene.symbols) { x <- checkGeneSymbols(genes, species = "human") genes <- x[x[ , "Approved"] , 1] } - message("Performing enrichGO() analysis...") message(length(genes), " approved genes of interest, in ", length(universe), " background genes.")