Contrast vs relevel (DESEq2)
1
0
Entering edit mode
Merlin ▴ 10
@merlin-15723
Last seen 4.9 years ago
Vancouver

Hello everyone,

From the vignette of DESeq2, I can either set the factor level by doing this code

dds= relevel(dds$condition, ref=“untreated”)

Or I can use the contrast,

res <- results(dds, contrast=c("condition","treated","untreated"))

Vignette says:

“using contrast will additionally set to 0 the estimated LFC in a comparison of two groups, where all of the counts in the two groups are equal to 0”

It’s not clear to me what means“the counts in the two groups are equal to 0”, how can it be 0 counts?

Makes more sense when it says that can be used to test if the difference between two groups is 0

Maybe the contrast function is useful when I have at least three groups to see the different combination between them, let say I have A, B and C , and the set up will be like:

results(dds, contrast=c("condition”,”A”,”C”,”B”))

In order to have the combination of the four log2FC, is that correct?

Thank you

deseq2 RNAseq • 1.2k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

You can have zero counts in two groups when there are more than two groups.

ADD COMMENT
0
Entering edit mode

Hi Michael, this could happens if there are technical errors during the sample preparation is it that? I mean there are not live organisms with no RNA/DNA ,

is it the code correct the way I did with three groups? condition wil be the column of the txt file where the A,C and B condition are

Is it correct to say that if I set the contrast code I don't have to add a reference when more groups are there because all the combinations will be analyzed ?

thanks

ADD REPLY

Login before adding your answer.

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