genes underlying gseGO categories
1
0
Entering edit mode
7 months ago
LacquerHed ▴ 20

Wondering how I can get a list of the genes I submitted that fall within each category/term represented on the eventual dotplot. Thanks.

library(clusterProfiler)
library(enrichplot)
library(ggplot2)
organism = org.Mm.eg.db
library(org.Mm.eg.db)

original_gene_list <- df$log2FoldChange names(original_gene_list) <- df$GENENAME

gene_list<-na.omit(original_gene_list)

gene_list = sort(gene_list, decreasing = TRUE)

gse <- gseGO(geneList=gene_list,
ont ="ALL",
keyType = "SYMBOL",
minGSSize = 3,
maxGSSize = 800,
pvalueCutoff = .05,
verbose = TRUE,
OrgDb = organism,

gse_simplified <- simplify(gse, cutoff=0.5, by="pvalue", select_fun=min)

require(DOSE)

dotplot(gse_simplified, showCategory=10, split=".sign") + facet_grid(.~.sign)

gseGO GSEA clusterProfiler enrichPlot • 321 views
2
Entering edit mode
7 months ago
halo22 ▴ 270

If I understand correctly you are trying to plot each gene vs the category in which it was enriched. The gene can be enriched in several categories. I am not sure how a dot-plot would help. Have you checked: https://yulab-smu.top/biomedical-knowledge-mining-book/faq.html#showing-specific-pathways

0
Entering edit mode

Actually the plotting is not an issue, get what I need, I specifically need to know which of my genes falls within each category, even if there is overlap. Just trying to find a way to derive a list.

1
Entering edit mode

Your dataframe named gse should have a column with gene information enriched in each category. Try doing a as.data.frame(gse) to get the list.

0
Entering edit mode

Yes thats exactly what I need, thanks!