Question: how to calculate running sum in R for GSEA
gravatar for Mo
5.4 years ago by
Mo920 wrote:


I am trying to implement a R function which does the GSEA. 

I read many papers related to this method and each of them tries to destroy the other and show a better performance of its own method (that is what we do as scientists :-D ) 

Anyway, what I am now working on is to find out how running sum works to calculate the Score! 

The running sum is to calculate the Enrichment Score over a gene set 

1- how to define a gene set ? for example if I have over 20000 genes, can I say the first 200 are one set , and the rest is another set ? 

2- how to calculate it ? what they say

"a Kolmogorov-Smirnov (K-S) running sum statistic is computed: beginning with the top-ranking gene, the running sum increases when a gene annotated to be a member of gene set S is encountered and decreases otherwise" 

Can someone explain how does this technique work ? 

Can it be done for one sample ? if not why ? 


gsea microarray data R • 3.4k views
ADD COMMENTlink modified 5.4 years ago by Giovanni M Dall'Olio27k • written 5.4 years ago by Mo920

You can actually download and have a look at how the authors implemented the original GSEA in R:

ADD REPLYlink written 5.4 years ago by maciek.kandula0
gravatar for Giovanni M Dall'Olio
5.4 years ago by
London, UK
Giovanni M Dall'Olio27k wrote:

The GSEA algorithm is already implemented in other R libraries. For example you can check the functions gseGO or gseAnalyzer from the clusterProfiler package. Check also the vignette for more examples.

ADD COMMENTlink written 5.4 years ago by Giovanni M Dall'Olio27k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 702 users visited in the last hour