Search
Question: Altering design following DESeqDataSetFromMatrix and DESeq
0
gravatar for rbronste
14 days ago by
rbronste20
rbronste20 wrote:

I was wondering if it was possible to augment design, flip lets say:

dds<-DESeqDataSetFromMatrix(countData = countData,
                            colData = colData,
                            design =  ~ treatment + sex)​

to

dds<-DESeqDataSetFromMatrix(countData = countData,
                            colData = colData,
                            design =  ~ sex + treatment)

And to do this following the differential analysis. I am assuming the answer is no, but wanted to ask given large binding matrices where the DE analysis is considerably longer than for gene lists. Thanks.

ADD COMMENTlink modified 14 days ago by Michael Love15k • written 14 days ago by rbronste20
2
gravatar for Michael Love
14 days ago by
Michael Love15k
United States
Michael Love15k wrote:

There’s no need to flip those designs. Because addition is commutative they have the same coefficients which are both accessible with special calls to results()

If you have designs that aren’t equivalent you can use the design replacement function, you just need to rerun DESeq() afterward.

ADD COMMENTlink written 14 days ago by Michael Love15k

Thanks for explanation Michael. 

I can see now that looking via the following will give me what I need:

plotCounts(dds, gene=which.min(res$padj), intgroup = "sex")

plotCounts(dds, gene=which.max(res$padj), intgroup = "sex")

At least on a site by site basis. What is an easy way to export such results with a specific adjusted p-val cutoff?

ADD REPLYlink written 14 days ago by rbronste20
1

I can’t think of a valid use for max(adj pvalue). Large p values don’t have a meaningful interpretation. You may want to chat about what you’re looking to do with a local statistician. 

Exporting results tables is handled in the DESeq2 vignette. Please have a look there, in the section that starts “Exporting only the results which pass an adjusted pvalue threshold...”

ADD REPLYlink written 14 days ago by Michael Love15k

Sorry pasted the wrong line. I def am not interested in the high p-value result for export, was moreso trying to a quick way to export for instance sites that are differential within sex (under some low cutoff, with treatment remaining steady) or conversely within treatment. I did not see a clear description of that given a single design, or may have missed it. Thanks!

ADD REPLYlink written 14 days ago by rbronste20
1

Just saw this, there is no a way with a single design/results table to specify that you see DE wrt one covariate but not DE wrt another. We do have methods for testing "not DE", see the lfcThreshold and altHypothesis="lessAbs" in the vignette and the description in the DESeq2 paper. So you could test for DE, then test for not DE, then consider the intersection of those FDR sets (although that final set does not have an interpretable FDR bound, it's simply the intersection of two sets).

ADD REPLYlink written 8 days ago by Michael Love15k

Great thanks thats what I was looking for! I guess then my original point holds true, that to test DE wrt one covariate or the reverse, you just need two independent designs and results tables? I probably did not make that too clear in my original question. 

ADD REPLYlink modified 8 days ago • written 8 days ago by rbronste20

Any thoughts on this final question? Thanks so much! 

ADD REPLYlink written 8 days ago by rbronste20
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.2.0
Traffic: 143 users visited in the last hour