limma with interaction term
2
0
Entering edit mode
Jitendra ▴ 10
@nabiyogesh-11718
Last seen 5 months ago
United Kingdom

I want to run some epigenome wide association studies based on city and pollutant type, could you please suggest if I can get DNA methylation sites (CpG) association based on pollutant type for each city. like below I am trying to find Pb toxic elements association site in four different cities which has varying level of Pb. we do have 10 toxic element so not sure should I run model with one toxic element at a time or should include all in this model?

#model matrix

var<-model.matrix(~log2Pb*City + sex + Age +CD8T +CD4T +NK + Bcell +Mono, data=data1)

fit<-lmFit(mval,var)


fit2<-eBayes(fit,trend=TRUE, robust=TRUE)

probe<-topTable(fit2,adjust="BH",coef=???,num=Inf)

try to run interaction model using limma but not sure if this is the right approach and what to mention in coef????

Thanks for your all help!

R biostatistics limma Epigenetics • 700 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

The interaction term should be the last one in your design matrix, so

topTable(fit2, ncol(var), Inf, p.value = 0.05)

Will give you the CpGs with an FDR<0.05 for the interaction term.

ADD COMMENT
0
Entering edit mode

Jim, there are 4 cities so the interaction will be 3 coefficients.

ADD REPLY
0
Entering edit mode

Indeed. Thanks for pointing that out!

ADD REPLY
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

There are many ways to specify the interaction coefficients, but maybe the easiest here would be:

topTable(fit2, coef=grep(":",colnames(var)), num=Inf)

To see how this works, just type colnames(var) or colnames(fit2). You will easily see the interaction coefficients. Then you specify them to topTable either by name or by number.

ADD COMMENT

Login before adding your answer.

Traffic: 616 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6