Cloufield / gwaslab

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

how to increase variant size for regional plot #113

Closed ryshi06 closed 3 weeks ago

ryshi06 commented 3 weeks ago

Hi,

Thank you for having this incredible python package. I am a R person but I found this package is fantastic for visualizing the GWAS output.

I was trying to make regional plots with the function plot_mqq, however, I cannot increase the marker size in the plot even after playing around with the marker_size parameter.

Below is the actual command I am using:

zSUVr.plot_mqq(mode="r",
               region=(5,80506888-500000,80506888+500000),
               build="38",
               vcf_path=gl.get_path("1kg_eur_hg38"),
               cbar_fontsize = 15,
               fontsize = 20,
               font_family="Arial",
               anno_fontsize = 20,
               marker_size=(10,20),
               track_fontsize_ratio=1.5,
               track_exon_ratio=1,
               track_text_offset=1.5,
              #title
               title="rs112844257",
              title_fontsize=25)
plt.savefig('zSUVr_rs112844257_regional_plot.png', format='png', dpi=400, bbox_inches='tight')

Can you please help me on this? Thank you!

Best, Ruyu

Cloufield commented 3 weeks ago

Hi, Ruyu

since the dpi is high, you might need to increase the marker size to something like (100,200).

marker_size=(10,20) image

marker_size=(100,200)

image

Best, Yunye

ryshi06 commented 3 weeks ago

Thank you so much for the really quick reply!

I tried with (100,200) but still the point size is small. Should I increase the number more? Also, I am curious which command to change to make the top right corner annotation the same in your example? Thanks!

zSUVr_rs961824652_1_205997770_regional_plot

Cloufield commented 3 weeks ago

I guess probably you are using a previous version. Would you please try the latest version v3.5.0.

pip install gwaslab==3.5.0.

ryshi06 commented 3 weeks ago

Yes, the version I am using now is 3.4.0. I just updated it and the size changes! Thank you for the help.