genes underlying gseGO categories
1
0
Entering edit mode
3.1 years ago
LacquerHed ▴ 30

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)


df = read.csv("subcluster3_001_genes.csv", header=TRUE)


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, 
             pAdjustMethod = "none")


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 • 1.8k views
ADD COMMENT
2
Entering edit mode
3.1 years ago
halo22 ▴ 300

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

ADD COMMENT
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.

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

Yes thats exactly what I need, thanks!

ADD REPLY

Login before adding your answer.

Traffic: 1981 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6