Search
Question: DiffBind dba.analyze() to return all differentially enriched peaks?
0
gravatar for alisonhanh.nguyen
17 months ago by
UC Berkeley
alisonhanh.nguyen0 wrote:

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,

Alison

ADD COMMENTlink modified 17 months ago by Rory Stark2.1k • written 17 months ago by alisonhanh.nguyen0
2
gravatar for Rory Stark
17 months ago by
Rory Stark2.1k
CRUK, Cambridge, UK
Rory Stark2.1k wrote:

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)

etc.

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

> myDBA$config$th <- 0.10

Hope this helps!

Cheers-

Rory

ADD COMMENTlink written 17 months ago by Rory Stark2.1k
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: 137 users visited in the last hour