[BioC] DESeq: multi-factors testing questions
Yanzhu [guest]
guest at bioconductor.org
Mon Jan 13 20:15:43 CET 2014
Dear Community,
I have some questions about how the DESeq r package works for multi-factors expersiment. My experiment has three factors: A/B/C, and 8 replicates per condition. I would like the test the significance of the main effects of factor A, B and C, the significance of the two-way interaction terms: A:B, A:C and B:C, and the significance of the three-way interaction term: A:B:C. I want the table of pvalue for each term (main effects, two-way interaction terms and the three-way interaction term) like what ANOVA does for each gene.
I know to test the significance of the three-way interaction term, we use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B+A:C+B:C+A:B:C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B+A:C+B:C)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
My Questions are: how can I test the significance of main effects and the two-way interaction terms?
1. To test the main effect of A, B and C
(i) To test the main effect of A:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~1)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
(ii) To test the main effect of B:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~B)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~1)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
OR:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B)
itDeSeq0<-fitNbinomGLMs(cdsFull,count~B)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
Which one is correct?
(iii) To test the main effect of C:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~1)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
OR:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C)
itDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
which one is correct?
2. To test the two-way interaction terms: A:B, A:C and B:C
(i) To test the two-way interaction term: A:B
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
Is it correct?
(ii) To test the two-way interaction term: A:C
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B+A:C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
OR:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+A:C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
Which one is correct?
(iii) To test the two-way interaction term: B:C
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B+A:C+B:C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C+A:B+A:C)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
OR:
Do I need to use the following coding:
fitDeSeq1<-fitNbinomGLMs(cdsFull,count~A+B+C+B:C)
fitDeSeq0<-fitNbinomGLMs(cdsFull,count~A+B+C)
modDeSeq<-nbinomGLMTest(fitDeSeq1,fitDeSeq0)
Which one is correct?
Thank you!
-- output of sessionInfo():
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] DESeq_1.12.1 lattice_0.20-15 locfit_1.5-9.1 Biobase_2.20.1 BiocGenerics_0.6.0 edgeR_3.2.4
[7] limma_3.16.8
loaded via a namespace (and not attached):
[1] annotate_1.38.0 AnnotationDbi_1.22.6 DBI_0.2-7 genefilter_1.42.0 geneplotter_1.38.0
[6] grid_3.0.1 IRanges_1.18.4 MASS_7.3-26 RColorBrewer_1.0-5 RSQLite_0.11.4
[11] splines_3.0.1 stats4_3.0.1 survival_2.37-4 tools_3.0.1 XML_3.98-1.1
[16] xtable_1.7-1
--
Sent via the guest posting facility at bioconductor.org.
More information about the Bioconductor
mailing list