DESeq2 Nested Comparison
1
0
Entering edit mode
saywhoa • 0
@saywhoa-11822
Last seen 8.4 years ago

Hello,

I want to use DESeq2 for DE analysis. I tried to perform a nested comparison. My data has two different factors: the mice are either 1. Uninfected and Infected or 2. Susceptible and Resistant strain. I would like to know how to set the design and contrasts to determine the cell-line specific effect, which consists of:

Resistant.Infected - Resistant.Uninfected vs Susceptible.Infected - Susceptible.Uninfected.

Just to clarify, I am interested in determining those genes which have different gene expression response to infection depending on the mouse strain.

I tried

colData = data.frame(rownames(dataSet$fst.cls), dataSet$sec.cls, dataSet$cls)

view(colData)

condition        type         condition_type
1    Infected   Resistant     Infected.Resistant
2    Infected   Resistant     Infected.Resistant
3    Infected   Resistant     Infected.Resistant
4  Uninfected   Resistant   Uninfected.Resistant
5  Uninfected   Resistant   Uninfected.Resistant
6  Uninfected   Resistant   Uninfected.Resistant
7    Infected Susceptible   Infected.Susceptible
8    Infected Susceptible   Infected.Susceptible
9    Infected Susceptible   Infected.Susceptible
10 Uninfected Susceptible Uninfected.Susceptible
11 Uninfected Susceptible Uninfected.Susceptible
12 Uninfected Susceptible Uninfected.Susceptible

    colnames(colData) = c("condition", "type", "condition_type")
    dds = DESeqDataSetFromMatrix(countData=dataSet$data.anot, colData = colData, design = ~condition_type)
    dds = DESeq(dds)

resultsNames(dds)

[1] "Intercept"                            "condition_typeInfected.Resistant"    
[3] "condition_typeInfected.Susceptible"   "condition_typeUninfected.Resistant"  
[5] "condition_typeUninfected.Susceptible"

    res = results(dds, contrasts = c(0,1,-1,-1,1))

But when I look into the res file, the only analysis it performed is

"condition_typeInfected.Resistant vs condition_typeUninfected.Susceptible"

I know that this way works but I want to know how to use a more flexible method for design and contrast:

dds = DESeqDataSetFromMatrix(countData=dataSet$data.anot, colData = colData, design = ~type+condition + condition:type)

Thank you in advance.

 

deseq2 rnaseq • 769 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

hi,

Have you looked over the DESeq2 vignette section on interactions? What you want to do is to have a design with ~condition + type + condition:type. See the vignette section for details on the interpretation. Also there are examples in ?results.

 

ADD COMMENT

Login before adding your answer.

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