Can we control colors for two different colAtributes
1
0
Entering edit mode
researcher • 0
@researcher-20723
Last seen 21 months ago

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 • 306 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 4.1k
@rory-stark-5741
Last seen 15 hours 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)?

ADD COMMENT
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.

ADD REPLY

Login before adding your answer.

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