This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Functional enrichment analysis, visual representation with barplot: error: argument 2 matches multiple formal arguments

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

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.

1 answer

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()

Log in to answer this question.