-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Dear HiCExplorer team,
When I use cooler.fileops.list_coolers to inspect mcool files created by hicConvertFormat, I always received a warning
fileops.py:211: UserWarning: Cooler path / appears to be corrupt
if _is_cooler(grp):
I noticed that mcool files created by hicConvertFormat use "HDF5::Cooler" as its format, so cooler.fileops.list_coolers reports the root group ("/") as a (corrupted) cooler dataset.
mcool files created by cooler.zoomify_cooler have "HDF5::MCOOL" as their format.
steps to reproduce
# create mcool with HiCExplorer::hicConvertFormat
hicConvertFormat -m hic_matrix.h5 -o hic_matrix.mcool --inputFormat h5 --outputFormat mcool --resolutions 20000 40000 70000 120000 500000
# create mcool with cooler
hicConvertFormat -m hic_matrix.h5 -o hic_matrix.cool --inputFormat h5 --outputFormat cool
cooler zoomify hic_matrix.cool -o cooler_matrix.mcool -r 20000,40000,70000,120000,500000
$ hicInfo -m hic_matrix.mcool
KeyError: "No cooler found at: hic_matrix.mcool. Coolers found in ['/', '/resolutions/20000', '/resolutions/40000', '/resolutions/70000', '/resolutions/120000', '/resolutions/500000']. Use '::' to specify a group path"
# note that '/' is listed as a cooler group path
$ hicInfo -m cooler_matrix.mcool
KeyError: "No cooler found at: hic_matrix.mcool. Coolers found in ['/resolutions/20000', '/resolutions/40000', '/resolutions/70000', '/resolutions/120000', '/resolutions/500000']. Use '::' to specify a group path"
import h5py
h5py.File("hic_matrix.mcool").attrs.get("format") # return 'HDF5::Cooler'
h5py.File("cooler_matrix.mcool").attrs.get("format") # return 'HDF5::MCOOL'Metadata
Metadata
Assignees
Labels
No labels