DESeq2 design matrix with a single mock and multiple timepoints
1
0
Entering edit mode
ap3637 • 0
@ap3637-13814
Last seen 5.6 years ago


So I have a problem with a dataset I'm working on. Here is information about the samples.  

Three viruses at three timepoints:
Virus1_day1, Virus1_day3, Virus1_day8.
Virus2_day1, Virus2_day3, Virus2_day8.
Virus3_day1, Virus3_day3, Virus3_day8.

And mock samples at a single timepoint:
Mock_day6

 

Here is a link to my actual sample list.

https://justpaste.it/1admm


Essentially, using DESeq2 I want to compare each virus at each time point to the mock condition.  I can't do this because the design model isn't full rank though.  I have only a single set of mocks, from day 6, and the viruses from days 1,3, and 8.  I want to compare each virus at each time point to the mock set.  

Specifically:
Virus1_day1 vs Mock
Virus1_day3 vs Mock
Virus1_day8 vs Mock
Virus2_day1 vs Mock
Virus2_day3 vs Mock
Virus2_day8 vs Mock
Virus3_day1 vs Mock
Virus3_day3 vs Mock
Virus3_day8 vs Mock

What I've done so far is to just separate the input based on timepoint, and then do my design matrix as ~ Virus.  I really want to be able to process all of the data in a single set, however, and extract DE data for each comparison.

Can anyone help me figure out how to make the design matrix correctly specify the contrasts I'm trying to do?  Thanks very much in advance.

 

 

deseq2 design matrix • 1.2k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 9 minutes ago
United States

Why can't you combine virus and day into a single character vector using paste(), and then set this variable to "mock" for the mock samples? So you get a factor with levels: {virus1_day1, ..., virus3_day8, mock}

ADD COMMENT
0
Entering edit mode

Thanks for your reply Michael.  This is really helpful.  I actually had tried this before using the composite column, Virus_Time, in the data file I provided.  I had believed that it wasn't the right thing to do because the resultsNames(dds) seemed pretty random, but it turns out I had not re-leveled correctly to the new Virus_Time.  After trying again, thanks to you, it all came together.  

Thank you very much.  :)

ADD REPLY

Login before adding your answer.

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