Complex between and within sample design
0
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.6 years ago
Hi, I have a experiment design that mirrors what is written in the edgeR vignette in section 3.5 Comparisons Both Between and Within Subjects. I have two groups of cell lines: Resistant to a drug and sensitive to a drug. For each cell line in these groups, I have a control, a treatment after 2h and treatment after 24h. Following the vignette, I have renumbered the cell lines within each group and set up the nested design: design = model.matrix(~resist+resist:sub+resist:treat) design (Intercept) resistY resistN:sub2 resistY:sub2 resistN:sub3 resistY:sub3 1 1 0 0 0 0 0 2 1 0 0 0 0 0 3 1 0 0 0 0 0 4 1 0 1 0 0 0 5 1 0 1 0 0 0 6 1 0 1 0 0 0 7 1 0 0 0 1 0 8 1 0 0 0 1 0 9 1 0 0 0 1 0 10 1 1 0 0 0 0 11 1 1 0 0 0 0 12 1 1 0 0 0 0 13 1 1 0 1 0 0 14 1 1 0 1 0 0 15 1 1 0 1 0 0 16 1 1 0 0 0 1 17 1 1 0 0 0 1 18 1 1 0 0 0 1 resistN:treat24h resistY:treat24h resistN:treat2h resistY:treat2h 1 0 0 0 0 2 0 0 1 0 3 1 0 0 0 4 0 0 0 0 5 0 0 1 0 6 1 0 0 0 7 0 0 0 0 8 0 0 1 0 9 1 0 0 0 10 0 0 0 0 11 0 0 0 1 12 0 1 0 0 13 0 0 0 0 14 0 0 0 1 15 0 1 0 0 16 0 0 0 0 17 0 0 0 1 18 0 1 0 0 I can now calculate differentially expressed genes between resistant and sensitive cells in the 2h treatment easily: glmLRT(fit,contrast=c(0,0,0,0,0,0,0,0,-1,1)) Same goes for the same question in the 24h treatment. glmLRT(fit,contrast=c(0,0,0,0,0,0,-1,1,0,0)) >From the vignette and design matrix it is however unclear to me how to formulate contrasts for e.g. the question on differentially expressed genes between sensitive/resistant control cells. The contrast c(0,1,0,0,0,0,0,0,0,0) would just give me differentially expressed genes between sensitive/resistant cells in any condition judging from the matrix. So how would I test this? It's also unclear to me how to test for more complex questions e.g. differentially expressed genes between sensitive/resistant cells in the 24h treatment that are not differentially expressed between sensitive/resistant cells in the control. Would I simply have to combine the results from the 24h treatment test and remove any genes that also pop up in the control test? Thanks for your help! -- output of sessionInfo(): sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] splines parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] genefilter_1.44.0 RColorBrewer_1.0-5 geneplotter_1.40.0 [4] annotate_1.40.1 AnnotationDbi_1.24.0 lattice_0.20-29 [7] Biobase_2.22.0 gplots_2.13.0 ggplot2_0.9.3.1 [10] edgeR_3.4.2 limma_3.18.13 DESeq2_1.2.10 [13] RcppArmadillo_0.4.200.0 Rcpp_0.11.1 GenomicRanges_1.14.4 [16] XVector_0.2.0 IRanges_1.20.7 BiocGenerics_0.8.0 loaded via a namespace (and not attached): [1] bitops_1.0-6 caTools_1.16 colorspace_1.2-4 DBI_0.2-7 [5] dichromat_2.0-0 digest_0.6.4 gdata_2.13.3 grid_3.0.2 [9] gtable_0.1.2 gtools_3.3.1 KernSmooth_2.23-12 labeling_0.2 [13] locfit_1.5-9.1 MASS_7.3-31 munsell_0.4.2 plyr_1.8.1 [17] proto_0.3-10 reshape2_1.2.2 RSQLite_0.11.4 scales_0.2.3 [21] stats4_3.0.2 stringr_0.6.2 survival_2.37-7 tools_3.0.2 [25] XML_3.98-1.1 xtable_1.7-3 -- Sent via the guest posting facility at bioconductor.org.
• 719 views
ADD COMMENT

Login before adding your answer.

Traffic: 737 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