Merge branch 'release_19.09' into release_20.01

This commit is contained in:
mvdbeek
2019-12-27 19:29:14 +01:00
+4 -4
View File
@@ -1119,8 +1119,8 @@ class Cool(H5):
if super(Cool, self).sniff(filename):
keys = ['chroms', 'bins', 'pixels', 'indexes']
with h5py.File(filename, 'r') as handle:
fmt = handle.attrs.get('format')
url = handle.attrs.get('format-url')
fmt = util.unicodify(handle.attrs.get('format'))
url = util.unicodify(handle.attrs.get('format-url'))
if fmt == MAGIC or url == URL:
if not all(name in handle.keys() for name in keys):
return False
@@ -1179,8 +1179,8 @@ class MCool(H5):
return False
res0 = list(handle['resolutions'].keys())[0]
keys = ['chroms', 'bins', 'pixels', 'indexes']
fmt = handle['resolutions'][res0].attrs.get('format')
url = handle['resolutions'][res0].attrs.get('format-url')
fmt = util.unicodify(handle['resolutions'][res0].attrs.get('format'))
url = util.unicodify(handle['resolutions'][res0].attrs.get('format-url'))
if fmt == MAGIC or url == URL:
if not all(name in handle['resolutions'][res0].keys() for name in keys):
return False