mlbendall / telescope

Quantification of transposable element expression using RNA-seq
MIT License
63 stars 16 forks source link

error message #50

Open hkoo87 opened 1 year ago

hkoo87 commented 1 year ago

Hello,

I was able to install telescope and wanted to run telescope test and got below error message:

(from print_summary in model.py:537) Traceback (most recent call last): File "/Users/opt/miniconda2/envs/telescope/bin/telescope", line 8, in sys.exit(main()) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/main.py", line 95, in main args.func(args) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/telescope_assign.py", line 247, in run ts_model = TelescopeLikelihood(ts.raw_scores, opts) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/utils/model.py", line 597, in init self.Y = (self.Q.count(1) > 1).astype(np.int) File "/Users/opt/miniconda2/envs/telescope/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'?

Any help will be appreciated.

TLyan-ze commented 11 months ago

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 . You can replace "np.int" with “int"

rodrigoduarte88 commented 7 months ago

I did not understand which file had to have this modification, but after a while I found "np.int" in "/users/userX/miniconda3/envs/telescope_env/lib/python3.10/site-packages/telescope/utils/model.py", so I modified that to "int", as suggested. This has made my version of telescope (1.0.3, from bioconda) work.