Hello all,
I was wondering if I can get some help from a statistics viewpoint. I have RRBS data from some patients before and after a drug treatment. In the calculateDiffMeth(), I use the patient ID as a covariate since this is a paired analysis. My code looks something like this:
covariates_all <- data.frame(patient = as.factor(master_file$sample_id))
ncores = 10
dmp_rrbs <- calculateDiffMeth(methobj,
overdispersion = "MN",
effect = "wmean",
test = "F",
adjust = 'BH',
covariates = covariates_all,
mc.cores = ncores)
My concern is that the methylKit object I use (methobj) has some missing values due to prior filtering which are not the same for all patients across the different groups (pre and post drug treatment). If I use the min.per.group = 10 during unite() I will get at least 10 patients in control and 10 patients in case but they won't necessarily be the same. For example for CpG1, patient A may have a methylation value pre treatment but may have a missing value in post treatment.
Does including the patient ID ensures that these singletons are not goint to be used in the model? If not, is it valid for me to manually remove methylation values that are not paired, before differential methylation analysis?
Thank you in advance.