Hi,
I am a novice working on a 450k methylation array analysis. I have a very simple design which is to see the differentially methylated genes b/w smoking (1) vs non-smoking (0). This is the following I did.
# using smoking_primary as the factor in interest
design <- model.matrix(~0 + smoking_primary)
# Make contrasts 0 is the control and 1 is the test
contrast <- makeContrasts(smoking_primary0 - smoking_primary1,
levels = design)
# fit to methyaltion set
fit <- lmFit(m_norm_qc, design)
fit2 <- contrasts.fit(fit, contrast)
fit2 <- eBayes(fit2)
## Add the annotations to the results
ann450kSub <- ann450k[match(rownames(m_norm_qc),ann450k$Name),
c(1:4,12:19,24:ncol(ann450k))]
DMPs <- topTable(fit2, num=Inf, coef=1, genelist = ann450kSub)
Could you please review this and tell me if it is the correct way to do the analysis?
In addition, how should I approach adding covariates to my design? If you could point me to the resource where I could get more info that would be very helpful. I checked the limma manual but it seems a little confusing for a simple design like mine.
Thank you for your time on this post.
Is cross-posted: https://support.bioconductor.org/p/9136225/#9136225