Cloufield / gwaslab

A Python package for handling and visualizing GWAS summary statistics. https://cloufield.github.io/gwaslab/
GNU General Public License v3.0
118 stars 22 forks source link

arguments from manhattan don't exist in miami function #70

Open igumnov-daniel opened 7 months ago

igumnov-daniel commented 7 months ago

Hi! Thanks for the great package. Really happy to have a full post-GWAS toolkit for Python 👍🏻

I found out that some arguments,e.g. ylabels and jagged and maybe some others that exist in manhattan plot function, are not present in Miami.

gl.plot_miami(
    path1=...,
    path2=...,
    cols1=['CHR', 'POS', 'PVAL'],
    cols2=['CHR', 'POS', 'PVAL'],
    anno="GENENAME", # 
    titles=['A', 'B'],
    titles_pad=[0.15,0.0],
    skip=2,
    cut=20,
    sig_level=5e-9,
    sig_level_lead=5e-9,
    anno_style="tight",
    repel_force=0.01,
    arm_offset=2,
    windowsizekb=500,
    ylabels=[5, 10, 15, 20, 40, 60, 80, 100, 114],
    jagged=True,
)

Fine by me, I'm editing ticks with axes object, but am looking forward to having full argument sync between Miami and Manh functions in the future. Just to make the lift more convenient and smile.

Many thanks for the package again.

Cloufield commented 7 months ago

Hi Daniel,

Thanks a lot for your feedback. The two functions are not using a common framework though similar due to some reasons (so the arguments are not completely the same). But as you suggested, keeping the full argument sync between Miami and Manh would be much better. I will try implementing this soon.

igumnov-daniel commented 7 months ago

Just want to thank you again for the quick response and the work you're doing! 🔥 😎

igumnov-daniel commented 7 months ago

UPDATE. There's a new commit with an extra miami2 function. https://github.com/Cloufield/gwaslab/commit/06561757f4958925d0bd7782e79df09fbfd5a8be Works fine no on my machine :)

pip install gwaslab@git+https://github.com/Cloufield/gwaslab --upgrade --force-reinstall --no-deps 

Maybe, it would be cool to have figax argument for Miami2 plot too...If it will not ruin any logic and possible architecture stuff...

Cloufield commented 7 months ago

Hi, Thanks for your feedback. Sure, I will add figax for miami2. I just reimplemented miami plot integrating mqqplot function, and it is still under development. I need to clean up the mess in the function (some arguments may not work yet). And the original miami plot will be replaced with the new one when finished.