DESeq2 analysis. Understanding results() and the design formula.
1
0
Entering edit mode
Kirsan1452 • 0
@kirsan1452-9400
Last seen 4.4 years ago

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)
        [1] "Intercept"         "genotype_WT_vs_KO" "time_2h_vs_1h"     "time_3h_vs_1h"     "time_4h_vs_1h"    
        [6] "genotypeWT.time2h" "genotypeWT.time3h" "genotypeWT.time4h"

I would really appreciate providing me with examples for 1) KO1h vs WT1h and 2) KO1h vs KO2h.

Thanks

deseq2 • 660 views
ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 3 hours ago
San Diego
WT_1h_KO_1h <- results(rnaDDS,contrast=c("condition", "WT_1h","KO_1h"))

Most people would flip-flop the order, so that you are dividing the KO by the WT.

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.

Honestly, I wouldn't. Your first way way is far more readable.

ADD COMMENT

Login before adding your answer.

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