This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GSEA analysis in R

Hi, I did a GSEA analysis in R for Arabidopsis. Using the code :

                                     gse <- gseGO(gene_list,
                                            ont = "BP",
                                            keyType = "TAIR",
                                            OrgDb = "org.At.tair.db",
                                            eps = 1e-300)

Now I want to retrieve all the data from this analysis, eg- which genes are present in a particular GO term and which genes from my list (gene_list) are present in that GO term. How can we do this?

gsea r arabidopsis

One example:

###
ego3 <- gseGO(geneList     = geneList,
              OrgDb        = org.Hs.eg.db,
              ont          = "CC",
              minGSSize    = 100,
              maxGSSize    = 500,
              pvalueCutoff = 0.05,
              verbose      = FALSE)
head(ego3)

#Save 
write_delim(
  x = as.data.frame(ego3@result),
  path = "example_biostars_up.csv",
  delim = ","
)

My output (example_biostars_up.csv):

ID  Description setSize enrichmentScore NES pvalue  p.adjust    qvalue  rank    leading_edge    core_enrichment
GO:0000779  condensed chromosome, centromeric region    145 0.632642017 2.732065269 1.00E-10    1.38E-09    8.90E-10    798 tags=25%, list=6%, signal=24%   991/1062/10403/55355
GO:0000775  chromosome, centromeric region  196 0.60297971  2.719192288 1.00E-10    1.38E-09    8.90E-10    798 tags=22%, list=6%, signal=21%   55143/991/1062
GO:0000776  kinetochore 136 0.625389277 2.671942881 1.00E-10    1.38E-09    8.90E-10    767 tags=23%, list=6%, signal=22%   991/1062/10403

IDs by GO term:

GO:0000779 ---- 991/1062/10403/55355

Thank you. I have another question. Is there a way to get the gene list under "setSize" from the output that you gave as an example.

0 answers

No answers yet.

Log in to answer this question.