Entering edit mode
12 months ago
Chava
•
0
Hello,
I am trying to run GSEA with a specific background that contains all expressed genes, instead of choosing just "org.Mm.eg.db." 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(
gene_list_veh_Relapse_exF1_filtered,
ont = "BP",
keyType = "ENSEMBL",
OrgDb = "org.Mm.eg.db"
)
Thank you!
I don't know how to change the set of genes to test enrichment against using
gseGO
, but I know you can using thegprofiler2
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.
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
Hope this helps