To the developers,
I've been working on differential expression analysis of drought-tolerance in rice. I have 2 genotypes (tolerant and susceptible) and 2 conditions (drought and well-watered) with 4 replications each, essentially a 2x2 factorial experiment with 4 replications.
One of my main objectives is to identify drought-responsive genes. I set-up the codes as follows:
colData <- data.frame(genotype=rep(c("IL","Swarna"),each=8), condition=rep(rep(c("Control","Drought"),each=4),times=2)) rownames(colData) <- colnames(tx.all$counts) dds <- DESeqDataSetFromTximport(tx.all, colData, formula(~genotype+condition+genotype:condition)) colData(dds)$condition<-relevel(colData(dds)$condition, ref = "Control") dds$group<-factor(paste0(dds$genotype, dds$condition)) design(dds) <- ~group dds<-DESeq(dds, betaPrior = TRUE, parallel = TRUE) resultsNames(dds) # "Intercept" "groupILControl" "groupILDrought" "groupSwarnaControl"  "groupSwarnaDrought
Is adding the design term similar to adding an interaction term? We want to make use of the interaction term because we still don't know the mechanisms underlying drought in this experiment hence, we use several contrast arguments from resultsNames
We also want to perform ANOVA so we can identify genes to be used for WGCNA analysis. Does using the codes below is acceptable enough to address this?
dds.ANOVA<-DESeq(dds, test="LRT", reduced = ~1, parallel = TRUE) res.anova <- results(dds.ANOVA) sum(res.anova$padj < 0.05, na.rm = T )
R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale:  LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252  LC_MONETARY=English_United States.1252 LC_NUMERIC=C  LC_TIME=English_United States.1252 attached base packages:  parallel stats4 stats graphics grDevices utils datasets methods base other attached packages:  hexbin_1.27.1 vsn_3.42.3 readr_1.1.1  tximport_1.2.0 genefilter_1.56.0 pheatmap_1.0.8  RColorBrewer_1.1-2 ggplot2_2.2.1 gplots_3.0.1  DESeq2_1.14.1 SummarizedExperiment_1.4.0 Biobase_2.34.0  GenomicRanges_1.26.4 GenomeInfoDb_1.10.3 IRanges_2.8.2  S4Vectors_0.12.2 BiocGenerics_0.20.0