Closed markziemann closed 5 years ago
After performing an enrichment analysis, it is possible to get it nearly perfect
library(echarts4r)
library(tidyverse)
myres<-head(res$enrichment_result,100)
myres$pointsize<-10
XCOL=colnames(myres)[4]
YCOL=colnames(myres)[5]
myres %>%
tibble::rownames_to_column("model") %>%
mutate(set = paste(set, setSize, pMANOVA, p.adjustMANOVA , sep = ",")) %>%
e_charts(s.rna) %>%
e_x_axis(name = XCOL) %>% # add x axis name
e_y_axis(name = YCOL) %>% # add x axis name
e_scatter(s.rna, s.k9a , bind = set , symbolSize = 10 ) %>%
e_tooltip(formatter = htmlwidgets::JS("
function(params){
var vals = params.name.split(',')
return('<strong>' + vals[0] +
'</strong><br />s.x-axis: ' + parseFloat(params.value[0]).toFixed(2) +
'<br />s.y-axis: ' + parseFloat(params.value[1]).toFixed(2)) +
'<br />setSize: ' + vals[1] +
'<br />p MANOVA: ' + Number(vals[2]).toPrecision(2) +
'<br />p-adjust MANOVA: ' + Number(vals[3]).toPrecision(2)
}"))