Extract a table of the topranked CpGs from a linear model fit after
performing a differential methylation analysis using RUVfit
.
1 2 3 
fit 
An object containing a linear model fit produced by 
number 
integer, maximum number of genes to list. Default is 10. 
p.value.cut 
numeric, cutoff value for adjusted pvalues. Only features with lower pvalues are listed. Must ve between 0 and 1. Default is 1. 
cut.on 
numeric, the type of adjusted pvalue that the cutoff should be applied to.
Default is 
sort.by 
character string, the type of adjusted pvalue that should be used for sorting.
Default is 
This function summarises the results of a differential methylation analysis
performed using RUVfit
, followed by RUVadj
. The top ranked CpGs
are selected by first ranking the adjusted pvalues (Default: p.ebayes.BH
),
then ranking the raw pvalues (Default: p.ebayes
).
Produces a dataframe with rows corresponding to the top number
CpGs and
the following columns:
coefficients 
The estimated coefficients of the factor(s) of interest. 
sigma2 
Estimates of the features' variances. 
t 
t statistics for the factor(s) of interest. 
p 
Pvalues for the factor(s) of interest. 
multiplier 
The constant by which 
df 
The number of residual degrees of freedom. 
W 
The estimated unwanted factors. 
alpha 
The estimated coefficients of W. 
byx 
The coefficients in a regression of Y on X (after both Y and X have been "adjusted" for Z). Useful for projection plots. 
bwx 
The coefficients in a regression of W on X (after X has been "adjusted" for Z). Useful for projection plots. 
X 

k 

ctl 

Z 

fullW0 
Can be used to speed up future calls of 
The following columns may or may not be present depending on the options
selected when RUVadj
was run:
p.rsvar 
Pvalues, after applying the method of rescaled variances. 
p.evar 
Pvalues, after applying the method of empirical variances. 
p.ebayes 
Pvalues, after applying the empirical bayes method of Smyth (2004). 
p.rsvar.ebayes 
Pvalues, after applying the empirical bayes method of Smyth (2004) and the method of rescaled variances. 
p.BH 
Pvalues adjusted for false discovery rate (FDR) using the method of Benjamini and Hochberg (1995). 
p.rsvar.BH 
FDRadjusted pvalues, after applying the method of rescaled variances. 
p.evar.BH 
FDRadjusted pvalues, after applying the method of empirical variances. 
p.ebayes.BH 
FDRadjusted pvalues, after applying the empirical bayes method of Smyth (2004). 
p.rsvar.ebayes.BH 
FDRadjusted pvalues, after applying the empirical bayes method of Smyth (2004) and the method of rescaled variances. 
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, 289300.
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.
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  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(data=Mval, design=design, coef=2, ctl=ctl)
fit2 = RUVadj(fit)
# Look at table of top results
top = topRUV(fit2)
}

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.