topRUV: Table of top-ranked differentially methylated CpGs obatained...

topRUVR Documentation

Table of top-ranked differentially methylated CpGs obatained from a differential methylation analysis using RUV

Description

Extract a table of the top-ranked CpGs from a linear model fit after performing a differential methylation analysis using RUVfit and RUVadj.

Usage

topRUV(fitsum, number = 10, sort.by = c("p", "F.p"), p.BH = 1)

Arguments

fitsum

An object containing the summary fit object produced by RUVadj. The object should be a list.

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.

Details

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.

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 betahat.

fit.ctl

logical, indicating whether CpG was designated as a negative control.

mean

The mean methylation (M-value).

Author(s)

Jovana Maksimovic jovana.maksimovic@mcri.edu.au

References

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.

See Also

RUVfit, RUVadj, MArrayLM

Examples


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)
}


Oshlack/missMethyl documentation built on March 26, 2023, 1:50 p.m.