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
156 stars 91 forks source link

Highlighting SNP using position instead of SNP characters. #40

Closed NikoLichi closed 8 years ago

NikoLichi commented 8 years ago

Hi there!

I have been using qqman and especially a manhattan function modified to plot the chromosomes names in the xlabel. And I has been working good for plotting all the SNPs across chromosomes.

Right now I'm in the task to highlight the SNPs. My data set is variable and depends on the species comparison that I selected. Then, SNPs has not always the same number or character defining them. Although, It is possible to identify them by POSITION, and this is registered in the column POS.

I am aware that "highlight" works with the SNP character used. I already converted SNP into characters. However, there are not any SNP highlighted. I guess, It is because the string used is not from the column SNP but POS.

Therefore, my question is: There is any option to select POS column instead of SNP for the highlighting?

Thanks. NiKo

stephenturner commented 8 years ago

Not currently. You could select SNPs based on position and pass that as a character vector. If you can post some example data as a github gist I may be able to help.

NikoLichi commented 8 years ago

Oh! I see!

I did as you suggested and now is working.

Thanks Stephen!