Hi, I am looking for a proper way to perform a DE analysis for RNA-seq experiment. I am new to the statistical model implemented in DESeq2 and asking for a help to write a design formula and extract results using results() function. The experiment is the following: 2 Genotypes: KO and WT. 4 Timepoints 1-4h
genotype time condition KO 1h KO_1h KO 1h KO_1h KO 1h KO_1h WT 1h WT_1h WT 1h WT_1h WT 1h WT_1h KO 2h KO_2h KO 2h KO_2h KO 2h KO_2h WT 2h WT_2h WT 2h WT_2h WT 2h WT_2h KO 3h KO_3h KO 3h KO_3h KO 3h KO_3h WT 3h WT_3h WT 3h WT_3h WT 3h WT_3h KO 4h KO_4h KO 4h KO_4h KO 4h KO_4h WT 4h WT_4h WT 4h WT_4h WT 4h WT_4h
1) I would like to perform a comparison between different genotypes at the same timepoint: WT and KO at the same timepoints (WT4h vs KO4h or WT1h vs KO1h) 2) Also, I am interested to compare the same genotype at different timepoints: KO1h vs KO2h or WT1h vs WT2h The way I did it was through combining the factors called genotype and time into a single factor called condition.
DESeq.ds<-DESeqDataSetFromMatrix(countData = read.counts.ds, colData=sample.info, design=~condition) rnaDDS <- DESeq(DESeq.ds) WT_1h_KO_1h <- results(rnaDDS,contrast=c("condition", "WT_1h","KO_1h")) KO_1h_KO_2h <- results(rnaDDS,contrast=c("condition", "KO_1h","KO_2h"))
Therefore, I am kindly asking whether it is the correct way to perform the comparisons I planned. Additionally, I am interested to understand how to properly write the design formula by adding the factors genotype and time and the interaction term genotype:time to get the same output as in the example above. I've read several guides and the vignette but I still do not understand how to get the results using: list() instead of contrast in the results() function. The results names I get:
DESeq.ds<-DESeqDataSetFromMatrix(countData = read.counts.ds, colData=sample.info, design=~genotype+time+genotype:time) rnaDDS <- DESeq(DESeq.ds) resultsNames(rnaDDS)  "Intercept" "genotype_WT_vs_KO" "time_2h_vs_1h" "time_3h_vs_1h" "time_4h_vs_1h"  "genotypeWT.time2h" "genotypeWT.time3h" "genotypeWT.time4h"
I would really appreciate providing me with examples for 1) KO1h vs WT1h and 2) KO1h vs KO2h.