This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fgsea leading edge genes

I'm using fgsea to find enriched genes/pathways. The returned leading edges contain many overlapping genes, which I understand. What I don't understand is that many seem to be in the same order. Are the leading edges arranged by significance?

E.g.

 [1] "RPLP0"  "RPS2"   "RPL28"  "RPS17"  "RPL13A" "RPL4"   "RPS8"   "RPL39"  "RPL32"  "RPS18"  "RPS19"  "RPS16" 
[13] "RPSA"   "RPL8"   "RPS23"  "RPLP1"  "RPL24"  "RPL19"  "RPL27A" "RPS5"   "RPL37A" "RPL34"  "RPS29"  "RPL3"

Can I assume that RPLP0 is the "top" gene in this leading edge? Or is the order arbitrary?

gsea

Just check the rank of these genes in the ranked data that were input to fgsea, then you know.

1 answer

I asked the same question myself. I looked at the code of calcGseaStat function in fgsea package, and it appears that leading edge genes are in the same order as in the input data.

So, no, the first leading edge gene is not necessary the "top" gene.

Log in to answer this question.