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
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