DiffBind dba.analyze() to return all differentially enriched peaks?
Entering edit mode
Last seen 7.1 years ago
UC Berkeley

Hi Rory,

I am using DiffBind to analyze differential transcription factor binding in some data I have and I keep getting the message as a result of dba.analyze(myData): "No correlation heatmap plotted -- contrast 1 does not have enough differentially bound sites."

I looked at the source code on github (DBA.R: lines 551 - 565) and was wondering if there is a way to get dba.analyze() to return an object of all differentially bound sites even if their p-values do not meet the cutoff? Would I just change line 553 "th = 0.05" to whatever threshold I choose?

My output from sessionInfo() is: R version 3.1.2 (2014-10-31); Platform: x86_64-unknown-linux-gnu (64-bit) ....

other attached packages:
 [1] DiffBind_1.12.3         GenomicAlignments_1.2.2 Rsamtools_1.18.3
 [4] Biostrings_2.34.1       XVector_0.6.0           limma_3.22.7
 [7] GenomicRanges_1.18.4    GenomeInfoDb_1.2.5      IRanges_2.0.1
[10] S4Vectors_0.4.0         BiocGenerics_0.12.1 ...

Would appreciate your help! Thanks,


diffbind p-value differential binding analysis fold enrichment values using diffbind • 2.1k views
Entering edit mode
Rory Stark ★ 5.2k
Last seen 1 day ago
Cambridge, UK

Hello Alison-

I see that you are using a fairly old version of DiffBind -- the way this works has changed a bit in subsequent versions.

In the version you are using, the default is for dba.analyze() to plot a correlation heatmap by default. (The default has changed). All you need to do to get your DBA object back is to set bCorPlot=FALSE. Then you can set the FDR threshold to whatever you like when you examine the result using plot(), dba.report(), dba.plotMA(), etc.. For example:

> myDBA <- dba.analyze(myDBA, bCorPlot=FALSE)
> results <- dba.report(myDBA, contrast=1, th=1)

This will return a report with the statistics for every interval in the analysis; you can see how many peaks are differentially bound at different thresholds:

> sum(results$FDR < .1)
> sum(results$FDR< .05)


In more recent versions of DiffBind, you can change the default threshold everywhere in one go:

> myDBA$config$th <- 0.10

Hope this helps!




Login before adding your answer.

Traffic: 557 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6