Hi! I did over representation analysis for the comparison group 1 vs group 2, group 1 vs group3 and group 2 vs group 3. I would like to plot an "upsetplot" style plot that has altered pathways for each subgroup has rows and has rows the comparions (e.g group 1 vs group 2, group 1 vs group3 and group 2 vs group 3). And the dots colored according to the adj p values and number of genes on each pathway for each comparison. Is there any package that plots this easily.
In this tutorial https://yulab-smu.top/biomedical-knowledge-mining-book/enrichplot.html the upset plot is created by taking one enrich object and plotting common genes between different pathways, I want to take three enrich objects and plot pathways in common in a upsetplot like plot.
genes <- names(gene_list)[abs(gene_list) > 0.75]
genes2 <- names(gene_list2)[abs(gene_list2) > 0.75]
genes3 <- names(gene_list3)[abs(gene_list3)> 0.75]
go_enrich <- enrichGO(gene = genes,
universe = names(gene_list),
OrgDb = org.Hs.eg.db,
keyType="SYMBOL",
ont = "ALL",
pAdjustMethod = "fdr",
pvalueCutoff = 0.05,
readable = TRUE)
go_enrich_2 <- enrichGO(gene = genes2,
universe = names(gene_list2),
OrgDb = org.Hs.eg.db,
keyType="SYMBOL",
ont = "ALL",
pAdjustMethod = "fdr",
pvalueCutoff = 0.05,
readable = TRUE)
go_enrich_3 <- enrichGO(gene = genes3,
universe = names(gene_list3),
OrgDb = org.Hs.eg.db,
keyType="SYMBOL",
ont = "ALL",
pAdjustMethod = "fdr",
pvalueCutoff = 0.05,
readable = TRUE)
Could you give an example of the plot you want ? It is hard to imagine with the description you gave
You can create Upset plots with the UpSetR or ComplexUpset packages
Like this NOS VS DDLPS, ... are the comparisons, X, Y and Z are the pathways. Firstly would like just to do this. the green circle would light up if the pathway is altered for that comparison. Later would like to add some side notation related to the adj p value and the gene size (number of DE genes in that pathway for each comparison).
Ok, then you can definitely start with ComplexUpset package : https://krassowski.github.io/complex-upset/articles/Examples_R.html
You will have to play with several arguments to customize your plot