Question: Deseq2 multiple comarison
1
gravatar for krushnach80
2.4 years ago by
krushnach80580
krushnach80580 wrote:

I m using deseq2 for my samples such as Wild type[untreated] , and two treated condition [with vitamin D] and Retinoic acid

and my samples are in replicates ,I want to compare the differential expression between WT vs treated[Vitamin D] and WT vs Retinoic acid .so here is my code im using but Im not sure if its doing what i want to do..

condition <- factor(c(rep("WT", 2), rep("AT", 2),rep("VD",2))))`


(coldata <- data.frame(row.names=colnames(countdata), condition))`
dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~condition)
dds

Any suggestion or help would be highly appreciated

rna-seq R • 1.2k views
ADD COMMENTlink modified 2.4 years ago by Devon Ryan91k • written 2.4 years ago by krushnach80580

You'll get more support on bioconductor for this question.

ADD REPLYlink written 2.4 years ago by YaGalbi1.4k
5
gravatar for Carlo Yague
2.4 years ago by
Carlo Yague4.6k
Belgium
Carlo Yague4.6k wrote:

Looks good to me. From the dds table, you will just need to extract the contrasts now (VD vs wt and AT vs WT) using the results() function documented here.

ADD COMMENTlink written 2.4 years ago by Carlo Yague4.6k
5
gravatar for Devon Ryan
2.4 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

Given your design, you'll want to ensure that WT is the base level for comparisons, which it's currently not.

condition <- factor(c(rep("WT", 2), rep("AT", 2),rep("VD",2))), levels=c("WT", "AT", "VD"))

Now when you use results() the coefficients (2 will be AT vs. WT and 3 will be VD vs WT) will be the comparisons you want.

ADD COMMENTlink written 2.4 years ago by Devon Ryan91k

okay let me try this and i will let you know..

ADD REPLYlink written 2.4 years ago by krushnach80580

can you explain me "(2 will be AT vs. WT and 3 will be VD vs WT" why?

ADD REPLYlink written 2.4 years ago by krushnach80580
1

This requires knowing how the model matrix will end up getting made. R will create the intercept from the base level of the factor, so all comparisons will be versus it. The other coefficients will be ordered according to the factor levels.

ADD REPLYlink written 2.4 years ago by Devon Ryan91k
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 2.3.0
Traffic: 1982 users visited in the last hour