nboley / idr

IDR
GNU General Public License v2.0
168 stars 46 forks source link

IDR cannot be launched after install #68

Open callum-b opened 3 months ago

callum-b commented 3 months ago

I followed the tutorial on the front page (there's a mistake btw - cd 2.0.2 should be cd idr-2.0.2) but cannot run idr at all. I did need to use sudo for the python3 setup.py install too.

If I try and run it by just typing idr (which is in /usr/bin), I get

/usr/bin/idr:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').run_script('idr==2.0.2', 'idr')
Traceback (most recent call last):
File "/usr/bin/idr", line 4, in <module>
__import__('pkg_resources').run_script('idr==2.0.2', 'idr')
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3283, in <module>
def _initialize_master_working_set():
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3266, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3295, in _initialize_master_working_set
working_set = _declare_state('object', 'working_set', WorkingSet._build_master())
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 589, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 926, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 787, in resolve
dist = self._resolve_dist(
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 828, in _resolve_dist
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'idr==2.0.2' distribution was not found and is required by the application

If I run the local bin/idr, I get

Traceback (most recent call last):
File "bin/idr", line 7, in <module>
import idr
ModuleNotFoundError: No module named 'idr'

Any clue as to what is causing these errors? Do you need more info on my setup?


EDIT: ran the installation in my mamba environment with python 3.10.14 installed, and it runs (but still gives me the DeprecationWarning). My base OS has python 3.8.10. However, when I run the idr test, I get this error message:

/home/muthur/mambaforge/envs/chipseqpipeline/bin/idr:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').run_script('idr==2.0.2', 'idr')
/home/muthur/mambaforge/envs/chipseqpipeline/bin/idr --samples tests/data/peak1 tests/data/peak2
Traceback (most recent call last):
File "/home/muthur/mambaforge/envs/chipseqpipeline/bin/idr", line 4, in <module>
__import__('pkg_resources').run_script('idr==2.0.2', 'idr')
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/pkg_resources/__init__.py", line 691, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1530, in run_script
exec(code, namespace, namespace)
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/idr-2.0.2-py3.10-linux-x86_64.egg/EGG-INFO/scripts/idr", line 10, in <module>
idr.idr.main()
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/idr-2.0.2-py3.10-linux-x86_64.egg/idr/idr.py", line 739, in main
r1, r2 = build_rank_vectors(merged_peaks)
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/idr-2.0.2-py3.10-linux-x86_64.egg/idr/idr.py", line 263, in build_rank_vectors
return ( numpy.array(rank1, dtype=numpy.int),
File "/home/muthur/mambaforge/envs/chipseqpipeline/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?

Which version of python do I need to run IDR correctly? Is there no way to make it compatible with other versions? (I need python 3.10 to run other tools in my pipeline)