enrichPlot error when plotting topGO results
1
0
Entering edit mode
nromerov • 0
@3ef12fd6
Last seen 4 weeks ago
Colombia

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
topGO enrichplot • 955 views
ADD COMMENT
0
Entering edit mode

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"

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 9 hours ago
United States

You need to get familiar with the help system for R. There is a help page for dotplot which indicates what sort of input dotplot expects (not a data.frame), and also has an example that you can emulate. There is also an actual book that you could read.

The enrichplot package doesn't depend on (or suggest) topGO, so there is no reason that you should expect that the output from topGO should be suitable as input to functions in enrichplot.

ADD COMMENT

Login before adding your answer.

Traffic: 656 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6