Hello @amira_ndi ,
In order to set a different color for each gene, you just need to pass a 5th data column (please see the input format in docs). In your case, you could just pass the names of the genes like:
anno.data <- cbind.data.frame(anno.data,Category=anno.data$element)
and you can set the color for each gene. Also, you can use the legend = T argument to show the legends for your plot.
here is example code:
chromoMap(list(chr.data),list(anno.data),
# labelling arguments
labels = T,
label_font = 12,
label_angle = -55,
# group annotation arguments
data_based_color_map = T,
data_type = "categorical",
data_colors = list(c("red2","yellow3","blue2","orange3","purple","green2")),
# for the legend
legend = T,
#adjusting the legend along y-axis
lg_y = 250,
#increasing canvas width for legend
canvas_width = 600,
#playing with plot properties
text_font_size = 12,
chr_color = c("#d3d3d3"))
I hope that was helpful!
Thanks & regards,
Lakshay