Description Usage Arguments Value Author(s) See Also Examples
This function was written since the volcanoplot is an easy way to globally assess the distribution of the p values relative to the effect sizes. This specific function has been tailored to my need of working with methylation data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
effect_sizes |
A numeric vector of effect sizes. |
pvals |
A numeric vector of p values. |
significance |
A boolean vector indicating the significant hits (T = significant, F = non-significant). |
identifiers |
A character vector of identifiers. |
int_effect_threshold |
A vertical dashed line to indicate results above an effect size. Defaults to NULL. |
effect_limit |
Upper limit of the effect sizes of the plot. Defaults to finding the limits automatically. |
p_limit |
Upper limit of the p-values of the plot. Defaults to finding the limits automatically. |
top_names |
An integer representing the names of the top (based on significance) X hits. Defaults to NULL. |
title |
Title of the plot. |
x_lab |
X-axis label. |
y_lab |
Y-axis label. |
A volcano plot with the effect size on the X axis and the -log10 p-value on the Y axis. Adjusted p-values are indicated with a different color.
Andrew Y.F. Li Yim
minfi
minfiData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #Load data
require(minfiData)
baseDir <- system.file("extdata", package = "minfiData")
targets <- read.metharray.sheet(base = baseDir)
RGset <- read.metharray.exp(targets = targets, recursive = T)
Mset <- preprocessIllumina(rgSet = RGset, bg.correct = T, normalize = "controls", reference = 2)
Rset <- ratioConvert(Mset)
GMset <- mapToGenome(Rset)
Beta <- getBeta(GMset)
design <- model.matrix(~targets$Sample_Group)
#Linear regression
lfit <- lmFit(Beta, design)
lfit <- eBayes(lfit)
top_genes <- toptable(fit = lfit, coef = 2, number = Inf)
#Plot the volcano_plot
volcano_plot(top_genes$logFC, top_genes$pval, top_genes$padj < 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.