I am working with 450K methylation data and have a genomic ratio set object (GRset)
I have a design matrix as such using
design <- model.matrix(~0+Mutation+cov1+cov2+cov3, data = pData(GRset))
head(design)
Absent Present cov1 cov2.1 cov2.2 cov2.3 cov3
sample1 1 0 0 0 1 0 0.5276
sample2 1 0 0 0 1 0 0.4623
sample3 1 0 1 0 0 0 0.6853
sample4 1 0 0 0 0 0 0.7665
sample5 1 0 0 0 0 1 0.4931
sample6 1 0 1 0 0 0 0.7258
and a contrasts matrix as such
Contrasts
Levels Present - Absent
Absent -1
Present 1
cov1 0
cov2.1 0
cov2.2 0
cov2.3 0
cov3 0
The covariate/comparison of interest is samples with an mutation of interest (present) and those without said mutation (Absent) but I want to factor in some other covariates that affect variation in methylation (one with 2 levels, one with 4 levels, and one continuous)
I have used limma to identify DMPs using these matrices successfully (I think)
I want to use the bumhunter method in minfi to look for DMRs but there is no contrast matrix specified in the function as in can see in the minfi user guide
the closest I can find is the coef argument, which is an 'An integer denoting the column of the design matrix containing the covariate of interest. The hunt for bumps will be only be done for the estimate of this coefficient.'
But my design matrix contains two columns describing my covariate of interest (Absent and Present) so which coef should I specify (1 or 2?). I tried specifcying coef = c(1,2) but this threw up an error
[bumphunterEngine] Using a single core (backend: doSEQ, version: 1.5.2).
[bumphunterEngine] Computing coefficients.
Error in S %*% vv : non-conformable arguments
should I do a new design matrix with an intercept column (design2 <- model.matrix(~Mutation+cov1...)) so that absent/present is a single column (coef = 2, presumably)
alternatively, if I specify e.g. coef=1 or coef=2 how should I interpret the output of bumphunter