Is it possible to change how DiffBind merge peaks?
2
0
Entering edit mode
@zhenfengliu1-21576
Last seen 16 months ago

The default behavior of DiffBind when merging peaks from different samples is that peaks with at least 1 bp overlap will be merged. For example, peak chr1:100-300 will be merged with peak chr1:299-500. Is it possible to change this behavior, for example, requiring at least 50% bp overlap between the two peaks, so the above example won't merge? If anyone knows how to do this in DiffBind or ways using other R packages that would still be compatible with other parts of DiffBind, that would be great.

Thank you.

DiffBind ChIPseq • 258 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 3.9k
@rory-stark-5741
Last seen 10 hours ago
CRUK, Cambridge, UK

We are looking at exposing this feature in DiffBind, but currently there is no way to override the 1bp overlap.

If you are able to separately derive a merged consensus set using alternative criteria, not that you can pass it in to dba.count() and that set will be used for all the subsequent steps (so long as the intervals you pass in are not themselves overlapping).

ADD COMMENT
0
Entering edit mode

Hi Rory, did you solve this problem with the new diffbind? I read the manual and I didn't find anything but maybe I'm not finding the right point.

ADD REPLY
0
Entering edit mode

See separate answer.

ADD REPLY
0
Entering edit mode
Rory Stark ★ 3.9k
@rory-stark-5741
Last seen 10 hours ago
CRUK, Cambridge, UK

There will be a version of the feature in the next release (scheduled for May 20). It is available in the Development version starting from DiffBind_3_1_7.

A specific overlap value (in basepairs) can be specified by setting a configuration parameter:

DBA$config$mergeOverlap

The default is 1, meaning all peaks that overlap by at least 1 basepair will be merged. If you set it higher, for example to 100, peaks won't be merged unless they overlap by at least 100bp. Note that this means you can have separate consensus peaks that actually overlap, which may impact the counting, as by default any reads that overlap more than one consensus peak will not be counted. (You can control this with another configuration option, DBA$config$intersectMode).

Negative values can also be used to specify that peaks that do not overlap, but are within a "gap" of a set number of basepairs of each other, will be merged.

There isn't an option to specify the overlap amount using a percentage, just a constant.

ADD COMMENT

Login before adding your answer.

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