how to run GSEA with spesific background
Entering edit mode
11 weeks ago
Chava • 0


I am trying to run GSEA with a specific background that contains all expressed genes, instead of choosing just "" How can I do that?

I filtered out all rows that don't have at least one value greater than 20. Here's how I run the normal GSEA:

gse_veh_Relapse_exF1 <- gseGO(
    ont = "BP",
    keyType = "ENSEMBL",
    OrgDb = ""

Thank you!

RNA-seq GSEA • 282 views
Entering edit mode

I don't know how to change the set of genes to test enrichment against using gseGO, but I know you can using the gprofiler2 package, though it can be a little fiddly generating the data for the GMT files.

Though can you give some more details on your logic? Unless I am misunderstanding your question, I don't think removing genes from a background is a appropriate unless you have a good reason. Not being expressed in your dataset doesn't sound like a compelling reason to remove them from background set to me.

Entering edit mode

I have been playing around with GSEA myself recently and I found 2 helpful ways of being more precise on selecting the gene background.

  • one version is to use the GSEA() function in R from the clusterProfiler package. Here you provide a background gene list (TERM2GENE arg) that can be defined by selecting a more specified msigdbr database. For example:

    msigdbr(species = "Mus musculus", category = "C5", subcategory = "BP")

For this I found a good video here

  • the other option was as dthorbur mentioned to download the desired GMT files and generate a custom one yourself. It is indeed a bit of work but I found a decent tutorial (also the video) here

Hope this helps


Login before adding your answer.

Traffic: 2746 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6