**50**wrote:

Before finding DMPs from 450k data, it is suggested to adjust the data for various covariates like cell count etc.

From various forums and literatures, I have come to know there are two methods to adjust the covariates:

**Method 1:**

fit <- lm (outcome ~ exposure + covariate)group <- factor(targets$status,levels=c("Control","Case")) design <- model.matrix(~target$ly+target$mo+target$gr+group) fit <- lmFit(Mval,design) fit.e <- eBayes(fit) top<-topTable(fit.e,coef=4, num=Inf)

Fitting the data by regressing outcome (Methylation data) with exposure (case-control status) while adjusting for covariates (cell count) -> using eBayes() to test if the parameter estimate for case/Control is different from zero, using the residuals -> using fitted values for finding DMPs.

The other way is:

**Method 2:**

fit1 <- lm (outcome ~ 0 + covariate)Adj. Outcome <- Raw outcome – fit1fit2<- lm (Adj. Outcome ~ exposure)design <- model.matrix(~0+target$ly+target$mo+target$gr) fit <- lmFit(Mval,design) mAdj.fit <- fit$coefficients mAdj <- as.matrix(Mval) - mAdj.fit %*% t(design) betaAdj <- m2beta(mAdj)

Making a null model (using covariates) -> subtracting the coefficients (regression of Null model and Raw outcome) from raw outcome -> Regressing the residuals with exposure ->converting Mval to beta-values and finding DMPs.

The question is what is the difference between the two methods, as the results I am getting from both are different.

Which method is correct one?

Also, why I am getting different results in Method-2 when I am using **mAdj (min q-value of top hit = 0.5) **and **betaAdj (min q-value of top hit = 0.001) **for finding DMPs.