tariks / peakachu

Genome-wide contact analysis using sklearn
MIT License
57 stars 9 forks source link

numpy error for peakachu pool #20

Open kainblue100 opened 1 year ago

kainblue100 commented 1 year ago

run peakachu pool after a score function, but receive a numpy error: commands:

peakachu score_genome -r 10000 -m CTCF-ChIAPET-peakachu-pretrained.10million.10kb.pkl -p ChIA-PET_mm10_10000.hic.cool -O ChIA-PET_mm10 --minimum-prob 0

peakachu pool -r 10000 -i ChIA-PET_mm10 -t .98 -o ChIA-PET_mm10.loops

error: Traceback (most recent call last): File "/softwares/anaconda3/envs/peakachu/bin/peakachu", line 91, in run() File "/softwares/anaconda3/envs/peakachu/bin/peakachu", line 87, in run args.func(args) File "/softwares/anaconda3/envs/peakachu/lib/python3.10/site-packages/peakachu/call_loops.py", line 14, in main clusters, score_pool = peakacluster.parse_peakachu(args.infile, args.threshold, res) File "/softwares/anaconda3/envs/peakachu/lib/python3.10/site-packages/peakachu/peakacluster.py", line 21, in parse_peakachu tmp = local_clustering(D[c], min_count=3, r=2) File "/softwares/anaconda3/envs/peakachu/lib/python3.10/site-packages/peakachu/peakacluster.py", line 162, in local_clustering _cluster_core(sort_list, r, visited, final_list) File "/softwares/anaconda3/envs/peakachu/lib/python3.10/site-packages/peakachu/peakacluster.py", line 126, in _cluster_core rad = np.int(np.round(max([euclidean(cen,q) for q in Local]))) + r File "/softwares/anaconda3/envs/peakachu/lib/python3.10/site-packages/numpy/init.py", line 305, 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 ideas? Thanks!

XiaoTaoWang commented 1 year ago

Hi, I have just fixed this bug in the latest version of peakachu (https://pypi.org/project/peakachu/2.2.post1/), can you upgrade your peakachu to this version and try again?