RRHO2_heatmap: RRHO2

View source: R/RRHO2_heatmap.R

RRHO2_heatmapR Documentation

RRHO2

Description

An improved version for RRHO, which aims to correct the intepretation for top left region (up in x and down in y) nad bottom right region.

Usage

RRHO2_heatmap(
  RRHO_obj,
  maximum = NULL,
  minimum = NULL,
  colorGradient = NULL,
  ...
)

Arguments

RRHO_obj

RRHO object. See RRHO2_initialize for details.

maximum

Maximum value of the heatmap.

minimum

Maximum value of the heatmap.

colorGradient

A vector of gradient colors. Default NULL is the rainbow color.

...

other parameter for the figure control.

Details

We improved the algorithm such that all four regions of RRHO plot are meaningful

Author(s)

Kelly and Caleb

Examples


## A total of 2000 genes in both list 1 and list 2.
## In list 1, genes 1-200 are up-regulated; genes 201-400 are down-regulated; the rest of the 1600 genes are noise genes. 
## In list 2, genes 1-200 are up-regulated; genes 201-400 are down-regulated; the rest of the 1600 genes are noise genes.  

set.seed(15213)
nGenes <- 2000
nDE <- 200
Genes <- paste0("Genes",1:nGenes)

list1_pvalue_1_200 <- runif(nDE,0,0.05)
list1_pvalue_201_400 <- runif(nDE,0,0.05) 
list1_pvalue_401_2000 <- runif(nGenes - 2 * nDE,0,1)
list1_DDE <- c(-log10(list1_pvalue_1_200), -log10(list1_pvalue_201_400) * (-1), -log10(list1_pvalue_401_2000) * sample(c(1,-1), length(list1_pvalue_401_2000), replace = TRUE))

gene_list1 <- data.frame(Genes=Genes,DDE = list1_DDE, stringsAsFactors = FALSE)

list2_pvalue_1_200 <- runif(nDE,0,0.05)
list2_pvalue_201_400 <- runif(nDE,0,0.05) 
list2_pvalue_401_2000 <- runif(nGenes - 2 * nDE,0,1)
list2_DDE <- c(-log10(list2_pvalue_1_200), -log10(list2_pvalue_201_400) * (-1), -log10(list2_pvalue_401_2000) * sample(c(1,-1), length(list2_pvalue_401_2000), replace = TRUE))

gene_list2 <- data.frame(Genes=Genes,DDE = list2_DDE, stringsAsFactors = FALSE)

RRHO_obj <-  RRHO2_initialize(gene_list1, gene_list2, labels = c("list1", "list2"), log10.ind=TRUE)

RRHO2_heatmap(RRHO_obj)


RRHO2/RRHO2 documentation built on March 22, 2022, 12:04 p.m.