Description Usage Arguments Value Examples
Plot -log10 p-values from two analyses and color based on donor component from variancePartition analysis
1 2 3 4 5 6 7 8 9 |
p1 |
p-value from first analysis |
p2 |
p-value from second analysis |
vpDonor |
donor component for each gene from variancePartition analysis |
dupcorvalue |
scalar donor component from duplicateCorrelation |
fraction |
fraction of highest/lowest values to use for best fit lines |
xlabel |
for x-axis |
ylabel |
label for y-axis |
ggplot2 plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # load library
# library(variancePartition)
# Intialize parallel backend with 4 cores
library(BiocParallel)
register(SnowParam(4))
# load simulated data:
# geneExpr: matrix of gene expression values
# info: information/metadata about each sample
data(varPartData)
# Perform very simple analysis for demonstration
# Analysis 1
form <- ~ Batch
fit = dream( geneExpr, form, info)
fit = eBayes( fit )
res = topTable( fit, number=Inf, coef="Batch3" )
# Analysis 2
form <- ~ Batch + (1|Tissue)
fit2 = dream( geneExpr, form, info)
res2 = topTable( fit2, number=Inf, coef="Batch3" )
# Compare p-values
plotCompareP( res$P.Value, res2$P.Value, runif(nrow(res)), .3 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.