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.

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:

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.

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?Hi Steven,

This is indeed possible using

`datatype="sequencing"`

- please look at the second half of the vignette for a worked example.Best,

Tim

EditMy 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