Using DESEQ2 and LFCSHRINK with one group versus two groups
1
0
Entering edit mode
@tianbian0507-24086
Last seen 5.2 years ago
Washington University in St Louis

Hi,

I have a quick question regarding how to use lfcshrink when I want to compare the expression of one group (B) to two other groups together (C+D).

This is what I ran tried to compare group A with the combination of group B and C with design = ~0+ Condition, but when I tried to use listValues with lfcShrink it didn't work.

resultsNames(dds) [1] "ConditionA" "ConditionB" "ConditionC" "ConditionD" [5] "ConditionE"
NR <- results(dds, contrast=list(c("ConditionB"),c("ConditionC","ConditionD")),listValues=c(1, -1/2))

I found out from a post that lfcShrink does not support list values, but then how can I perform shrinkage if I had to use list values in my contrast? Any suggestions will be appreciated!

deseq2 • 1.2k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

You can use type="ashr" with a numeric contrast.

ADD COMMENT
0
Entering edit mode

Hi Michael,

Thank you for your quick reply! Just to confirm that I understand this correctly, would this be the right contrast to use in my case?

lfcShrink(dds, contrast=c(0,1,-0.5,-0.5,0), res=NR, type = "ashr")

ADD REPLY
0
Entering edit mode

Hmm, check resultsNames(dds)... that doesn't seem to match what you wanted to do in your original post.

ADD REPLY
0
Entering edit mode

Hi Michael,

Thank you for your reply, but I am a little bit confused about what you said. What I meant in my original post was how to perform shrinkage using lfcShrink on a comparison between group B and group (C+D), which from reading previous posts requires using listValues in contrast.

This is what my resultNames(dds) looks like:

resultsNames(dds) [1] "ConditionA" "ConditionB" "ConditionC" "ConditionD" [5] "ConditionE"

I went back to read more on using numeric contrast and based on this documentation section 3.2, my understanding is that if I want to compare Condition B with (Condition C + Condition D), it would be Condition B - 0.5(Condition C + Condition D).

Corresponding to the resultNames(dds): "ConditionA" "ConditionB" "ConditionC" "ConditionD" "ConditionE" 0 1 -1/2 -1/2 0

Is this an incorrect understanding of the use of numeric contrast?

Sincerely

ADD REPLY
0
Entering edit mode

Oh I was reading the part “group A with the combination of group B and C”.

Your code looks fine then for the other comparison.

ADD REPLY
0
Entering edit mode

Very sorry for the confusion and thank you!!!

ADD REPLY

Login before adding your answer.

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