How to adjust my manhattan plot to look better?
0
1
Entering edit mode
9.7 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

qqman manhattan R • 9.6k views
ADD COMMENT
2
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

It seems that you are plotting by chromosome, instead of chromosome position/rank.

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Thanks, but it shows 'almost' the same result.

ADD REPLY
1
Entering edit mode
ADD REPLY
2
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

It's true only if the SNPs are ordered by chromosomal position in the file.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

Something like that :

​ggplot(dataset, aes(x = CHR, y = P,col=CHR)) + geom_point(position = position_jitter(w = 0.45, h = 0.45))+geom_abline(intercept = 3, slope = 0)
ADD REPLY

Login before adding your answer.

Traffic: 2603 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6