How to include/show/add correction factors/numbers to the Diffbind heat map tiles
2
0
Entering edit mode
Katrin • 0
@979f8842
Last seen 3.1 years ago
Germany

Hello everyone,

I would like to have some help to a retrieve a matrix or add additional features to the DiffBind heatmap. So fare, I am using the DiffBind R package and I would like to show the correlation factors in the heatmap as numbers in the different tiles or as an alternative save the matrix, which is used to generate the heatmap to take the correlations factors from there. I am using ChIP-Seq data to investigate different Binding behaviours of a Hox transcription factor, for me the correlations numbers don't really have to be added to the heatmap but a reviewer asked for it and I just can find the right solution to get the numbers/factors.

Thank you for your time Katrin

```r

library (DiffBind)

Degrad = dba(sampleSheet = "DegradFileME.csv") plot(Degrad) # here I would like to add/show the correlation factors in the Heatmap or save the matrix, which is used to generate the Heatmap

DiffBind • 1.0k views
ADD COMMENT
1
Entering edit mode
@guillaume-devailly-8722
Last seen 3 months ago
Toulouse, France

Hi,

the correlation values are returned (invisibly) by the dba.plotHeatmap() function. I.e.:

library (DiffBind)
basedir <- system.file("extra", package="DiffBind")
tamoxifen <- dba(sampleSheet="tamoxifen.csv", dir=basedir)
corval <- dba.plotHeatmap(tamoxifen)
corval
#       T47D2 T47D1 ZR752 ZR751 BT4742 BT4741 MCF7r1 MCF7r2 MCF72 MCF71 MCF73
# T47D2   1.00  0.91  0.38  0.42   0.44   0.48   0.36   0.42  0.46  0.42  0.44
# T47D1   0.91  1.00  0.37  0.42   0.46   0.49   0.36   0.42  0.46  0.42  0.44
# ZR752   0.38  0.37  1.00  0.96   0.56   0.57   0.39   0.38  0.47  0.48  0.49
# ZR751   0.42  0.42  0.96  1.00   0.59   0.61   0.42   0.41  0.51  0.53  0.53
# BT4742  0.44  0.46  0.56  0.59   1.00   0.97   0.58   0.59  0.62  0.63  0.65
# BT4741  0.48  0.49  0.57  0.61   0.97   1.00   0.59   0.61  0.64  0.65  0.66
# MCF7r1  0.36  0.36  0.39  0.42   0.58   0.59   1.00   0.92  0.71  0.73  0.74
# MCF7r2  0.42  0.42  0.38  0.41   0.59   0.61   0.92   1.00  0.77  0.73  0.75
# MCF72   0.46  0.46  0.47  0.51   0.62   0.64   0.71   0.77  1.00  0.91  0.95
# MCF71   0.42  0.42  0.48  0.53   0.63   0.65   0.73   0.73  0.91  1.00  0.96
# MCF73   0.44  0.44  0.49  0.53   0.65   0.66   0.74   0.75  0.95  0.96  1.00

You can use the cellnote parameter of the heatmap.2 function to pass back the values to be displayed:

dba.plotHeatmap(tamoxifen, cellnote = corval)

But the order seems all messed up, as it is in the "post clustering" order but should be in the "original, unclustered" order.

I tried to suppress the clusering in dba.plotHeatmap, but without success.

dba.plotHeatmap(tamoxifen, Rowv = FALSE)

workds fine, but the foollowing returns an error.

dba.plotHeatmap(tamoxifen, Rowv = FALSE, Colv = FALSE)
#> Erreur dans heatmap.3(domap, labCol = collab, col = cols, trace = "none",  : 
#> argument formel "Colv" correspondant à plusieurs arguments fournis
ADD COMMENT
0
Entering edit mode
Katrin • 0
@979f8842
Last seen 3.1 years ago
Germany

Thank you very much. It worked perfectly well.

ADD COMMENT

Login before adding your answer.

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