Entering edit mode
Jenny Huang
▴
20
@jenny-huang-3548
Last seen 10.4 years ago
Dear all,
I have been reading the previous posts regarding design and contrast
matrix, but I am still very confused. I would really appreciate your
help as I really need to get my data analysis done ASAP.
I have a time course study with six differernt time points and two
different genotypes. It was a loop design with dye swap. Here I will
only use a four sample smaller loop design for an example:
Name
FileName
Cy3
Cy5
s45
File1
ste4hr
ste5hr
s4w4
File2
ste4hr
wt4hr
s54
File3
ste5hr
ste4hr
s5w5
File4
ste5hr
wt5hr
w45
File5
wt4hr
wt5hr
w4s4.1
File6
wt4hr
ste4hr
w4s4.2
File7
wt4hr
ste4hr
w54
File8
wt5hr
wt4hr
w5s5
File9
wt5hr
ste5hr
I used:
> design <- modelMatrix(targets, ref="wt4hr")
> design
ste4hr ste5hr wt5hr
s45 -1 1 0
s4w4 -1 0 0
s54 1 -1 0
s5w5 0 -1 1
w45 0 0 1
w4s4.1 1 0 0
w4s4.2 1 0 0
w54 0 0 -1
w5s5 0 1 -1
> fit <- lmFit(MA, design)
> contrast.matrix <- makeContrasts(wt5hr, ste4hr, wt5hr-ste5hr,ste5hr-
ste4hr, levels=design)
> fit2 <- contrasts.fit(fit, contrast.matrix)
> fit2 <- eBayes(fit2)
> results <- decideTests(fit2)
My questions:
1. Have I done anything wrong so far?
2. How can I print out a Toptable with gene lists for each contrast?
I used the following command, but I think something was wrong because
the genes that were identified differentially expressed do not seem to
match genepix images at all:
Resultfile <- topTable(fit2, coef=1,n=8000,adjust="fdr") (for the
first contrast "wt5hr-wt4hr"?)
> write.table(Resultfile,"w5w4_8000.txt",sep="\t")
3 Does the number of coef correspond to the order of the contrasts
listed in the contrast.matrix command? for example, coef=3 corresponds
to the contrast "wt5hr-ste5hr"?
I am very sorry for the long questions. I am totally not sure about
this contrast matrix thing, and THANK YOU SO MUCH for your help.
Thanks
-Jenny
[[alternative HTML version deleted]]