Hello
I used this code to do a GO enrchment analisis with topGO as im working with Hydractinia symbiolongicarpus but i get this error when trying to use enrichplot to made a dotplot, anyone have any idea on how to fix it? or any idea of other packages to use?
library(topGO)
library(dplyr)
library(enrichplot)
all_genes <- genelist$gene_id
interesting_genes <- cluster_go$gene_id
geneList <- factor(as.integer (all_genes %in% interesting_genes))
geneList
names (geneList) <- all_genes
GO2genes <- cluster_GO %>%
group_by(GO) %>%
summarize(genes = list(unique(gene_id))) %>%
with(setNames(genes, GO))
GOdata <- new("topGOdata",
ontology = "BP",
allGenes = geneList,
nodeSize = 5,
annot = annFUN.GO2genes,
GO2genes = GO2genes)
result <- runTest(GOdata, algorithm = "classic", statistic = "fisher")
dot <- GenTable(GOdata, classicFisher = result, topNodes = 10)
dot
GO.ID Term Annotated Significant Expected
1 GO:0000003 reproduction 89 89 89
2 GO:0000041 transition metal ion transport 7 7 7
3 GO:0000045 autophagosome assembly 8 8 8
4 GO:0000070 mitotic sister chromatid segregation 9 9 9
5 GO:0000075 cell cycle checkpoint signaling 11 11 11
6 GO:0000077 DNA damage checkpoint signaling 8 8 8
7 GO:0000082 G1/S transition of mitotic cell cycle 8 8 8
8 GO:0000086 G2/M transition of mitotic cell cycle 12 12 12
9 GO:0000122 negative regulation of transcription by ... 20 20 20
10 GO:0000165 MAPK cascade 25 25 25
classicFisher
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Then when i use the next comand for wnrich plot and get this error
dot_plot <- dotplot(dot)
Error in (function (classes, fdef, mtable):unable to find an inherited method for function dotplot for signature "data.frame"