DMRcate: incorporating covariates to find DMRs in methylation data?
1
0
Entering edit mode
Brian Smith ▴ 120
@brian-smith-6197
Last seen 3.6 years ago
United States

Hi,

I was trying to use DMRcate to find differentially methylated regions in illumina 450k methylation data. However, I need to account for covariates (e.g. age). I usually use the 'lm' function to find t-statistics and p-values associated with each CpG. However, with the DMRcate package, I can't see how I can incorporate the co-variates in the analysis.

Did I miss something?

 

thanks!

limma illimina 450k methylation DMRcate • 3.1k views
ADD COMMENT
0
Entering edit mode
Tim Peters ▴ 170
@tim-peters-7579
Last seen 3 days ago
Australia

Hi Brian,

The DMRcate experimental setup mirrors that of limma, so all you have to do is pass your design matrix (with covariates), contrast matrix (optional) and coefficient of interest to cpg.annotate(), which contains the calls to lmFit() and contrasts.fit() internally. So if you have a binary contrast "mytype" with types "1" and "2" and your covariates "mycovariate1", "mycovariate2" and so on, some boilerplate would be:

type <- factor(mytype)
covariate1 <- as.numeric(mycovariate1)
covariate2 <- as.numeric(mycovariate2)
#etc

design <- model.matrix(~0 + type + covariate1 + covariate2) #etc as needed
cont.mat <- makeContrasts(c=type1-type2, levels=design)
groupanno <- cpg.annotate(myMs, analysis.type="differential", design=design, contrasts=T, cont.matrix=cont.mat, coef="c")

 

Best of luck,

Tim

 

ADD COMMENT
0
Entering edit mode

According to ?cpg.annotate, this is only possible with array data. I'd like to do the same with WGBS data - is this not possible with DMRcate?

ADD REPLY
0
Entering edit mode

Hi Steven,

This is indeed possible using datatype="sequencing" - please look at the second half of the vignette for a worked example.

Best,

Tim

Edit My bad, I hadn't realised that the example included only contained output from DSS::DMLtest, not DSS::DMLtest.multiFactor. If you use output from DMLtest.multiFactor (and change some of the colnames so that they reflect the output of DSS:DMLtest) then it should work. See the DSS manual for how to incorporate your covariates.

Cheers, Tim

ADD REPLY

Login before adding your answer.

Traffic: 938 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