Re-calculate DESeq from dds based on another design
1
0
Entering edit mode
Raymond ▴ 20
@raymond-14020
Last seen 5.5 years ago

Hi, 

   I imported my data from tximport and run the following:

ddsTxi_all2 <- DESeqDataSetFromTximport(txi.kallisto_gene,
                                   colData = s2c,
                                   design = ~ summary)

dds2 <- DESeq(ddsTxi2)

Later, I saved 'dds2' to my local disk and all the following analysis were based on this dds2. Recently, I got the sex information and added

dds2$sex <- as.factor(c(rep("male",20),rep("female",12),rep("male",2)))

And now, I want to see the DEGs from the sex difference. 

dds2<- DESeq(dds2)
results(dds2,contrast = c("sex","male","female")) 

does not work because it's not in the resultsNames(dds2).  Anyone knows how to deal with this?  Is there anyway to do it from dds object? or do I need to reload all those kallisto files to Deseq2 again?

 

Thanks for your time & best regards,

Raymond

 

 

deseq2 • 819 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 7 days ago
United States

You need to add a variable to the design, and then re-run DESeq(). This isn't done automatically by adding a factor to the data set for many reasons, mostly (1) because the design is what tells exactly how you intend to model the counts using the variables, and (2) because users often have more variables in the colData which are useful metadata but not used for modeling counts.

ADD COMMENT
0
Entering edit mode

Thanks, Michael.

ADD REPLY

Login before adding your answer.

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