Entering edit mode
Guest User
★
13k
@guest-user-4897
Last seen 9.6 years ago
Dear List,
I am looking at differential methylation (from Illumina 450K) with
Limma and have a situation in which I have several groups and want to
make comparisons between particular groups. It seems that section 8.6
of the manual is relevant to my situation so I will use that as an
example:
> f <- factor(targets$Target, levels=c("RNA1","RNA2","RNA3"))
> design <- model.matrix(~0+f)
> colnames(design) <- c("RNA1","RNA2","RNA3")
To make all pair-wise comparisons between the three groups one could
proceed
> fit <- lmFit(eset, design)
> contrast.matrix <- makeContrasts(RNA2-RNA1, RNA3-RNA2, RNA3-RNA1,
+ levels=design)
> fit2 <- contrasts.fit(fit, contrast.matrix)
> fit2 <- eBayes(fit2)
I am unsure of a couple of things here. One thing I am worried about
is whether the comparison RNA2-RNA1 here would be equivelant to doing:
> f <- factor(targets$Target, levels=c("RNA1","RNA2","RNA3"))
> design <- model.matrix(~f)
> colnames(design) <- c("(intercept)","RNA2","RNA3")
> fit <- lmFit(eset, design)
> fit <- eBayes(fit)
> topTable(fit, coef="RNA2")
i.e. I don't understand what is going on with the intercept here. If
in this second instance we are taking the RNA1 samples to calculate
the intercept, then how is it calculated in the previous example? Or
is it simply set to (0,0) in the previous example? Or am I way off the
mark on how the intercept functions in Limma altogether?
My second problem is that I was wondering if my model were
'~0+f+batch' and I then followed through using the first chunk of code
would the batch effect be taken into account or not?
Also if I wanted to pool RNA1 and RNA2 and compare these against RNA3
can I use this same model?
Thanks in advance, and apologies for ignorance about the intercept
issue,
Scott
-- output of sessionInfo():
R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] WriteXLS_2.3.0 limma_3.14.3
--
Sent via the guest posting facility at bioconductor.org.