extracting gene names from clusterProfiler following gseGO
Hello All,
I have run the gseGO function from clusterProfiler.
gse <- gseGO(geneList=gene_list,
ont ="MF",
keyType = "ENSEMBL",
minGSSize = 10,
maxGSSize = 800,
pvalueCutoff = 0.01,
verbose = TRUE,
OrgDb = organism,
pAdjustMethod = "BH",
eps = 0)
I have dotplots of the significantly enriched pathways. I would like to extract the gene lists from a certain pathway. I have tried using
slotNames(gse)
target_genes <- gse@result$geneID[15]
but the resulting object is NULL
15 is the number corresponding to the readout from
gse$Description
I have tried to use other numbers but all are NULL
Does anyone have any ideas?
• 2,127 views
•
link
1 answer
There is no column geneID in gse@result. You need target_genes <- gse@result$core_enrichment[15]
• 0 views
•
link
Log in to answer this question.
Going off the top of my head I think you can convert the results to a data.frame using
as.data.frame(gse). You then want to filter the row with the correct term, and then one of the columns will have the relevant gene names.