Question: DEseq2 design with multiple assays, conditions, and replicates
0
gravatar for testtube
11 days ago by
testtube0
testtube0 wrote:

I want to perform a differential expression analysis with DEseq2. I have 2 conditions (input (whole cell) and a cell fraction) and 2 treatments (treated and wild type) in replicates (for simplicity, here 2).

I'm interested in the differential expression in the fraction following treatment. I think my design should be something like (Treated_fraction / Treated_input) / (WT_fraction / WT_input).

This is my countData

> head(countData)
       Geneid Length Treated_fraction_1 Treated_fraction_2 Treated_input_1 Treated_input_2 WT_fraction_1 WT_fraction_2 WT_input_1 WT_input_2
1 ENSG00000223972   1756                  0                  0               0               0             0             0          0          0
2 ENSG00000227232   2073                 29                 22              31              47            24            12         23         13
3 ENSG00000243485   1021                  0                  0               0               0             0             1          0          0
4 ENSG00000237613   1219                  0                  0               0               0             0             0          0          0
5 ENSG00000268020    947                  0                  0               0               0             0             0          0          0
6 ENSG00000240361    940                  0                  0               0               0             0             0          0          0

This is my colData

> colData
                         assays conditions replicates
Treated_fraction_1 Treated_fraction    Treated          1
Treated_fraction_2 Treated_fraction    Treated          2
Treated_input_1       Treated_input    Treated          1
Treated_input_2       Treated_input    Treated          2
WT_fraction_1           WT_fraction         WT          1
WT_fraction_2           WT_fraction         WT          2
WT_input_1               WT_input_1         WT          1
WT_input_2               WT_input_1         WT          2

So far my command is

dds <- DESeqDataSetFromMatrix(countData = subset(countData, select = -Length), 
                          colData = colData, 
                          design = ~ assays + conditions + assays:conditions,
                          tidy=TRUE)

but this give me the following error

Error in checkFullRank(modelMatrix)

Which appears to derive from the replicates column.

What would be the correct colData and design to use in this case?

Following this, I usually do

deseq.results <- results(dds, contrast=c("conditions", A, B))

What would be the correct results command for this analysis?

This is a simplified version with 2 conditions, can it be generalized to more conditions (i.e. input and multiple fractions).

Thanks!

rna-seq deseq2 R • 83 views
ADD COMMENTlink modified 11 days ago by swbarnes26.7k • written 11 days ago by testtube0
0
gravatar for swbarnes2
11 days ago by
swbarnes26.7k
United States
swbarnes26.7k wrote:

Which appears to derive from the replicates column.

No it doesn't. Your replicates column is useless, but it's not the issue. The issue is that every single WT_fraction is also in the WT condition.

Make another column that just says fraction and input. To get your (A/B) / C/D) interaction, you want thatcolumn + treatment + thatcolumn:treatment as your design. Use resultNames to get the exact naming to use in the results command.

This will give you the interaction; for example, which genes changed 2 fold between treated and not treated in input,but changed 4 fold between treated and not treated in the fraction.

If you mostly care about the changes in the fraction samples only due to treatment, just use your combo column in the design, and you an specify what to compare to what with contrast.

ADD COMMENTlink modified 11 days ago • written 11 days ago by swbarnes26.7k
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: 1335 users visited in the last hour