Question: Change DiffBind correlation matrix scale
0
gravatar for eli7javasky
3.9 years ago by
European Union
eli7javasky0 wrote:

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

 

 

ADD COMMENTlink modified 3.9 years ago • written 3.9 years ago by eli7javasky0
Answer: Change DiffBind correlation matrix scale
0
gravatar for Rory Stark
3.9 years ago by
Rory Stark2.8k
CRUK, Cambridge, UK
Rory Stark2.8k wrote:

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 COMMENTlink written 3.9 years ago by Rory Stark2.8k

Thank you so much

ADD REPLYlink written 3.9 years ago by eli7javasky0

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 REPLYlink written 3.9 years ago by eli7javasky0
Answer: Change DiffBind correlation matrix scale
0
gravatar for Rory Stark
3.9 years ago by
Rory Stark2.8k
CRUK, Cambridge, UK
Rory Stark2.8k wrote:

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 COMMENTlink written 3.9 years ago by Rory Stark2.8k
Answer: Change DiffBind correlation matrix scale
0
gravatar for eli7javasky
3.9 years ago by
European Union
eli7javasky0 wrote:

Thank you 

ADD COMMENTlink written 3.9 years ago by eli7javasky0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 252 users visited in the last hour