plotVennDE {RCPA}R Documentation

Plot Venn diagram from multiple DE Analysis results

Description

Plot a Venn diagram from multiple DE Analysis results.

Usage

plotVennDE(
  DEResults,
  pThreshold = 0.05,
  useFDR = TRUE,
  stat = "logFC",
  statThreshold = 0,
  topToList = 10
)

Arguments

DEResults

A list of data frames with the results of DE analysis.

pThreshold

The p-value threshold to determine if a gene is differentially expressed.

useFDR

Use the FDR adjusted p-value instead of the raw p-value.

stat

The additional statistics column to use for filtering differentially expressed genes.

statThreshold

The absolute value of the statistic threshold to use for filtering differentially expressed genes. Default is 0, which means no filtering.

topToList

The number of common DE genes that are used to annotate the plot

Value

A ggplot2 object.

Examples


library(RCPA)
library(SummarizedExperiment)

affyDEExperiment <- loadData("affyDEExperiment")
agilDEExperiment <- loadData("agilDEExperiment")
RNASeqDEExperiment <- loadData("RNASeqDEExperiment")

DEResults <- list(
    "Affymetrix - GSE5281" = rowData(affyDEExperiment),
    "Agilent - GSE61196"   = rowData(agilDEExperiment),
    "RNASeq - GSE153873"   = rowData(RNASeqDEExperiment)
)

DEResultUps <- lapply(DEResults, function(df) df[!is.na(df$logFC) & df$logFC > 0, ])

DEResultDowns <- lapply(DEResults, function(df) df[!is.na(df$logFC) & df$logFC < 0, ])

if (require("ggvenn", quietly = TRUE)){
p1 <- RCPA::plotVennDE(DEResults) + 
        ggplot2::ggtitle("All DE Genes")
p2 <- RCPA::plotVennDE(DEResultUps) +
        ggplot2::ggtitle("Up-regulated DE Genes")
p3 <- RCPA::plotVennDE(DEResultDowns) + 
        ggplot2::ggtitle("Down-regulated DE Genes")
}



[Package RCPA version 0.2.3 Index]