Setting DBA$config$mergeOverlap for Diffbind
1
0
Entering edit mode
slrpatty • 0
@3f073f21
Last seen 21 months ago
United States

I'm trying to prevent Diffbind from merging overlapping peaks in my bed file (TSS file with exactly 2000 bp widths) by setting DBA$config$mergeOverlap to a high number. But, it's still merging overlapping peaks as if DBA$config$mergeOverlap isn't working. I'm not sure if I'm using it incorrectly.

samples <- read.csv("TSS.csv")

tamoxifen <- dba(sampleSheet="TSS.csv")
tamoxifen$config$mergeOverlap <- 5000

tamoxifen.counted <- dba.count(tamoxifen, summits=F, bUseSummarizeOverlaps=T, score=DBA_SCORE_NORMALIZED, filter=0)
counts <- dba.peakset(tamoxifen.counted, bRetrieve=T)
normalized_counts <- as.data.frame(counts)

I'm still getting an output with peaks that are obviously being merged with other peaks.

DiffBind • 790 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 28 days ago
Cambridge, UK

I'm taking a closer look at how this is working and I should have a fix soon.

In the meantime, the work-around is to add a second call to dba() after you have set the mergeOverlap config value, which will trigger a recalculation of the merged peaks using the supplied parameter:

tamoxifen <- dba(sampleSheet="TSS.csv")
tamoxifen$config$mergeOverlap <- 5000
tamoxifen <- dba(tamoxifen)

tamoxifen.counted <- dba.count(tamoxifen, summits=F, bUseSummarizeOverlaps=T, score=DBA_SCORE_NORMALIZED, filter=0)
ADD COMMENT

Login before adding your answer.

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