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
227 stars 70 forks source link

Unable to create group error introduced by line 297 of chicViewpoint.py #828

Open jianhong opened 1 year ago

jianhong commented 1 year ago

if mcool file is provided, os.path.basename(matrix) will return the resolution value but not the mcool file name as you expected.

The command: chicViewpoint -t 2 -m KD5000.mcool::resolutions/5000 WT5000.mcool::resolutions/5000 --averageContactBin 5 --range 1000000 1000000 -rp merged_peak.bed -bmf background_model.txt --outFileName interactions.hdf5 --fixateRange 500000

The error message: File " conda/env-e72329cd681164d947765ea93de18fe4/lib/python3.10/site-packages/hicexplorer/chicViewpoint.py", line 297, in main matrixGroup = interactionFileH5Object.create_group(os.path.basename(matrix).split('.')[0]) File "conda/env-e72329cd681164d947765ea93de18fe4/lib/python3.10/site-packages/h5py/_hl/group.py", line 66, in create_group gid = h5g.create(self.id, name, lcpl=lcpl, gcpl=gcpl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5g.pyx", line 166, in h5py.h5g.create ValueError: Unable to create group (name already exists)