cnetplot graph independently.
1
0
Entering edit mode
MperezM • 0
@mperezm-21063
Last seen 4.7 years ago

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.

go annotation • 1.9k views
ADD COMMENT
0
Entering edit mode
jmoon1194 • 0
@jmoon1194-20137
Last seen 7 months ago
United States

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

ADD COMMENT

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6