Does response on subset of data in DESeq
1
0
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 8 hours ago
San Diego

Lets say I have an experiment like this (assume every sample has replicates)

            treatment
control     control
Treatment1  Treatment1
Treatment2  Treatment2

If I wanted to compare Treatment 1 to control, I'd likely make the dds object with all the samples, and use contrast to specify "compare Treatment1 to control". Treatment2 samples would be used in library normalization and calculating dispersion, but ignored when it came to calculating the fold change, if I understand right.

I want to do something like that, but with a dose response. I want the treatment2 samples used for library normalization and dispersion calculations, but not used when actually calculating the dose response slope. I feel the table below is the best representation of what's going on that I can make...the treatment1 samples technically have 0 of treatment2, but if I give them values of 0 for treatment1 concentration, they'll look like untreated controls which they are not.

                treatment   treatment1.concentration    treatment2.concentration
control_no_drug control     0   0
control_no_drug control     0   0
control_no_drug control     0   0
Treatment1_0.1  Treatment1  0.1 
Treatment1_0.5  Treatment1  0.5 
Treatment1_1.0  Treatment1  1   
Treatment2_0.1  Treatment2      0.1
Treatment2_0.5  Treatment2      0.5
Treatment2_1.0  Treatment2      1

But I can't run have blanks in the ColData.

The obvious workaround is to subset the data; drop all the treatment2 samples, and run DESeq on what's left, then drop the treatment1 samples to analyze treatment2. Is this the best solution?

deseq2 • 393 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 17 hours ago
United States

You can use colData with treatment and concentration, and use this design: ~treatment + treatment:concentration.

I think the only catch is that model.matrix will create an empty column for the interaction of treatment = control x concentration, and you just need to manually remove that column, e.g.:

mm <- model.matrix(design(dds), colData(dds))
mm[,-4] # put in the numeric index of the column to remove
dds <- DESeq(dds, full=mm)
...
ADD COMMENT

Login before adding your answer.

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