Understandig listValues argument of DESEQ in multiple group comparisons
3
0
Entering edit mode
User000 • 0
@ea03770f
Last seen 18 months ago
Italy

Dear all,

I would like to understand the listValues argument of DESEQ2 when comparing multiple groups. For i.e. 1 vs 2 is like this,

res <- results(dds, contrast=list("conditionAB", c("conditionAA", "conditionBB"), listValues=c(1, -1/2))

What about 4 vs 2? or 2 vs 3?

res <- results(dds, contrast=list(c("conditionA","conditionB","conditionC","conditionD"), c("conditionAA", "conditionBB")), listValues=c(4, -1/2))

res <- results(dds, contrast=list(c("conditionA","conditionB"), c("conditionAA", "conditionBB","conditionCC")), listValues=c(2, -1/3))

Is this right?

DESeq2 • 1.6k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 6 hours ago
United States

It's important to know what the coefficients mean. If you have a multi-group design and you have excluded the intercept, then you are just averaging the cell means. So 2 vs 3 should be 1/2 and -1/3. But the correct answer here depends on the design.

ADD COMMENT
0
Entering edit mode

I think I am not understanding at all this part. Could you please explain better, otherwise forward me to some link to understand better. Thnaks

ADD REPLY
0
Entering edit mode

Unfortunately I don’t have a lot of extra time so I have to limit myself to software related questions. For statistical design and interpretation of results I’d recommend collaborating with a local statistician or someone familiar with linear models in R.

ADD REPLY
0
Entering edit mode

Thank for your time and reply. If I had a local statistician I wouldn't be asking this question in community. Unfortunately, in the manual I do not find a lot of information or examples, which would help to understand particular cases. Only classical treated vs untreated. I have treated data of several patients (no replicates) which I want to compare together against untreated donor patients. Since these are not replicates but data from different patients at different level of disease, I guess taking the average is a good way? This is what I am doing, but I am not sure this is the rigth way to compare conditions coming from different patients. Any suggestion is much appreciated. Thanks.

mm = model.matrix(~0+condition, sampledata)
dds <- DESeqDataSetFromTximport(txi.g, colData=sampledata, design=mm)
dds <- DESeq(dds)
res <- DESeq2::results(dds, 
               contrast = list(c("condition_treated_patient1","condition_treated_patient2","condition_treated_patient3","condition_treated_patient4"),c("condition_control_patient1","condition_control_patient2")), 
               listValues = c(1/4,-1/2)
)
ADD REPLY
0
Entering edit mode

Despite not having coordinated someone you could plan your statistical analysis with, I still can't offer statistical consulting on the support site. I have to restrict my time to software related questions.

ADD REPLY
0
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 1 day ago
San Diego

You can do just about what you've written much simpler by making a new column of ColData with just "Condition_ABCD" and "Condition_AABB", for example. It's not exactly the same as making lists in the contrast like you did, but it sure is a lot easier to read and understand, and harder to mess up.

ADD COMMENT
0
Entering edit mode
@0fe40c5d
Last seen 12 months ago
Singapore

Hi Michael Love,

Do you have some example on how to run listValues argument with batch correction? I want to do 1vsALL calculation for my data (18 conditions) and but the data also have batch effect (5 batches). based on previous post, I plan to run my DE like this:

rds <- results(dds, contrast = list(c(group1),c(othergroups)), listValues = c(1,-1/17))

However, I keep having problem because group1 is missing.

this is the result if I run resultsNames(dds):

"batch1", "batch2", "batch3", "batch4", "batch5", "group2", "group3", "group4", "group5", "group6", "group7", "group8", "group9", "group10", "group11", "group12", "group13", "group14", "group15", "group16", "group17", "group18"

This is how I run my code:

dds <- DESeqDataSetFromMatrix(countData = input, colData = group, design= ~ 0+batch+group)

Any suggestion on how should I put on my design?

ADD COMMENT
0
Entering edit mode

Sorry I don't have sufficient time for answering non-software related questions on the support site. I recommend consulting with a local statistician.

ADD REPLY

Login before adding your answer.

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