Incorporating limma duplicateCorrelation() function into minfi dmpFinder() for a mixed model approach
0
0
Entering edit mode
kyleyxw • 0
@181a5d13
Last seen 3.3 years ago
United States

Hi all,

I am doing a methylome-wide association analysis using dmpFinder function from Minfi package. I noticed that dmpFinder is a wrapper of lmFit:

# Part of dmpFinder source code from https://github.com/hansenlab/minfi/blob/master/R/dmpFinder.R
dmpFinder <- function(dat, pheno, type = c("categorical", "continuous"),
                      qCutoff = 1, shrinkVar = FALSE) {
...
M <- dat
design <- model.matrix(~pheno)
fit <- lmFit(M, design)
...}

I am wondering if it is possible to do the association analysis in a mixed model approach, e.g. using "chip" as a random effect. The way I am thinking is incorporating duplicateCorrelation function into the dmpFinder as following:

dmpFinder_lmm <- function(dat, metadata,form,
                          qCutoff = 1) {
...
M <- dat
design <- model.matrix(form,metadata)
dupcor <- duplicateCorrelation(M,design,block=metadata$chip)
fit <- lmFit(M, design, block=metadata$chip, correlation=dupcor$consensus)
...}

Is it an appropriate way? Or is there any other R package that can do the similar analysis?

Thank you!

minfi limma lmm lmfit dmpFinder • 930 views
ADD COMMENT

Login before adding your answer.

Traffic: 915 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6