Question: Include gene ontology codes in the plots generated using the enrochplot package
0
gravatar for banerjeeshayantan
9 weeks ago by
banerjeeshayantan190 wrote:

I was trying to plot the gene ontology (BP; CC; MF) terms for a set of genes as shown in the figure below. The codes used to generate the plot is
go <- enrichGO(de, OrgDb = "org.Hs.eg.db", ont="all") dotplot(go, split="ONTOLOGY") + facet_grid(ONTOLOGY~., scale="free")

However, instead of the gene ontology names (such as organelle fission), I want to plot the GO codes (GO:0048285) on the y axis. Is there any way to do that? Also, my second question is regarding the x axis. What does "Gene ratio" represent here? Is it the number of genes enriched for that particular term divided by the total number of genes? enter image description here

ADD COMMENTlink modified 8 weeks ago by ATpoint46k • written 9 weeks ago by banerjeeshayantan190
3
gravatar for ATpoint
8 weeks ago by
ATpoint46k
ATpoint46k wrote:

Hi,

if I read the source code correctly then the Description column is unfortunately harcoded.

The easiert workaround would simply be to replace this column by the one you want.

library(clusterProfiler)
library(DOSE)

#/ Some example data:
data(geneList)
de <- names(geneList)[1:100]
go <- enrichGO(de, OrgDb = "org.Hs.eg.db", ont = "all")

#/ Make a copy to keep the original and replace description with ID:
go2 <- go
go2@result$Description <- go2@result$ID
dotplot(go2)

enter image description here

You could of course also extract the results and make a custom plot.

For the gene ratio question maybe see ClusterProfiler : What is GeneRatio and BgRatio? but this is most likely explained somewhere in the vignette / manual.

ADD COMMENTlink modified 8 weeks ago • written 8 weeks ago by ATpoint46k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1886 users visited in the last hour
_