Is it possible to do this in the same line of code, using the dotplot function from clusterProfiler. I’ve been looking for information I got this line
options(enrichplot.colours = c("red","blue"))
dotplot(ego2)
But, I would like to follow another syntax structure if possible
clusterProfiler::dotplot(ego, showCategory=15) +
theme(axis.text.y = element_text(size=8)) +
scale_color_gradient(low = "green", high = "red")
Previous code to get to ego and the clusterProfiler
# list of genes
signif_genes <- c("TGFB2", "IFNG", "IL10", "IDO", "NLRP1", "IL1B", "NAMPT", "LAG3",
"NFE2L2", "NLRP3", "PIK3CB", "CDKN2A", "CD86")
# Ejecutar análisis de enriquecimiento GO
ego <- enrichGO(gene = signif_genes,
keyType = "SYMBOL", # cambiar a symbols
OrgDb = org.Hs.eg.db,
ont = "BP", # Biological process, también hay MF y CC disponibles
pAdjustMethod = "none",
qvalueCutoff = 0.05,
readable = F)