How to extract binding affinity matrix in Diffbind
1
0
Entering edit mode
2.1 years ago
1614999088 • 0

Hi everyone, I'm performing ChIP-Seq analysis using Diffbind3.0, after doing:

>     dbObj <- dba(sampleSheet="peaksfile_merged.txt")
>     dbObj <- dba.count(dbObj, bUseSummarizeOverlaps=FALSE, summits=FALSE)
>     dbObj <- dba.normalize(dbObj, normalize=DBA_NORM_LIB)

then use plot(dbObj) for clustering among samples,and generate a heatmap of clustering among samples.

However, we want to make some adjustments to the generated heatmap. What are the parameters in the plot() function, or can we extract the original data used to draw the heatmap?

help will be highly appriciated!

Diffbind Clustering among ChIPseq samples • 1.2k views
ADD COMMENT
0
Entering edit mode
2.1 years ago
Rory Stark ★ 2.1k

plot() calls dba.plotHeatmap(); parameter documentation is available on the help page.

You can also extract the normalized count data using dba.peakset() with bRetrieve=TRUE

ADD COMMENT
0
Entering edit mode

Hi Rory,

From the latest update, I can retrieve the data from dba.peakset() ,after doing:

data <- dba.peakset(dbObj, bRetrieve=TRUE)

Then use the following code to calculate the correlation of each sample and draw the heatmap:

> result <- cor(data) ## use pearson method 
> heatmap.2(result )

However, the heatmap obtained is not consistent with that drawn by using the default function dba.plotHeatmap(dbObj), and the clustering results are also different.Does it need to set other parameters.

Thank you very much!

ADD REPLY
0
Entering edit mode

This is likely due to the default setting in dba.plotHeatmap() of bLog=TRUE, which uses the log2() normalized count values for the correlations.

ADD REPLY

Login before adding your answer.

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