> ## Content Index
> Fetch the complete content index at: https://bioinformatics.ghost.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# RRHO (Rank Rank Hypergeometric Overlap)
- URL: https://bioinformatics.ghost.io/rrho-rank-rank-hypergeometric-overlap/
- Published: 2017-12-24T01:05:27.000Z
- Updated: 2017-12-24T01:05:27.000Z
- Author: Aarthi Ramakrishnan
- Tags: programming, #Import 2026-08-27 15:34

RRHO is used to find the overlap between two gene lists. To generate an RRHO, every gene in each gene list should have a log fold change and a p-value associated to it. This test does not consider a fold change or a p-value cutoff. Rather, it includes ALL the genes in the gene lists.

**Steps to generate RRHO -**

1. The first step is to identify the common genes between 2 gene lists. If the first gene list has 300 genes, and second gene list has 290 genes, 289 genes remain in both gene lists (assuming 289 genes are common b/w the two lists).
2. Next, genes in each gene list are ranked based on the signed negative log of p-value. 'Signed' here refers to assigning a '+' or a '-' sign to the - log (p-value), depending on whether the gene is up or down-regulated. The genes at the top of the list would have the most significantly up-regulated genes, and the genes at the bottom would have the most significantly down-regulated genes.**Gene list 1**gene8 | rank1 <-- most significantly up-regulated gene53 | rank2 gene6 | rank3 ... | ... gene1 | rank288 gene5 | rank289 <-- most significantly down-regulated**Gene list 2**gene5 | rank1 <-- most significantly up-regulated gene10 | rank2 gene31 | rank3 ... | ... gene94 | rank288 gene8 | rank289 <-- most significantly down-regulated
3. The ranks are then used to generate a scatter plot and to compute spearman correlation between the two gene lists. This is done to know whether there is a positive or a negative correlation between the two lists.
4. A step size is calculated. Step size depends upon the length of each gene list. We can consider 17 (square root of 289) as the step size.
5. Considering the top 17 genes in gene list 1 and top 17 genes in gene list 2, a hypergeometric test is carried out to find the significance of overlap. Next, top 17 genes from gene list 1 and top 34 (17 + step size) genes in gene list 2 are considered, and hypergeometric test is used to find the significance. This step is carried out until we are through all 289 genes, and obtain 289 hypergeometric p-value measurements.Gene list 1 | Gene list 2 | p-value| 17 genes | 17 genes | ..| 17 genes | 34 genes | ..| 17 genes | 51 genes | ..| ... | ... | ..| 34 genes | 17 genes | ..| 34 genes | 34 genes | ..| 34 genes | 51 genes | ..| ... | ... | ..| 289 genes | 289 genes | ..|

We use this list of p-values to fill the RRHO matrix, starting from the bottom left corner. We should also apply a bonferroni correction to the p-values in the RRHO matrix.

In the end, we obtain a 17x17 matrix for -log(p-values). This matrix is typically represented as a heat map; the color scale ranging from red (for most significant) to blue (least significant).

![RRHO](https://aartrama.github.io/assets/images/RRHO.gif)

[Source](https://openi.nlm.nih.gov/detailedresult.php?img=PMC4396151%5F12964%5F2015%5F96%5FFig6%5FHTML&req=4&ref=bioinformatics.ghost.io)

The red signal at the bottom left quadrant represents the presence of significantly co up-regulated genes. Red denotes high significance, and blue denotes poor significance of overlap.

The 4 quadrants of the RRHO map represent the following -

| Up in list1, down in list2 | Co down-regulated | | Co up-regulated | Up in list2, Down in list1 |

Reference: [https://academic.oup.com/nar/article/38/17/e169/1033168](https://academic.oup.com/nar/article/38/17/e169/1033168?ref=bioinformatics.ghost.io)

Caveat: The RRHO cannot represent negative correlations, i.e., if the spearman correlation is negative, the RRHO map would appear blue.