volcanoPlot | R Documentation |
Volcano plot function
volcanoPlot( log2fc, pValue, data, FDR_threshold = 0.05, LFC_threshold = log2(1.5), color = c("red", "black"), geneNames = NULL, nb_geneTags = 20, logTransformPVal = TRUE )
log2fc |
a magnitude of change (fold-change) in base log 2 corresponding to the x-axis. |
pValue |
a statistical significance (p-value) corresponding to the y-axis. |
data |
a data.frame of differentially expressed results from which the
variable |
FDR_threshold |
a threshold of false discovery rate. |
LFC_threshold |
a threshold of log fold change. |
color |
a vector of two colors for significant or not significant points. |
geneNames |
a vector of gene names if you want to put gene tags on the volcano plot. Default is NULL. |
nb_geneTags |
number of tags for the significant genes if |
logTransformPVal |
If TRUE, the p-values will have a negative logarithm transformation (base 10). Default is TRUE. |
a ggplot2
object
genes <- paste0("G", 1:500) pval <- runif(500, max = 0.5) log2FC <- runif(500, min = -4, max = 4) data <- cbind.data.frame(genes, pval, log2FC) rm(genes, pval, log2FC) volcanoPlot(log2FC, pval, data, geneNames = genes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.