This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to solve: fgsea returns empty dataframe

I am trying to run fgsea on a vector, v, containing Pearson's correlation. The vector names contain the corresponding gene IDs. When I run the following command, I get back an empty dataframe.

fgseaRes <- fgsea(pathways=examplePathways, stats=v, minSize=15, maxSize=500, nperm=100000)

I've tested the command on the example pathways and exampleRanks and get back a full result so I'm not sure why this return an empty dataframe.

class(v) and typeof(v) return the same as class(exampleRanks) and typeof(exampleRanks). My vector has also been sorted in increasing order using: v <- sort(v, decreasing=FALSE)

Anyone can help with this?

gsea r fgsea

1 answer

I realised that I am using examplePathways which doesn't cover all the genes. Solution was to download pathways from Broad instead: http://software.broadinstitute.org/gsea/msigdb/collections.jsp#H

Log in to answer this question.