stephenturner / qqman

An R package for creating Q-Q and manhattan plots from GWAS results
http://cran.r-project.org/web/packages/qqman/
GNU General Public License v3.0
154 stars 92 forks source link

using multiple colours to highlight SNPs #37

Closed EllaBowles closed 8 years ago

EllaBowles commented 8 years ago

Hello,

I'm wondering how to use "highlight" with multiple different colours, 28 in total, over 6 different Manhattan plots. From what I see, it looks like the only way to use multiple highlight options is to use the old 0.0.0 release. Is this the case? In there, I see only green and magenta as options --do I need to change the source code to accommodate the full range of colours in R? And, if I do use the 0.0.0 release, do you have a user manual?

I just had a thought, can I use things from base R in conjunction with the package, maybe "points"?

With thanks, Ella

stephenturner commented 8 years ago

Unfortunately 0.0.0 doesn't have much documentation other than what's in the comments. And the current version doesn't support this. You'll have to mod the source to get this to work. If I were doing this, I'd make the highlight argument take a named list, where each element in the list is a char vector of rs numbers to highlight, and the names of this list correspond to a second (new) argument, a list with the same names as the first, where the second list is a vector of colors in which to highlight the SNP vectors in the first list.