Question: Compare expression of one group to the mean of others using DESeq2
0
gravatar for afli
13 months ago by
afli190
China, Beijing, IGDB
afli190 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 • 657 views
ADD COMMENTlink modified 13 months ago • written 13 months ago by afli190

Post the output of resultsNames(dds).

ADD REPLYlink written 13 months ago by Devon Ryan93k

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

ADD REPLYlink written 13 months ago by ATpoint26k

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

ADD REPLYlink written 13 months ago by afli190

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 13 months ago • written 13 months ago by ATpoint26k
1
gravatar for afli
13 months ago by
afli190
China, Beijing, IGDB
afli190 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 13 months ago • written 13 months ago by afli190
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: 785 users visited in the last hour