Correct model specification for paired design

83 views
Skip to first unread message

David Fisher

unread,
Jan 11, 2024, 7:15:13 AM1/11/24
to methylkit_discussion
Hi folks,

I have conducted an experiment with a paired design, where we looked at WGBS data of 5 individuals before and after a treatment.

Previously I've loaded the data like this:
all_IDs = methRead(file.list,
                sample.id = list("T52_1","T53_1","T54_1","T55_1","T56_1",
                                 "T52_2","T53_2","T54_2","T55_2","T56_2"),
                assembly="new_ass",
                pipeline = "bismarkCoverage",
                treatment = c(rep(c(0,1), each = 5)), 
                dbtype="tabix",  
                mincov = 5) 

[some intermediate steps]

And analysed like this:
all_dmb = calculateDiffMeth(all_IDs_fu,  #"_fu" suffix indicates filtered and unified
                            covariates = NULL,
                            overdispersion = "MN",
                            #test = "F",
                            mc.cores = 32,
                            suffix = "fuMNtestC")

However, I am not certain this is properly accounting for the paired nature of the design. Can anyone comment on whether it is or not? If not, how does one specify a paired design, would I use the individual ID as a covariate like this:

covariates =c( "2", "3", "4", "5", "6", "2", "3", "4", "5", "6")


Thanks for your help!

David

Alexander Blume

unread,
Jan 11, 2024, 9:10:54 AM1/11/24
to methylkit_discussion
Hi David, 

As recently answered by Altuna (here and here), methylKit does not account for paired designs per se. But as you suggested, the pair information could be included as a covariate. 
Just make sure to provide the covariate as data.frame (see vignette ),  probably you should also convert the IDs to factors as mentioned in the DSS manual :

covariates = data.frame( ind_id = factor(c( "2", "3", "4", "5", "6", "2", "3", "4", "5", "6")))

We are not sure this works, maybe you could also double-check with DSS and report the results here?

Best,
Alex


https://bioconductor.org/packages/release/bioc/vignettes/methylKit/inst/doc/methylKit.html#38_Accounting_for_covariates

David Fisher

unread,
Jan 14, 2024, 8:41:19 AM1/14/24
to methylkit_discussion
OK thank you, and apologies for not searching properly before asking.

David
Reply all
Reply to author
Forward
0 new messages