Closed phancanhtrinh closed 1 year ago
@phancanhtrinh I do not remember out of the top of my head the names of the columns from enrichGo.
You can assemble the fraction with aes(label=sprintf("%i/%i", <responding genes>, <genes in the Go term>))
. Both values should be integers. The <...>
should be replaced by the names of the variables in your data
.
This is not a 'ggrepel' specific question, so you would get an answer faster in Stackoverflow using tag [ggplot2]
Hi Kamil It worked. Thank you very much.
Summary
I am using enrichGO from clusterProfiler to generate a GO object. I use dotplot function from enrichplot to make dotplot, I want to add geom_text for each dot with BgRatio (number/number). But, BgRatio is always automatic transform to a float number. Could you help me with this problem.
Minimal code example
dotplot(GO_comm_BvsP) + geom_text(aes(label=BgRatio))
Thank you very much!