drveera / ggman

R package to create manhattan plots using ggplot
30 stars 12 forks source link

how to change color palette in the Manhattan plot #5

Open gpcr opened 6 years ago

gpcr commented 6 years ago

how to change color palette in the Manhattan plot

drveera commented 6 years ago

Hi ,

You can override any of the parameters easily. Just add an additional layer of ggplot.

p1 = ggman(toy.gwas)
p1 + scale_color_manual(values=c("blue","green"))

Please note that if you use clump option in ggman, the output is a list rather than a ggplot. The plot object is the first element in the list. So you should do

p1[[1]] + scale_color_manual(values=c("blue","green"))

I will change this thing later. But for now pls do like this.

gpcr commented 6 years ago

Thanks, I was looking for multicolor palette
p1+ scale_color_manual(values=c("blue4", "green", "orange3", "red", "yellow", "brown3", "grey100", "blue" )) did not worked

drveera commented 6 years ago

Unfortunately you cannot use unique colour for each chromosome. At least for now. I will add that option in future update. The grouping for now its only for odd and even numbers.

gpcr commented 6 years ago

Ok, I will look forward to the update BTW nice tool, has great potential to improve

wangfan860 commented 6 years ago

Hi, In the ggmanHighlightGroup part, can I change color palette? If so, how can I do that?

Thank you so much!

gnovikov commented 5 years ago

Hey,

I have the same question as wangfan860. Is there a way to change the colors for highlighting?

Thanks so much for your help!