Can we control colors for two different colAtributes
1
0
Entering edit mode
researcher • 0
@researcher-20723
Last seen 11 weeks ago
United States

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 • 444 views
0
Entering edit mode
Rory Stark ★ 4.4k
@rory-stark-5741
Last seen 5 days ago
CRUK, Cambridge, UK

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)?

0
Entering edit mode

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.