Entering edit mode
9.8 years ago
SheelS
▴
40
Hi there,
I use R package 'qqman' to generate a manhattan plot based on my data.
However, the 'BP' (SNP position) value was unknown, I have tried '1 to n' in each chromosome (n is the number of SNP in each chromosome) and all '1' in BP column.
Does anyone know how to work this out? Or even a better approach to deal with this?
Thanks
As you mentioned, this looks like a binning or placement issue. Without going to the qqman manual I would not be able to tell you how to fix it without first seeing your R code.
Can you modify your question to include your R code here?
Here is the link of qqman package but I cannot see any hints related to this issue http://cran.r-project.org/web/packages/qqman/index.html
It seems that you are plotting by chromosome, instead of chromosome position/rank.
Thanks for reply, yes the snp's position are unknown, so I use '1 to n' in each chromosome, how could I work it out? Shortening the interval distance of x-axis?
Reading your question with more attention, I think that the reason is that you are setting the BP column to all "1". You should put the "1 to n" in the BP column. You can use "rank" or "order", or maybe "row.names" to do that. If you post a head() of your dataset, I may be able to help you better.
Thanks, but it shows 'almost' the same result.
check ggplot position_jitter thttp://docs.ggplot2.org/current/position_jitter.html
This will not be good, because it will assign random positions to the SNPs. Even if you don't know the exact SNP position, you want the SNP at the beginning of the chromosome to be before those at the end.
It's true only if the SNPs are ordered by chromosomal position in the file.
Thanks for reply it looks better now.
But do you know how could I achieve something like this? I mean the colour, or even CHR for red and odd CHR for blue. http://previews.figshare.com/1143843/preview_1143843.jpg
And I wish I can adjust the number of x-axis (show every CHR number from 1 to 23 rather than 5 of them)
Do you know how to achieve this? Thanks,
Sorry I cannot reply to you directly because I have reached to the limited post number for new comer within 6hrs.
Something like that :