topRUV | R Documentation |
Extract a table of the top-ranked CpGs from a linear model fit after
performing a differential methylation analysis using RUVfit
and
RUVadj
.
topRUV(fitsum, number = 10, sort.by = c("p", "F.p"), p.BH = 1)
fitsum |
An object containing the summary fit object produced by
|
number |
integer, maximum number of genes to list. Default is 10. |
sort.by |
character string, what the results should be sorted by. Default is unadjusted p-value. |
p.BH |
numeric, cutoff value for Benjamini-Hochberg adjusted p-values. Only features with lower p-values are listed. Must be between 0 and 1. Default is 1. |
This function summarises the results of a differential methylation analysis
performed using RUVfit
, followed by RUVadj
. The top ranked
CpGs are sorted by p-value.
Produces a dataframe with rows corresponding to the top
number
CpGs and the following columns: F.p F.p.BH p_X1 p.BH_X1 b_X1
sigma2 var.b_X1 fit.ctl mean
F.p |
P-values for testing all of the factors of interest simultaneously. |
F.p.BH |
Benjamini-Hochberg adjusted p-values for testing all of the factors of interest simultaneously. |
p_X1 |
p-values for the factor of interest. |
p.BH_X1 |
Benjamini-Hochberg adjusted p-values for the factor of interest. |
b_X1 |
The estimated coefficients of the factor of interest. |
sigma2 |
Estimate of the methylation variance. |
var.b_X1 |
Variance estimate of |
fit.ctl |
logical, indicating whether CpG was designated as a negative control. |
mean |
The mean methylation (M-value). |
Jovana Maksimovic jovana.maksimovic@mcri.edu.au
Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series, B, 57, 289-300.
Smyth, G. K. (2004). Linear models and empirical Bayes methods for assessing differential expression in microarray experiments. Statistical Applications in Genetics and Molecular Biology, Volume 3, Article 3. http://www.statsci.org/smyth/pubs/ebayes.pdf.
RUVfit
, RUVadj
,
MArrayLM
if(require(minfi) & require(minfiData) & require(limma)){
# Get methylation data for a 2 group comparison
meth <- getMeth(MsetEx)
unmeth <- getUnmeth(MsetEx)
Mval <- log2((meth + 100)/(unmeth + 100))
group <- factor(pData(MsetEx)$Sample_Group)
design <- model.matrix(~group)
# Perform initial analysis to empirically identify negative control features
# when *not* known a priori
lFit <- lmFit(Mval,design)
lFit2 <- eBayes(lFit)
lTop <- topTable(lFit2,coef=2,num=Inf)
# The negative control features should *not* be associated with factor of
# interest but *should* be affected by unwanted variation
ctl <- rownames(Mval) %in% rownames(lTop[lTop$adj.P.Val > 0.5,])
# Perform RUV adjustment and fit
fit <- RUVfit(Y=Mval, X=group, ctl=ctl)
fit2 <- RUVadj(Y=Mval, fit=fit)
# Look at table of top results
top <- topRUV(fit2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.