I usually stick to genome seq data, so this is my first time using deseq2. I have RNAseq data from Drosophila that were fed either a control diet (C) or supplemented diet (A) while under going physiological stress. They were sequenced at three time points during the experiment. I have the following samples:
- Flies fed control before stress, during stress, and after stress
- Flies fed A before stress, during stress, and after stress
5 Biological replicates of each (30 total samples)
I quality checked, trimmed, aligned to reference with STAR, and got gene counts with HTseq count.
We want to know the differentially expressed genes between C and A diets at each time point. I've set up the sample table in R for deseq2 with SampleID, Time, Condition (ie diet), Sample File (ie htseq output). Now I'm ready to run the analysis but am struggling with how. Here is my code:
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory, design = ~ condition + time) colData(ddsHTSeq)$condition <- factor(colData(ddsHTSeq)$condition, levels = c("C", "A")) dds <- DESeq(ddsHTSeq) res <- results(dds, alpha = 0.05) # save data results and normalized reads to csv resdata <- merge(as.data.frame(res), as.data.frame(counts(dds,normalized =TRUE)), by = 'row.names', sort = FALSE)
I know this is not correct to give me the result I want. How can I set it up so that I get three lists of differentially expressed genes? For before stress, then during, then after.
Thanks in advance.