Doing multiple comparisons in a DESeq2 object with multiple conditions
1
0
Entering edit mode
jenabris • 0
@34f6f638
Last seen 2.1 years ago
Germany

Hi,

I'm doing a DE analysis with multiple conditions and I wondered what the right way is of doing so. For each comparison I'd only like to use a subset of the data. I wondered if it's possible to make one DESeq2 object and subset it for each comparison, for example like this:


dds <- DESeqDataSetFromMatrix(countData = cntmtx,
                              colData = colData,
                              design = ~ condition_A + condition_B)
dds <- DESeq(dds)
dds_sub_x  <- dds[,dds$condition_A == "x"]
res_sub_x <- results(dds_sub_x, contrast=c("condition_B","a","b"))

If condition_A has the levels of "x" and "y" and condition_B has the levels of "a" and "b".

Could someone tell me if it's alright to go about it like this?

DESeq2 • 616 views
ADD COMMENT
1
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 23 hours ago
San Diego

You could, but it's not necessary, and it's probably not optimal. You'd probably rather have all the samples for library normalization and dispersion estimates.

If you only want to compare a subset of the samples to another subset, make a new column in Coldata which concatenates the data from conditions A and B, (so x_a and x_b), use that column as your design

ADD COMMENT
0
Entering edit mode

Great, thank you!

ADD REPLY

Login before adding your answer.

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