Extract LRT results for each comparison
2
0
Entering edit mode
Yijing • 0
@d0a8eb95
Last seen 7 months ago
Germany

Hello,

I have a dataset from 4 patients at 3 timepoints. This is the design formula:

dds <- DESeqDataSetFromMatrix(cluster3_counts,
                          colData = metadata_3,
                          design = ~ orig.ident + timepoint)

First question: I tried two design formula, one is design = ~ orig.ident + timepoint and the other is design = ~ timepoint, but from PCA plot, they looked the same.

And then I run DESeq2:

dds_lrt <- DESeq(dds, test = "LRT", reduced = ~ orig.ident)

Second question: how to extract the results for all comparisons, like timepoint 2 vs. timepoint 1?

Although I read the tutorial ?results, there are no such an example and I am still confused.

LRT DESeq2 • 374 views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 4.1k
@atpoint-13662
Last seen 13 hours ago
Germany

1) The design does not impact the PCA. If you want to see effects on adding or removing design covariates then you have to regress the covariates, e.g. from the vst() output. This is explained here: https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#why-after-vst-are-there-still-batches-in-the-pca-plot

2) Use contrasts, this is explained here: https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrasts

ADD COMMENT
0
Entering edit mode

Thank you for your quick reply!

In the contrast tutorial, the example is results(dds, contrast=c("condition","C","B")). In my case, I also have the orig.ident, I do not know how to include this variable in the contrast or just using results(ads_lrt, contrast=c("timepoint", "1", "2"))?

ADD REPLY
0
Entering edit mode

If you want to contrast the timepoints then the latter contrast is valid. The influence of orig.ident has already been taken care of as part of what DESeq() does under the hood. Hence, the latter contrast will give you timepoint differences that are adjusted for the orig.indent. As James suggests, for these pairwise comparisons the Wald test is usually preferred since it tests directly for fold change differences.

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Your first test is asking if you need to include orig.ident in the model at all. It doesn't test anything about the timepoints. If you want to test contrasts, you need to use a Wald test, not LRT. In which case, read the section about contrasts as ATpoint already suggested. If you care to test the interaction term, then read that section.

Login before adding your answer.

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