RRHO2_vennDiagram: RRHO2

View source: R/RRHO2_vennDiagram.R

RRHO2_vennDiagramR 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_vennDiagram(RRHO_obj, type = NULL)

Arguments

RRHO_obj

RRHO object. See RRHO2_initialize for details.

type

Must be one of the following. 1, dd; 2, uu; 3, ud; 4, du. The Venn diagram is always counting from the highest point within its quadrant (the pixel such that the p-value is the most significant). The first letter represents the direction in list 1 (d: down; u: up). For example dd represent down regulation in list 1 and down regulation in list 2.

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_vennDiagram(RRHO_obj, type="dd")


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