How to find log2fold change values comparing multiple subgroups
1
0
Entering edit mode
2.8 years ago
Shraddha ▴ 90

Hello all,

I have a dataset with 40 samples, and each sample is labeled with two tags. A sample will be labelled either A or B AND X or Y. So a sample could be 1AX / 1AY / 1BX / 1BY.

Example of the data

I'm trying to perform differential expression analysis using DESeq2. The A/B and X/Y is relatively problem free, but now I need to perform the same steps on AX/BX (for example).

I tried adding the subgroups to my annotation/coldata table as an extra column, but with default settings, the results compared two subgroups that I'm not interested in. An example of what I ran:

sub <- DESeqDataSetFromMatrix(countData=countData, colData=coldata, design=~subgroup)
sub <- DESeq(sub)
res <- results(sub)

This picks AX/BY by default, but I need AX/BX. I don't see a way to specify which subgroups to choose.

The reason for trying to perform it like this is that I need to normalise all 40 samples together, but I need the log2fold change values specific for the subgroups being compared.

I have seen the contrast option in the DESeq2 vignette, which seems to be the appropriate route, but I don't see how I can apply it to this dataset.

So the main question is - how can I get the log2fold change values specific to subgroups, while still having normalised all 40 samples together? Would appreciate any help and/or literature that tackles this.

DESeq2 differential-expression • 744 views
ADD COMMENT
3
Entering edit mode
2.8 years ago
ATpoint 86k
res <- results(sub, contrast=c("subgroup", "AX", "BX"))

Does that make sense?

ADD COMMENT
0
Entering edit mode

Yes, thanks, that did it! Maybe a quirk, but now I get AX/BX, AY/BY, and AX/BY, but I'm missing AX/AY, for instance. Any ideas as to how to access those?

Edit: running resultsNames(sub) gives me Intercept, subgroup_AX_vs_BY, subgroup_AY_vs_BY, subgroup_AX_vs_BX as names I can use downstream.

ADD REPLY
0
Entering edit mode

It's the same as above. The resultsNames are only relevant if you use coef or name, not contrasts.

ADD REPLY

Login before adding your answer.

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