akdemirlab / HiCPlotter

“When everything is connected to everything else, for better or worse, everything matters.” Bruce Mau
183 stars 78 forks source link

some error when Plot the genome-wide map at 40000kb resolution #33

Open xiaorenwu1111 opened 5 years ago

xiaorenwu1111 commented 5 years ago

Professor, I met some error when I plot the genome-wide map at 40000kb resolution.Could you help me? [@n-1-29 HiCPlotter-0.6.6]$ python HiCPlotter.py -f /data3/users/HiC/Mus_musculus/GSM862720_results/hic_results/matrix/GSM862720/iced/40000/GSM862720_40000_iced.matrix -o GSM862720 -r 40000 -tri 1 -bed /data3/users/HiC/Mus_musculus/GSM862720_results/hic_results/matrix/GSM862720/raw/40000/GSM862720_40000_abs.bed -n hES -wg 1 -chr chrX Plotting now!! Traceback (most recent call last): File "HiCPlotter.py", line 1715, in HiCplotter(args) File "HiCPlotter.py", line 1556, in HiCplotter plt.savefig(output+'-WholeGenome-'+str(resolution/1000)+'K'+extension,dpi=200) File "/data/users//miniconda3/lib/python2.7/site-packages/matplotlib/pyplot.py", line 697, in savefig res = fig.savefig(*args, *kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/figure.py", line 1573, in savefig self.canvas.print_figure(args, kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2252, in print_figure kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 545, in print_png FigureCanvasAgg.draw(self) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw self.figure.draw(self.renderer) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, *kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/figure.py", line 1144, in draw renderer, self, dsu, self.suppressComposite) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, args, kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2426, in draw mimage._draw_list_compositing_images(renderer, self, dsu) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 543, in draw renderer, renderer.get_image_magnification()) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 770, in make_image unsampled=unsampled) File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 373, in _make_image rgba = np.empty((A.shape[0], A.shape[1], 4), dtype=A.dtype) MemoryError

akdemirlab commented 5 years ago

Hi, I think the issue here is that your matrix becomes too big and your computer's memory is not enough for plotting it. Tbh, plotting whole genome data with 40kb resolution will not give you much detail. I would plot whole genome matrix with the 1MB resolution first and then you can try to plot individual chromosomes with a 40kb resolution. I hope this helps...