Change DiffBind correlation matrix scale
3
0
Entering edit mode
@eli7javasky-9060
Last seen 6.8 years ago
European Union

Hi,

We are trying to use diffBind and are puzzled by the scale on our correlation matrices. In one of our datasets the correlation goes between 0.9-1, while in the other from 0.7-1. Is there a way to modify it such that both are from 0-1 or 0.5-1? Thank you,

Elisheva J

 

 

diffbind scale correlation matrix • 1.1k views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 4.4k
@rory-stark-5741
Last seen 8 days ago
CRUK, Cambridge, UK

Hello-

The main heatmap plot shows correlation values. DiffBind uses heatmap.2 in ggplots for the underlying plot, which by default scales to the range of values. Hence if everything is highly correlated the scale may only include values above 0.9, while in another case there can be anti-correlation and a much different scale between -1 to +1.  heatmap.2 doesn't offer a way to specify the scale.

What you can do is re-scale the values using z-scores, either by row or by column. For the correlation heatmaps, the rows and columns are the same (symmetrical square matrix) so it doesn't matter which you choose, but you will always get a scale between -2 and +2. An example:

> plot(myDBA, scale="row")

(equivalent to dba.plotHeatmap(myDBA, scale="row"))

Cheers-

Rory

ADD COMMENT
0
Entering edit mode

Thank you so much

ADD REPLY
0
Entering edit mode

I got a scale between -2 and 2 for one of my datasets, but for the other it is between -3 and 3. Is there a way to change this so both are using the same scale?

Thanks 

ADD REPLY
0
Entering edit mode
Rory Stark ★ 4.4k
@rory-stark-5741
Last seen 8 days ago
CRUK, Cambridge, UK

You are correct, even the Z-score transformation doesn't fix the scale (based on the degree of variance). It would be nice to be able to do this, I'll keep looking into it.

-R

ADD COMMENT
0
Entering edit mode
@eli7javasky-9060
Last seen 6.8 years ago
European Union

Thank you 

ADD COMMENT

Login before adding your answer.

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