enrichplot
enrichplot copied to clipboard
Dotplot and barplot shows (Error in ans[ypos] <- rep(yes, length.out = len)[ypos] ) and a warning message, even though the enrichResult is not emplty
I ran the general pipeline with entrez_ids from my DEG analysis
gene_list <- DEG_genes_WT1_cells_myo %>% filter(avg_log2FC >= 0.4) %>% pull(X)
entrez_ids <- bitr(gene_list, fromType = "SYMBOL", toType = "ENTREZID", OrgDb = org.Hs.eg.db)$ENTREZID
kegg_results <- enrichKEGG(entrez_ids, organism = "hsa", keyType = "kegg", pvalueCutoff = 0.05, pAdjustMethod = "BH", minGSSize = 5, use_internal_data = F)
kegg_results <- setReadable(kegg_results, OrgDb = org.Hs.eg.db, keyType = "ENTREZID")
when I ran for visualization, the following error were shown
> dotplot(kegg_results, showCategory = 20)
Error in ans[ypos] <- rep(yes, length.out = len)[ypos] :
replacement has length zero
In addition: Warning message:
In rep(yes, length.out = len) : 'x' is NULL so the result will be NULL
> barplot(kegg_results, showCategory = 5)
Error in ans[ypos] <- rep(yes, length.out = len)[ypos] :
replacement has length zero
In addition: Warning message:
In rep(yes, length.out = len) : 'x' is NULL so the result will be NULL
the following libraries were called out
library(clusterProfiler)
library(org.Hs.eg.db)
library(dplyr)
library(DOSE)
library(enrichplot)
every one of them is up-to-date
enrichplot_1.26.6 DOSE_4.0.0 org.Hs.eg.db_3.20.0 AnnotationDbi_1.68.0 IRanges_2.40.1 S4Vectors_0.44.0 Biobase_2.66.0
[8] BiocGenerics_0.52.0 clusterProfiler_4.14.4 RColorBrewer_1.1-3 DoubletFinder_2.0.4 harmony_1.2.3 Rcpp_1.0.14 gridExtra_2.3
[15] RCurl_1.98-1.16 lubridate_1.9.4 forcats_1.0.0 stringr_1.5.1 purrr_1.0.4 readr_2.1.5 tidyr_1.3.1
[22] tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0 dplyr_1.1.4 patchwork_1.3.0 cowplot_1.1.3 Seurat_5.2.1
[29] SeuratObject_5.0.2 sp_2.2-0
Please let me know what to do as I looked at multiple places and haven't found anything yet. Thanks in advance
Chanukya