I was wondering how to get the list of genes grouped in a particular GO-Term of Biological Pathway. I have an enrichGO output (using the clusterprofiler package). From this result, I've into a bar plot (see below). For example, my top enriched pathway is T cell activation, how do I obtain the genes which have been grouped into this pathway?
My code is taken from the clusterProfiler book:
ego2 <- enrichGO(gene = gene.df$ENTREZID, OrgDb = org.Mm.eg.db, keyType = 'ENTREZID', ont = "BP", pAdjustMethod = "BH", pvalueCutoff = 0.01, qvalueCutoff = 0.05) barplot(ego2, showCategory=10)
Here are some screenshots of what my data looks like in R: