yfukasawa / LongQC

LongQC is a tool for the data quality control of the PacBio and ONT long reads.
MIT License
148 stars 18 forks source link

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

Open anshulbudhraja opened 2 years ago

anshulbudhraja commented 2 years ago

I am trying to simply check the quality for a nanopore fastq file (containing ~ 45 million reads).

Code:

##activating the conda env with req. dependencies
source /home/miniconda3/bin/activate longQCenv
##
python /home/softwares/LongQC/longQC.py sampleqc -x ont-ligation -o /home/scratch/scRNA/scRNA_fastq/QC_zipped/longQCres /home/scratch/scRNA/scRNA_fastq/zipped/PAM60637_pass.fastq.gz

But the only plot that was successfully produced was "fig_longQC_sampleqc_gcfrac.png". This was followed with an error, post which all processes stopped:

Error:


Traceback (most recent call last):
  File "/home/softwares/LongQC/longQC.py", line 956, in <module>
    main(args)
  File "/home/softwares/LongQC/longQC.py", line 62, in main
    args.handler(args)
  File "/home/softwares/LongQC/longQC.py", line 479, in command_sample
    lm.plot_qscore_dist(df_mask, 4, 2, interval=n50/2, fp=fig_path_rq)
  File "/home/softwares/LongQC/lq_mask.py", line 63, in plot_qscore_dist
    plt.savefig(fp, bbox_inches="tight")
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/pyplot.py", line 942, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/figure.py", line 3272, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2308, in print_figure
    renderer = _get_renderer(
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 1559, in _get_renderer
    print_method(io.BytesIO())
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2204, in <lambda>
    print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 410, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 520, in print_png
    self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 466, in _print_pil
    FigureCanvasAgg.draw(self)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 402, in draw
    self.renderer = self.get_renderer()
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 384, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 419, in get_renderer
    self.renderer = RendererAgg(w, h, self.figure.dpi)
  File "/home/miniconda3/envs/longQCenv/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 87, in __init__
    self._renderer = _RendererAgg(int(width), int(height), dpi)
ValueError: Image size of 121200x480 pixels is too large. It must be less than 2^16 in each direction.