arpcard / rgi

Resistance Gene Identifier (RGI). Software to predict resistomes from protein or nucleotide data, including metagenomics data, based on homology and SNP models.
Other
319 stars 76 forks source link

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

Closed neelam19051 closed 1 year ago

neelam19051 commented 1 year ago

Hi, i am using rgi model of CARD database to draw a heatmap of presence and absence of gene and it giving following error.

Traceback (most recent call last): File "rgi", line 4, in MainBase() File "/home/bvs/Neelam/rgi/app/MainBase.py", line 82, in init getattr(self, args.command)() File "/home/bvs/Neelam/rgi/app/MainBase.py", line 336, in heatmap self.heatmap_run(args) File "/home/bvs/Neelam/rgi/app/MainBase.py", line 357, in heatmap_run obj.run() File "/home/bvs/Neelam/rgi/app/Heatmap.py", line 836, in run g = sns.heatmap(df, cmap=custom_cmap, cbar=False, norm=norm) #linewidth=0.5 File "/home/bvs/.local/lib/python3.8/site-packages/seaborn/_decorators.py", line 46, in inner_f return f(**kwargs) File "/home/bvs/.local/lib/python3.8/site-packages/seaborn/matrix.py", line 553, in heatmap plotter.plot(ax, cbar_ax, kwargs) File "/home/bvs/.local/lib/python3.8/site-packages/seaborn/matrix.py", line 336, in plot _draw_figure(ax.figure) File "/home/bvs/.local/lib/python3.8/site-packages/seaborn/utils.py", line 95, in _draw_figure fig.canvas.draw() File "/home/bvs/.local/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 431, in draw self.renderer = self.get_renderer(cleared=True) File "/home/bvs/.local/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 447, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File "/home/bvs/.local/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 93, in init self._renderer = _RendererAgg(int(width), int(height), dpi)

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

Thank you

raphenya commented 1 year ago

@ neelam19051 This is a limitation on the current heatmap. Maybe break up samples and try generating the heatmaps? Cheers.