Question: Loading samples into DESeq2
gravatar for deena
2.6 years ago by
deena10 wrote:

Hi all,

I have a RNA seq data performed at different time points. So for every time I have 4 samples(Control, Knock-down_1, Knock-down_2, Knock-down_3). So all together there are 36 samples from all 3 time points.

Now I want to compare every Knock-down sample within a particular time point to its Control samples within the particular time point.
So for this type of analysis,

a) Should I include all the 36 samples all together in the count matrix and later contrast to specify the sample vs  samples in DESeq2


b) Should I include only samples within the particular time point(12 samples) in the count matrix and compare all Knock-down samples with respect to Control sample using DESeq2
c) Should I include only two samples within a time point in count matrix and compute diff. expressed genes using DESeq2     

Thanks in advance

deseq2 • 503 views
ADD COMMENTlink modified 2.6 years ago by Michael Love25k • written 2.6 years ago by deena10
Answer: Loading samples into DESeq2
gravatar for Michael Love
2.6 years ago by
Michael Love25k
United States
Michael Love25k wrote:

4 conditions, 3 time points => 12, then 3 biological replicates? Just want to make sure I understand what the experimental design looks like.

Include all the samples in the design, and you can follow the example here:

You are interested in the Wald test results, which are demonstrated later in that section, e.g.:

res <- results(dds, name="strainmut.minute30", test="Wald")


ADD COMMENTlink written 2.6 years ago by Michael Love25k

Thank you Michael. You understood correctly my experimental design.  So far I have made a data frame called conditions in R like following

Treated1_T2_1                      Treated1_T2
Treated1_T2_2                      Treated1_T2
Treated1_T2_3                      Treated1_T2         
Treated1_T3_1                      Treated1_T3          
Treated1_T3_2                      Treated1_T3      
Treated1_T3_3                       Treated1_T3         
Treated1_T1_1                       Treated1_T1          
Treated1_T1_2                       Treated1_T1          
Treated1_T1_3                       Treated1_T1          
Treated1Treated2_T2_1         Treated1Treated2_T2     
Treated1Treated2_T2_2         Treated1Treated2_T2     
Treated1Treated2_T2_3         Treated1Treated2_T2     
Treated1Treated2_T3_1          Treated1Treated2_T3      
Treated1Treated2_T3_2          Treated1Treated2_T3    
Treated1Treated2_T3_3          Treated1Treated2_T3      
Treated1Treated2_T1_1          Treated1Treated2_T1      
Treated1Treated2_T1_2          Treated1Treated2_T1      
Treated1Treated2_T1_3          Treated1Treated2_T1      
Treated2_T2_1                        Treated2_T2         
Treated2_T2_2                        Treated2_T2         
Treated2_T2_3                        Treated2_T2         
Treated2_T3_1                        Treated2_T3          
Treated2_T3_2                        Treated2_T3          
Treated2_T3_3                        Treated2_T3          
Treated2_T1_1                        Treated2_T1          
Treated2_T1_2                        Treated2_T1          
Treated2_T1_3                        Treated2_T1          
Control_T2_1                          Control_T2          
Control_T2_2                          Control_T2          
Control_T2_3                          Control_T2          
Control_T3_1                          Control_T3           
Control_T3_2                          Control_T3           
Control_T3_3                          Control_T3           
Control_T1_1                         Control_T1           
Control_T1_2                         Control_T1           
Control_T1_3                         Control_T1   

This will passed into DESeq2DataSetFromMatrix like following

ddsFullCountTable <- DESeqDataSetFromMatrix(countData = rnaseqMatrix,colData = conditions,design = ~ conditions

When I want compute the diff expressed between two conditions, I use results in following way

res=results(dds,contrast = c("conditions","Treated_T3","Control_T3")))

Now using the "name" parameter, how can this be achieved according to my conditions. Just to make sure, that I am not comparing the samples between the time points but within time point. 


ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by deena10

Your code is correct for the way you have set it up. You should use 'contrast' as you have.

The example I pointed you to is going at it a different way, but you can go ahead and use the code you have.

ADD REPLYlink written 2.6 years ago by Michael Love25k

Thanks a lot Michael. The strange thing which I found this huge data is that many replicates particular samples in particular time point gets clustered with other samples of different time point. I havent observed such kind of clustering and I am wondering how to handle such replicate that dosent clusters within its own group. Kindly guide me

ADD REPLYlink written 2.6 years ago by deena10

I don't have any particular advice. Remember that PCA is not the data itself, but a reduction into 2 dimensions. So it doesn't imply a problem necessarily.

ADD REPLYlink written 2.6 years ago by Michael Love25k
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: 462 users visited in the last hour