dba.contrast in DiffBind
1
0
Entering edit mode
AMA • 0
@91973851
Last seen 26 days ago
United States

Hi,

I'm having issue with dba.contrast() in DiffBind v3.4.0.

I have two conditions, and each condition has 3 replicates. I'm working a simple differential peak analysis between treatment vs. control. Also, in my sampleSheet, my treatment samples come first then the control samples are under, because I wanted the Fold to be log2(treatment - control)

My issue is that I find the results to be inconsistent when I change the settings of the contrast, and I don't know which method is valid.

First approach is the automatic way:

  DBdata$contrasts=NULL
  DBdata <- dba.contrast(DBdata, categories = DBA_CONDITION) 
  DBdata <- dba.analyze(DBdata, method=DBA_ALL_METHODS, bParallel = TRUE)
  dba.show(DBdata, bContrasts=TRUE)

I ended up with 16,851 diffPeaks. The fold is log2(control - treatment), but I used bFlip to get what I want.

However, with the second approach, which is the following:

  DBdata$contrasts=NULL
  DBdata <- dba.contrast(DBdata, design=FALSE, group1=DBdata$masks$treat, group2 = DBdata$masks$untrt, name1="treat", name2="untrt")
  DBdata <- dba.analyze(DBdata, method=DBA_ALL_METHODS, bParallel = TRUE)
  dba.show(DBdata, bContrasts=TRUE)

While the order is fixed log2(treatment - control), I get 24,165 diffPeaks.

I don't know why the results are not consistent, and I hope you can help me to figure out which one is the right setting that I can trust..

Thank you

v3.4.0 DiffBind • 204 views
ADD COMMENT
0
Entering edit mode

Rory Stark I hope you can share your insight on this issue. I'm stuck with my analysis because I'm not sure which method I should trust.. Thank you in advance

ADD REPLY
3
Entering edit mode
Rory Stark ★ 4.2k
@rory-stark-5741
Last seen 1 day ago
CRUK, Cambridge, UK

The first way, where you do not say design=FALSE, is preferred. The second way is included for backward compatibility, yielding the results DiffBind would give prior to version 3, but does not follow current best practices.

You can switch which condition is used as the reference using the reorderMeta parameter:

 DBdata <- dba.contrast(DBdata, categories = DBA_CONDITION,
                        reorderMeta = list(Condition="untrt"))
ADD COMMENT
0
Entering edit mode

Thank you for clarifying that Rory Stark

I'm following your suggestion. However, I noticed one thing changed with the new approach. When I use dba.Volcano() with fold=1 for example, the plot doesn't show the grey points (that are not significant) like the older approach.

In the older approach, I give fold=1, and it still keeps the grey points in the volcano plot.

Is there a way to work around this with the new version?

Thank you

ADD REPLY
0
Entering edit mode

Hmmn, I'm not able to reproduce this:

data(tamoxifen_analysis) dba.plotVolcano(tamoxifen) dba.plotVolcano(tamoxifen, fold=1)

In both cases the non-significant sites are shown in blue (not grey). Perhaps you can send me your DBA object so I can see how the plots work with and without specifying a fold?

ADD REPLY

Login before adding your answer.

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