Hello, I would like to know if using the cnetplot function, I can choose a specific category to graph. For example, if I have three categories, graph each one independently.
Hello, I would like to know if using the cnetplot function, I can choose a specific category to graph. For example, if I have three categories, graph each one independently.
So it sounds like you want to be able to subset an enrichResult-class
based on the category and plot that single category. I found a solution in this github issue here. You can plot a single category at a time like this:
x <- ego[ego$Description == "protein targeting", asis = TRUE]
cnetplot(x)
The trick here is to use the asis = TRUE
argument, as that will keep it as enrichResult-class
to use in the cnetplot
. So you can make 3 separate objects for each category, then make separate plots for each. Also, you can only do this with the development version of the pacakge DOSE
. You can download it like this: devtools::install_github("GuangchuangYu/DOSE")
.
Jamie
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.