How to set DiffBind dba.plotHeatmap colSideCols option
1
0
Entering edit mode
Gary ▴ 20
@gary-7967
Last seen 5.8 years ago

Hi

I use the command below to draw a heatmap below. However, I would like to label DBA_CONDITION with mediumpurple1 and orange; and label DBA_TISSUE with lightskyblue and orchid1. Could you show me how to do it? Moreover, may I use Sex instead of CONDITION ,and use feather type instead of TISSUE in the figure, and how to do it?

> dba.plotHeatmap(h3k27ac, attributes = DBA_ID, ColAttributes = c(DBA_CONDITION, DBA_TISSUE), colSideCols = c("mediumpurple1", "orange", "lightskyblue", "orchid1"), correlations = FALSE, colScheme = "Blues", scale="row", margin=13)

Best & Many thanks,

Gary

diffbind • 1.5k views
ADD COMMENT
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 weeks ago
Cambridge, UK

Hi Gary-

Good news/bad news.

The good news is that you can change the labels form Condition and Tissue etc. as follows:

> h3k27ac$config$condition <- "Sex"
> h3k27ac$config$tissue <- "Feather Type"
> plot(h3k27ac)

The bad news is that there isn't an easy way to use different colors for different attributes. I may add this as a feature (by passing in colSideCols as a matrix with a column of colors for each attribute), but it isn't in there now.

Cheers-

Rory

ADD COMMENT
0
Entering edit mode

Hi Rory,

Thank you so much, and I am looking forward this new function.

Best,

Gary

ADD REPLY

Login before adding your answer.

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