drveera / ggman

R package to create manhattan plots using ggplot
30 stars 12 forks source link

option to control expand factor for x-axis #13

Open jpuritz opened 5 years ago

jpuritz commented 5 years ago

With the x-axis calculation and plotting internal to the function. It would be useful to be able to pass an expand factor to control spacing of data relative to the plot window.

drveera commented 5 years ago

Hi, Thanks for the suggestion. Could you elaborate it a little more? The x-axis positions are calculated based on the base pair positions. You can either plot them in a continuous fashion at regular intervals by using option: relative.positions=FALSE (which is default) or you can plot them in a fashion relative to their genomic positions (this will not be at regular intervals, since you get gaps at many chromosomes) by using option: relative.positions=TRUE. Please let me know what you meant by 'expand factor'.

jpuritz commented 5 years ago

Thanks for responding! It’s a parameter that’s part of the scale_x_continuous function of ggplot2 https://ggplot2.tidyverse.org/reference/scale_continuous.html, and it allows some padding between the data and the axis. Right now, the points are plotted to the very edge of each axis. It would be great to be able to control this directly. Let me know if that clarifies things, or if I can provide some more information.

Jon Puritz, PhD

Assistant Professor Department of Biological Sciences University of Rhode Island 120 Flagg Road, Kingston, RI 02881 Webpage: MarineEvoEco.com http://marineevoeco.com/

Cell: 401-338-8739 <//401-338-8739> Work: 401-874-9020 <//401-874-9020>

"The most valuable of all talents is that of never using two words when one will do. ” -Thomas Jefferson

On April 30, 2019 at 9:26:50 AM, Veera (notifications@github.com) wrote:

Hi, Thanks for the suggestion. Could you elaborate it a little more? The x-axis positions are calculated based on the base pair positions. You can either plot them in a continuous fashion at regular intervals by using option: relative.positions=FALSE (which is default) or you can plot them in a fashion relative to their genomic positions (this will not be at regular intervals, since you get gaps at many chromosomes) by using option: relative.positions=TRUE. Please let me know what you meant by 'expand factor'.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/drveera/ggman/issues/13#issuecomment-487951528, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE5CR5ANASPUI4CYSMHOZDPTBCJTANCNFSM4G6RSVMA .

g-pacheco commented 2 years ago

Hello,

I am afraid that this great package is no longer maintained, but I agree that this would be a great option to have.

Best regards, George.