Question: Compare expression of one group to the mean of others using DESeq2
0
gravatar for afli
4 months ago by
afli160
China, Beijing, IGDB
afli160 wrote:

Hi, I want to compare one condition to the mean of the other two conditions, sample data are as follows(the sample data is borrowed from someone else):

test_data=sapply(rep(20,9), function(x) { sample(seq(1:100), x) })
col_data = data.frame(condition=c("a","a","a","b","b","b","c","c","c"))
dds = DESeqDataSetFromMatrix(countData = test_data, colData = col_data, design = ~ condition)
dds <- DESeq(dds)
resultsNames(dds)
[1] "Intercept"        "condition_b_vs_a" "condition_c_vs_a"

I use the command line that Michael suggested at https://support.bioconductor.org/p/69104/,

res<-results(dds, contrast=c(0,1,-0.5,-0.5))

But I get an error:

Error in checkContrast(contrast, resNames) :
numeric contrast vector should have one element for every element of 'resultsNames(object)'

I search much on google, and do not find any useful information yet. Could someone tell what is the right way to compare one condition to the mean of the other two condition using DESeq2? Thank you very much!

Cheers,

Aifu.

deseq2 • 312 views
ADD COMMENTlink modified 3 months ago • written 4 months ago by afli160

Post the output of resultsNames(dds).

ADD REPLYlink written 3 months ago by Devon Ryan88k

Cross-posted to https://support.bioconductor.org/p/69104/.

ADD REPLYlink written 3 months ago by ATpoint13k

Yes, I also see this post, and I post question on this post too, but I did not get my answer.

ADD REPLYlink written 3 months ago by afli160

Cross-post means that an OP (you) asked the exact same question in two different communities, which is generally not recommended as it might offend people in either community. My intend was to inform others, not you. Still, not a big deal, don't worry :)

ADD REPLYlink modified 3 months ago • written 3 months ago by ATpoint13k
1
gravatar for afli
3 months ago by
afli160
China, Beijing, IGDB
afli160 wrote:

I get some progression, and I'll read the original DESeq2 paper for more information.

dds <- DESeq(dds, betaPrior = TRUE)
resultsNames(dds)
[1] "Intercept"  "conditiona" "conditionb" "conditionc"
ADD COMMENTlink modified 3 months ago • written 3 months ago by afli160
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: 1298 users visited in the last hour