farhangus / Sniffles2_plot

23 stars 1 forks source link

ValueError: Image size of 87111x5333 pixels is too large. It must be less than 2^16 in each direction. #2

Closed melianello closed 10 months ago

melianello commented 12 months ago

Hello, i tried running sniffles2_plot like this:

python3 sniffles2_plots.py -i alpacas9_Chr30.vcf -o alpacas9chr30_chr30

and I had the following error, how can I fix it?? The rest of the plots were created.

Traceback (most recent call last):
  File "/media/marina/10tcam/Sniffles_plot/vcf_visulaizer.py", line 31, in <module>
    main()
  File "/media/marina/10tcam/Sniffles_plot/vcf_visulaizer.py", line 26, in main
    multi_visulaizer(input_vcf_file, output_path)
  File "/media/marina/10tcam/Sniffles_plot/src/multi_vcf_visualizer.py", line 26, in multi_visulaizer
    Genome_chart_data_generator.samples_sv_numbers()
  File "/media/marina/10tcam/Sniffles_plot/src/functions_variables_multi.py", line 192, in samples_sv_numbers
    plt.savefig(self.output_file("sample_upset.png"), dpi=800, edgecolor="white")
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/pyplot.py", line 1023, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/figure.py", line 3343, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_qtagg.py", line 75, in print_figure
    super().print_figure(*args, **kwargs)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2366, in print_figure
    result = print_method(
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2232, in <lambda>
    print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 509, in print_png
    self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 457, in _print_pil
    FigureCanvasAgg.draw(self)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 394, in draw
    self.renderer = self.get_renderer()
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 384, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 411, in get_renderer
    self.renderer = RendererAgg(w, h, self.figure.dpi)
  File "/home/marina/miniconda3/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 84, in __init__
    self._renderer = _RendererAgg(int(width), int(height), dpi)
ValueError: Image size of 87111x5333 pixels is too large. It must be less than 2^16 in each direction.

Additionally, and maybe not related, I see the following line within the shell output:

Qt: Session management error: None of the authentication protocols specified are supported

Thanks for your assistance!!

farhangus commented 11 months ago

Dear melianello,

Thanks for your email and sorry for the late reply. Your email was missed. Will you please send your vcf to me. So, I can check the errors. And please let me know how many samples do you have in your VCF file.

Best regards,

melianello commented 11 months ago

Dear @farhangus, thank you for your reply! Would you share your e-mail please or contact me at melianello@gmail.com and I will reply with the vcf file. Unfortunately I am not allowed to upload these files publicly, i am sorry about it!

jingydz commented 10 months ago

I have ~5,000 samples. Does this file "sniffles2_plots.py" support drawing?