akdemirlab/HiCPlotter

error while running command from testRun.sh

Closed this issue · 4 comments

Hello,

I'm having some issues running the arc plotting command. I've tried it with my own files, then tried it with the files in the HiCPlotter/data folder and I get the same error in both cases.

Here's the command from testRun.sh that fails:

python HiCPlotter.py -f data/HiC/Mouse/mES.chr3 -n mES -chr chr3 -o Bhlhe22 -r 40000 -s 400 -e 475 -a data/HiC/Mouse/mESC_SMC_ChIPPet.bed -al SMC -hist data/HiC/Mouse/GSM747534_chr3.bedGraph,data/HiC/Mouse/wgEncodeLicrHistoneEsb4H3k27me3ME0C57bl6StdSig.chr3.bedGraph -hl CTCF,H3K27me3 -pi 0 -ptr 0 -t data/HiC/Mouse/mm9_Polycomb_domains.bed -tl Polycomb -tc 00CCFF -ac B4B4B4 -fh 0

This is the error I'm getting:
File "HiCPlotter.py", line 2045, in
HiCplotter(**args)
File "HiCPlotter.py", line 1203, in HiCplotter
pts = get_ellipse_coords(a=rad, b=1.0, x=center, k=1./8)
File "HiCPlotter.py", line 413, in get_ellipse_coords
pts = np.zeros((360*k+1, 2))
TypeError: 'float' object cannot be interpreted as an index

Can you please look into it?

Thanks,

Alina

Hi,

Thanks for using HiCPlotter! Do you mind checking what is the version of your python/matplotlib?
(http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script)

The same command is working well on my computer.

Kadir

I'm running Python 2.7.11 and matplotlib 2.0.0. I just realized that in the manual it says matplotlib 1.31 and 1.4.3 have been tested successfully. Perhaps, my version of matplotlib is too new.

can you try changing line 413 with below and try again:

pts = np.zeros((int(360*k+1), 2))

Looks like the fix worked! Thank you.

Alina