2

I am using a modified qqman function to create a Manhattan plot and one of the peaks in my plot is extremely tall, making it almost impossible to see any of the close-to-threshold loci in detail. I would like to make a break in the Y-axis, so that the SNPs with a p-value between 10E-35 and 10E-80 are omitted from the plot. I have looked at the gap.plot() function from the plotrix package, but that doesn't seem to work. I know how to put the actual break mark on the Y-axis with axis.break() from the same package.

Has anyone encountered this problem?

Thanks!

ingridc
  • 21
  • 2

1 Answers1

0

Without code or example data, hard to solve specifically, but here are some pointers.

What you will likely need to do is:

  1. remove points in y range you do not want (assume -log10(P)):

y[y > 30 & y < 80] <- NA

  1. offset remaining y above -log10(P) = 80 by range removed (80-30 = 50):

y[y > 80] <- y[y > 80] - 50

  1. Plot area should be what you want.

  2. Adjust axis labels to reflect new range, e.g.:

axis(2, at=c(0,10,20,30,40,50,60), labels=c(0,10,20,30,80,90,100))

  1. Add break in axis as you have done using axis.break()

I can edit this more once you provide feedback.

Vince
  • 3,325
  • 2
  • 23
  • 41
  • Dear Vince, thank you for your hint here. I have been looking for the same answer, if you can help me how to do this with my code as follows: – Letin Jun 07 '16 at 08:07
  • data <- read.table("data.txt", header = T); # data with columns of SNP, CHR, BP and P; png("manhattan.png"); manhattan(data, suggestiveline=FALSE, genomewideline=-log10(4.38E-06), cex=2, ylim=c(0,300)); dev.off() # I want to put a zig zag break in the y-axis of this plot by skipping some points in between. Can you help me with how do I implement your above indication in this? Thanks a ton! – Letin Jun 07 '16 at 08:14
  • Can you please submit this as another question, with proper formatting. – Vince Jun 07 '16 at 10:56