Open torchij opened 2 years ago
Original error was coming from out of date intervaltree module. A new error has surfaced with latest IntervalTree (v 3.1) and hiCExplorer (v3.7.2).
Traceback (most recent call last): File "/usr/local/bin/hicPlotMatrix", line 4, in <module> from hicexplorer.hicPlotMatrix import main File "/usr/local/lib/python3.10/dist-packages/hicexplorer/hicPlotMatrix.py", line 2, in <module> from collections.abc import OrderedDict ImportError: cannot import name 'OrderedDict' from 'collections.abc' (/usr/lib/python3.10/collections/abc.py)
Fix should be to update hicPlotMatrix.py to:
from collections import OrderedDict
Hello,
I am getting the following error which looks similar to the one above:
Traceback (most recent call last): File "/srv/home/sran0007/./HiCExplorer/bin/hicBuildMatrix", line 4, in <module> from hicexplorer.hicBuildMatrix import main File "/srv/home/sran0007/.local/lib/python3.10/site-packages/hicexplorer/hicBuildMatrix.py", line 24, in <module> from intervaltree import IntervalTree, Interval File "/srv/home/sran0007/.local/lib/python3.10/site-packages/intervaltree/__init__.py", line 22, in <module> from .intervaltree import IntervalTree File "/srv/home/sran0007/.local/lib/python3.10/site-packages/intervaltree/intervaltree.py", line 37, in <module> class IntervalTree(collections.MutableSet): AttributeError: module 'collections' has no attribute 'MutableSet'
This is when I'm trying to use hicBuildMatrix
(with python 3.10.4, hicexplorer v2.2.1.1 even when I specify v3.7.2 with installation via conda). Could you please help diagnose this issue?
Thanks, Surabhi
It appears that the current HiCExplorer is not compatible with python 3.10. The issue looks to be related to the 'collections' module import syntax:
Traceback (most recent call last): File "/usr/local/bin/hicPlotMatrix", line 4, in <module> from hicexplorer.hicPlotMatrix import main File "/usr/local/lib/python3.10/dist-packages/hicexplorer/hicPlotMatrix.py", line 6, in <module> from hicmatrix import HiCMatrix File "/usr/local/lib/python3.10/dist-packages/hicmatrix/HiCMatrix.py", line 28, in <module> from intervaltree import IntervalTree, Interval File "/usr/local/lib/python3.10/dist-packages/intervaltree/__init__.py", line 22, in <module> from .intervaltree import IntervalTree File "/usr/local/lib/python3.10/dist-packages/intervaltree/intervaltree.py", line 37, in <module> class IntervalTree(collections.MutableSet): AttributeError: module 'collections' has no attribute 'MutableSet'
A similar issue was discussed here: https://www.elucidatedrones.com/posts/dronekit-python-error-in-python-3-10/