kevinblighe / EnhancedVolcano

Publication-ready volcano plots with enhanced colouring and labeling
397 stars 81 forks source link

Errors when using EnhancedVolcano with plotly::ggplotly #114

Open dy-lin opened 1 year ago

dy-lin commented 1 year ago

I've verified that my plot is infact a ggplot object:

> class(p)
[1] "gg"     "ggplot"

Most ggplot objects can be made interactive by doing:

plotly::ggplotly(p)

However, I get these errors:

> plotly::ggplotly(p)
Error in unique.default(x) : unique() applies only to vectors
In addition: Warning messages:
1: `gather_()` was deprecated in tidyr 1.2.0.
Please use `gather()` instead.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 
2: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
  geom_GeomTextRepel() has yet to be implemented in plotly.
  If you'd like to see this geom implemented,
  Please open an issue with your example code at
  https://github.com/ropensci/plotly/issues
3: In if (robust_nchar(axisTitleText) > 0) { :
  the condition has length > 1 and only the first element will be used
4: In if (robust_nchar(axisTitleText) > 0) { :
  the condition has length > 1 and only the first element will be used

I'd like to not use ggrepel to label any points, and rather be able to hover over each point to see the gene, log fold change, and p-value using plotly.

diyabasu97 commented 1 month ago

Hi, By any chance did you get any solution this. I am also trying to use ggplotly on EnhancedVolcanoPlot but I am getting the below error:- Error in if (robust_nchar(axisTitleText) > 0) { : the condition has length > 1

It will be helpful if you are able to guide me this.

Regards, Diya