KennthShang / PhaBOX

Local version of the virus identification and analysis web server (tool set)
https://phage.ee.cityu.edu.hk/
Academic Free License v3.0
36 stars 4 forks source link

Error in build_pc_matrices Function: ValueError Due to Mismatched Index Arrays #21

Closed F4NG666 closed 2 weeks ago

F4NG666 commented 2 months ago

hi, I am encountering an issue with the PhaBOX software while running the analysis. Specifically, I receive a ValueError when the software attempts to build the sparse matrix in the build_pc_matrices function. The error message is: ValueError: mismatching number of index arrays for shape; got 0, expected 2

Building the cluster and profiles (this may take some time...) Using MCL to generate PCs. Saving files Traceback (most recent call last): File "/data/ckzhu/ckzhu1/PhaBOX/main.py", line 460, in matrix, singletons = build_pc_matrices(profiles, contigs_csv_df, pcs_csv_df) File "/data/ckzhu/ckzhu1/PhaBOX/scripts/ulity.py", line 309, in build_pc_matrices matrix = sparse.coo_matrix(([1]len(profiles), (zip(profiles.values))), shape=(len(contigs), len(pcs)), File "/data/ckzhu/ckzhu1/miniconda3/envs/phabox/lib/python3.9/site-packages/scipy/sparse/_coo.py", line 99, in init self._check() File "/data/ckzhu/ckzhu1/miniconda3/envs/phabox/lib/python3.9/site-packages/scipy/sparse/_coo.py", line 188, in _check raise ValueError('mismatching number of index arrays for shape; ' ValueError: mismatching number of index arrays for shape; got 0, expected 2

Could you please assist in resolving this issue? Thank you for your support! Fang

KennthShang commented 2 months ago

Hi there,

Please check whether your scipy=1.7.1 using conda list

If not, please run conda install scipy=1.7.1

Best, Jiayu

KennthShang commented 2 weeks ago

Hi there,

The PhaBOX is upgraded to a 2.0 version with more powerful usage. Besides, it can handle all kinds of viruses now. Feel free to check!

Best, Jiayu