Functional enrichment analysis, visual representation with barplot: error: argument 2 matches multiple formal arguments
1
1
Entering edit mode
3.2 years ago

Hello,

I am performing pathway and gene enrichment analysis and I would like to visualise the enrichment result obtained from enrichGO in a barplot. I used barplot() from the package DOSE, but it keeps returning the error: Error in barplot.default(......) : argument 2 matches multiple formal arguments.

Here is my code and some screenshot of the table I created with enrichGO (the enrichment result).

Thank you in advance!

barplot(red_selected, x = "Count", color = "p.adjust", showCategory = 10, font.size = 12, title = "Red Cluster", label_format = 30, horiz = TRUE )

red_selected red_selected

analysis enrichment r gene • 3.4k views
ADD COMMENT
0
Entering edit mode

I don't think the barplot() you are using is from DOSE, it's from graphics.

Btw I recommend using ggplot2::ggplot() to make your plots, which is more flexible and pretty, at least for me.

ADD REPLY
0
Entering edit mode
3.2 years ago

It seems it is selecting the function barplot from graphics. Can you show the results of class(red_selected)? It should actually use the function barplot.enrichResult()

ADD COMMENT

Login before adding your answer.

Traffic: 1822 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