deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
233 stars 70 forks source link

AttributeError: 'list' object has no attribute 'shape' #49

Closed apaytuvi closed 7 years ago

apaytuvi commented 7 years ago

I am calling this command:

hicPlotMatrix --log1p --dpi 300 -m HepG2_150000.npz -o heatmap150000.png

and I get

Traceback (most recent call last):
  File "/usr/bin/hicPlotMatrix", line 5, in <module>
    pkg_resources.run_script('HiCExplorer==1.3', 'hicPlotMatrix')
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/EGG-INFO/scripts/hicPlotMatrix", line 7, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/hicexplorer/hicPlotMatrix.py", line 374, in main
    ma = HiCMatrix.hiCMatrix(args.matrix)
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/hicexplorer/HiCMatrix.py", line 56, in __init__
    hiCMatrix.load_npz(matrixFile)
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/hicexplorer/HiCMatrix.py", line 148, in load_npz
    assert len(cut_intervals) == matrix.shape[0], \
AttributeError: 'list' object has no attribute 'shape'

matrix is indeed a list after checking if the lower triangle is filled or not.

fidelram commented 7 years ago

seems that matrix is a list and no a csr sparse matrix. The solution to the #50 issue should also solve this problem.

apaytuvi commented 7 years ago

@fidelram solved!