Question: Contrast vs relevel (DESEq2)
0
gravatar for Merlin
11 weeks ago by
Merlin 10
Vancouver
Merlin 10 wrote:

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

rnaseq deseq2 • 119 views
ADD COMMENTlink modified 11 weeks ago by Michael Love25k • written 11 weeks ago by Merlin 10
Answer: Contrast vs relevel (DESEq2)
0
gravatar for Michael Love
11 weeks ago by
Michael Love25k
United States
Michael Love25k wrote:

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

ADD COMMENTlink written 11 weeks ago by Michael Love25k

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 REPLYlink modified 11 weeks ago • written 11 weeks ago by Merlin 10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 184 users visited in the last hour