karyoploteR
karyoploteR copied to clipboard
multiple highlight colors in manhattanplot?
I'm highlighing a region in a manhattanplot as follows.
sarm1 <- all_GR_score[grepl("SARM1",all_GR_score$MARKER_ID)]
kp <- plotKaryotype("hg19", plot.type=4)
kp <- kpPlotManhattan(kp, data=all_GR_score, logp=TRUE, , points.cex = 0.4, highlight = sarm1, highlight.col = "orchid")
it it possible to add multiple highlights with different colors? i.e. for multiple genes?
Hi Vic,
That's not possible right now with the kpPlotManhattan function. I think it could be implemented fairly easily passing an array of colors and using one color per highlight region, recycling them if necessary. Do you think an API like this would work for you?
As a work around you can remove the highlighted data points from your all_GR_score GRanges and issue separate calls to kpPlotManhattan for the main (non-highlighted color) and for each highlight color. Does it make sense?