Question: Can we control colors for two different colAtributes
0
12 weeks ago by
researcher0 wrote:

How can I control colors for different colAttributes: one as Factor and other is Condition. Can I use different colors for these two cola attributes? Additionally, How can I have the color annotation for each factor and condition. Kindly help. Thanks!

diffbind plot plotheatmap • 113 views
modified 12 weeks ago by Rory Stark2.9k • written 12 weeks ago by researcher0
Answer: Can we control colors for two different colAtributes
0
12 weeks ago by
Rory Stark2.9k
CRUK, Cambridge, UK
Rory Stark2.9k wrote:

The colSideCols parameter can be a list of vectors of colors. Each vector specifies the colors to use for each of the attributes.

For example, using the sample data provided with DiffBind:

data(tamoxifen_counts)
plot(tamoxifen, ColAttributes=c(DBA_TISSUE,DBA_CONDITION),
colSideCols=list(c("red","green","blue","yellow"),c(5:6)))


I'm not sure I understand the difference between the main question (different colors for the two attributes) and the "additional" question (color for each factor and condition)?

Hi @Rory, thank you so much for your great help.

Does the colSideCols also make sure that there should not be an overlap of colors between DBATISSUE and DBACONDITION?

In my additional question, I want to ask how can we add the definition of each color in the legend to show which color represent which tissue or condition.