YuLab-SMU / clusterProfiler

:bar_chart: A universal enrichment tool for interpreting omics data
https://yulab-smu.top/biomedical-knowledge-mining-book/
967 stars 248 forks source link

compareCluster: List all the enrichKEGG results? #33

Closed xphab closed 8 years ago

xphab commented 8 years ago

Dear Guangchuang,

Thanks for your great works for this helpful package.

I tried the "compareCluster" command with fun='enrichKEGG'. I input 2 samples, while got 1 results (compared results, that make sense).

cp = list(a.gene=a[,1], b.gene=b[,1]) 
xx <- compareCluster(cp, fun="enrichKEGG", organism="syz", pvalueCutoff=1)
plot(xx)

I wonder if I could get 2 results, and then I could plot them in one figure with dotplot(xx). I mean I can run enrichKEGG() twice (one for a[,1], one for b[,1]) and plot the 2 results with dots in 2 figures. Could I dotplot the 2 results in one figure, like your example:

xx.formula <- compareCluster(Entrez~group, data=mydf, fun='enrichKEGG')
plot(xx.formula)

I wish you can understand what i mean for my poor english. Thanks again! Best wishes, Peng

GuangchuangYu commented 8 years ago

plot(xx) in your example will produce similar figure as plot(xx.formula) in the formula example.

I guess what you want is to produce independent dotplot of a.gene and b.gene and align them together.

This is possible.

With the example posted in https://github.com/GuangchuangYu/clusterProfiler/issues/32:

 dotplot(xx, x=~Count) + facet_grid(~Cluster)

will generate the following figure: screenshot 2015-11-12 11 30 21

With your example, you can also use the above command.

xphab commented 8 years ago

Thx a lot! I will try it!

GuangchuangYu commented 8 years ago

As https://github.com/GuangchuangYu/clusterProfiler/issues/32 example contains more complex group structure, we can produce even more complex figure:

dotplot(xx, x=~Count) + facet_grid(othergroup~group)

screenshot 2015-11-12 11 42 06

xphab commented 8 years ago

Thx a looooooooooooooooooooooooot!!!!

On 2015年11月12日 11:42, Guangchuang Yu wrote:

Another example:

dotplot(xx,x=~Count)+ facet_grid(othergroup~group)

screenshot 2015-11-12 11 42 06 https://cloud.githubusercontent.com/assets/626539/11110065/716d7950-8932-11e5-9c03-077fd9a37c57.png

— Reply to this email directly or view it on GitHub https://github.com/GuangchuangYu/clusterProfiler/issues/33#issuecomment-155987755.

xphab commented 8 years ago

Hi Guangchuang,

dotplot(xx, x=~Count) + facet_grid(othergroup~group) Error in .local(object, ...) : unused argument (x = ~Count)

when i follow the example in #32.. any idea please? Thank you!

2015-11-12 11:42 GMT+08:00 Guangchuang Yu notifications@github.com:

Another example:

dotplot(xx, x=~Count) + facet_grid(othergroup~group)

[image: screenshot 2015-11-12 11 42 06] https://cloud.githubusercontent.com/assets/626539/11110065/716d7950-8932-11e5-9c03-077fd9a37c57.png

— Reply to this email directly or view it on GitHub https://github.com/GuangchuangYu/clusterProfiler/issues/33#issuecomment-155987755 .

Shenzhen Key Laboratory of Marine Biological Resources and Ecological Environment College of Life Sciences, Shenzhen University 518060, Shenzhen, China E-mail: googneed@gmail.com Tel: +86 15827609557

GuangchuangYu commented 8 years ago

you should install the dev branch of clusterProfiler:

devtools::install_github(c("hadley/ggplot2", "GuangchuangYu/DOSE", "GuangchuangYu/clusterProfiler"))
xphab commented 8 years ago

i use rstudio, and it showed that error: and when i use sudo rstudio, it works well!

Thanks again! Best wishes, Peng

2015-11-12 13:42 GMT+08:00 Guangchuang Yu notifications@github.com:

you should install the dev branch of clusterProfiler:

devtools::install_github(c("hadley/ggplot2", "GuangchuangYu/DOSE", "GuangchuangYu/clusterProfiler"))

— Reply to this email directly or view it on GitHub https://github.com/GuangchuangYu/clusterProfiler/issues/33#issuecomment-156008078 .

Shenzhen Key Laboratory of Marine Biological Resources and Ecological Environment College of Life Sciences, Shenzhen University 518060, Shenzhen, China E-mail: googneed@gmail.com Tel: +86 15827609557