Question: Change color of Diffbind's PCA and clustered heatmap plot()
0
gravatar for melnuesch
24 days ago by
melnuesch10
melnuesch10 wrote:

I changed the color palette from the dba.plotPCA very easily:

I defined

 mypalette=c()

(whatever colors I want) and then

 dba.plotPCA(results,DBA_CONDITION, label=DBA_ID,vColors=mypalette)

but I cannot seem to be able to do the same for the clustered heatmap (the one produced by plot(results) in DiffBind).

plot(results,vColors=mypalette)

or

plot(results,col=mypalette)

does not work. It says "error in plot.new() figure margins too large". I save it directly to a pdf file and does not complain, but when I open the picture has the default color palette all over again.

I also tried setting

palette(mypalette)

and then just running plot(results) but did not work, continued using the default one.

What can I do ? Because I want it to match the new colors I use in the PCA plot. Thank you for your time.

diffbind plot color • 103 views
ADD COMMENTlink modified 22 days ago • written 24 days ago by melnuesch10
Answer: Change color of Diffbind's PCA and clustered heatmap plot()
0
gravatar for Rory Stark
24 days ago by
Rory Stark3.0k
CRUK, Cambridge, UK
Rory Stark3.0k wrote:

plot() calls dba.plotHeatmap(), see the help page. You need to set the colScheme parameter to change the heatmap colors (using a colorRampPalette from RColorBrewer)

ADD COMMENTlink written 24 days ago by Rory Stark3.0k
Answer: Change color of Diffbind's PCA and clustered heatmap plot()
0
gravatar for melnuesch
22 days ago by
melnuesch10
melnuesch10 wrote:

But colScheme changes the color of the heatmap itself (the rectangles that in the default are green). I meant that I wanted to change the colors of the groups (Conditions) to match the color of the dots of the PCA plot. I want the heatmap to still be green but the condition groups to follow that other palette. I tried to change colScheme="Oranges", for example, but it did not do what I was looking for (just painted my heatmap rectangles orange). Do you have another solution? Thank you very much for your time.

ADD COMMENTlink modified 22 days ago • written 22 days ago by melnuesch10
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: 142 users visited in the last hour