Answers.Body: <p>The most intuitive explanation is  also explained in the background section:</p>
  
  <blockquote>
    <p>Conceptually, this methodology can be understood as a change in coordinate systems for gene expression data, from genes to gene sets.</p>
  </blockquote>
  
  <p>Which I think it is explained in Figure 1 of the paper, which is also one of the most informative I found about the methods of an algorithm<sup>1</sup>.
  <a href="https://i.sstatic.net/cRPLI.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cRPLI.jpg" alt="GSVA figure 1"></a>
  I'll will use it to explain what's going on.</p>
  
  <ol>
  <li>Fit a distribution function per gene</li>
  </ol>
  
  <blockquote>
    <p>For each gene expression profile ... a non-parametric kernel estimation ... function is performed.</p>
  </blockquote>
  
  <p>I can't give more detail because I haven't understood it fully</p>
  
  <ol start="2">
  <li><p>Then they are normalized to make the ranks symmetric around zero</p>
  
  <p>It is an inline formula between equations 2 and 3.</p></li>
  <li><p>The Kolmogorov-Smirnov like random walk statistic is applied to those kernel estimations normalized distributions. </p>
  
  <p>Which two distributions does it compare? The genes in a gene set and all the others (but I'm not totally sure)</p>
  
  <p>The role of random walk is explained a bit later from your quote:</p>
  
  <blockquote>
    <p>[the random walk] produces a distribution over the genes to assess if the genes in the gene set are more likely to be found at either tail of the rank distribution</p>
  </blockquote>
  
  <p>Which is later used to calculate the enrichment score by looking the maximum deviation from zero, or by summing the largest and the lowest deviations. </p></li>
  </ol>
  
  <p>To address some other questions:</p>
  
  <blockquote>
    <p>GSVA calculates sample-wise gene set enrichment scores as a function of genes inside and outside the gene set, analogously to a competitive gene set test</p>
  </blockquote>
  
  <hr>
  
  <p>1: Try finding which fittings and approximations are done inside limma</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-03-14T17:08:33.247Z
Answers.LastActivityDate: 2019-01-08T20:46:18.663Z
Answers.LastEditDate: 2019-01-08T20:46:18.663Z
Answers.UserDisplayName: llrs
Body: <p>I'm trying to understand the way the GSVA analysis is working behind the scenes.And I was wondering if there is any way to understand it more intuitively the whole process.</p>
  
  <p>So at first according to <a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-7" rel="nofollow noreferrer">paper</a> it <em>starts by evaluating whether a gene i is highly or lowly expressed in sample j in the context of the sample population distribution.</em> They use these kernel estimations of the cumulative density functions to transform the initial values so not to be affected by the problematic intensities.</p>
  
  <p>After this "transformation" and a following normalization, GSVA calculates the enrichment scores <em>using the Kolmogorov-Smirnov (KS) like random walk statistic</em>. </p>
  
  <p>As I know, Kolmogorov-Smirnov checks for differences in distributions. Which distributions does it check? Gene-set's against all the others genes? And what is the role of the random walk?</p>
  
  <p>So is there any intuitive way to understand this kind of Kolmogorov-Smirnov (KS) like random walk statistic? How does it actually work? Which one is the null and which the alternative hypothesis in that case? </p>
  
Tags: <r>
Title: Intuitive explanation of GSVA analysis
ThreadText: # Intuitive explanation of GSVA analysis
  
  (Asked by: username_0 on 2018-03-10)
  
  I'm trying to understand the way the GSVA analysis is working behind the scenes.And I was wondering if there is any way to understand it more intuitively the whole process.
  
  So at first according to [paper](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-7) it *starts by evaluating whether a gene i is highly or lowly expressed in sample j in the context of the sample population distribution.* They use these kernel estimations of the cumulative density functions to transform the initial values so not to be affected by the problematic intensities.
  
  After this "transformation" and a following normalization, GSVA calculates the enrichment scores *using the Kolmogorov-Smirnov (KS) like random walk statistic*.
  
  As I know, Kolmogorov-Smirnov checks for differences in distributions. Which distributions does it check? Gene-set's against all the others genes? And what is the role of the random walk?
  
  So is there any intuitive way to understand this kind of Kolmogorov-Smirnov (KS) like random walk statistic? How does it actually work? Which one is the null and which the alternative hypothesis in that case?
  
  **Tags:** r
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-14. Score: 4
  
  The most intuitive explanation is also explained in the background section:
  
  > Conceptually, this methodology can be understood as a change in coordinate systems for gene expression data, from genes to gene sets.
  
  Which I think it is explained in Figure 1 of the paper, which is also one of the most informative I found about the methods of an algorithm1.
  [![GSVA figure 1](https://i.sstatic.net/cRPLI.jpg)](https://i.sstatic.net/cRPLI.jpg)
  I'll will use it to explain what's going on.
  
  1. Fit a distribution function per gene
  
  > For each gene expression profile ... a non-parametric kernel estimation ... function is performed.
  
  I can't give more detail because I haven't understood it fully
  
  2. Then they are normalized to make the ranks symmetric around zero
  
     It is an inline formula between equations 2 and 3.
  3. The Kolmogorov-Smirnov like random walk statistic is applied to those kernel estimations normalized distributions.
  
     Which two distributions does it compare? The genes in a gene set and all the others (but I'm not totally sure)
  
     The role of random walk is explained a bit later from your quote:
  
     > [the random walk] produces a distribution over the genes to assess if the genes in the gene set are more likely to be found at either tail of the rank distribution
  
     Which is later used to calculate the enrichment score by looking the maximum deviation from zero, or by summing the largest and the lowest deviations.
  
  To address some other questions:
  
  > GSVA calculates sample-wise gene set enrichment scores as a function of genes inside and outside the gene set, analogously to a competitive gene set test
  
  ---
  
  1: Try finding which fittings and approximations are done inside limma
  
  
  ---
  
  