Question: DEseq2 resultsNames doesn not reproduce the right comparisons
gravatar for hmaryam
18 days ago by
hmaryam0 wrote:

I have 16 samples and 2-factor conditions (treatment and sex):

sample treatment sex group

1 untreated male untreated_male

2 untreated male untreated_male

3 untreated male untreated_male

4 untreated male untreated_male

5 untreated female untreated_female

6 untreated female untreated_female

7 untreated female untreated_female

8 untreated female untreated_female

9 treated male treated_male

10 treated male treated_male

11 treated male treated_male

12 treated male treated_male

13 treated female treated_female

14 treated female treated_female

15 treated female treated_female

16 treated female treated_female

I want to do 3 types of DEG analysis using DESeq2.

  1. Treated_female VS Untreated Female
  2. Treated_male VS Untreated male
  3. Treated VS Untreated controlled by sex

I read in a post that was similar to my design that for the #1 and #2 analysis, it is better to combine all the 16 samples in dds and then set a design just specifically for say treated_female VS untreated Female.

I have created one other group so in total I have 3 cols: treatment, sex, group (condition_group).

Then I have following design:

dds <- DESeqDataSetFromHTSeqCount( sampleTable = sampleTable, directory = directory, design= ~group)

dds <- DESeq(dds)

contrastmale <- c("group", "treatedmale", "untreated_male")

resmale <- results(dds, contrast = contrastmale, alpha = 0.05)

contrastfemale <- c("group", "treatedfemale", "untreated_female")

resfemale <- results(dds, contrast = contrastfemale, alpha = 0.05)



[1] "Intercept"

[2] "grouptreatedmalevsuntreated_female"

[3] "groupuntreatedfemalevstreated_female"

[4] "groupuntreatedmalevstreated_female"


log2 fold change (MAP): group treatedmale vs untreatedmale

Wald test p-value: group treatedmale vs untreatedmale

DataFrame with 21971 rows and 6 columns

My question is, why I do not have the right comparisons in the resultsName ( it does not even have treatedmale vs untreatedmale)? even though the resmale shows that the comparison is treatedmale vs untreated_male

deseq2 resultsnames() • 79 views
ADD COMMENTlink modified 18 days ago by Michael Love25k • written 18 days ago by hmaryam0
Answer: DEseq2 resultsNames doesn not reproduce the right comparisons
gravatar for Michael Love
18 days ago by
Michael Love25k
United States
Michael Love25k wrote:

Don’t worry about the coefficient names printed by resultsNames(). When you use the contrast argument the software composed the correct comparison for you. You can look at plotCounts of the top genes by pvalue to convince yourself.

ADD COMMENTlink written 18 days ago by Michael Love25k

Great. thanks for your response.

ADD REPLYlink written 17 days ago by hmaryam0
Please log in to add an answer.


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