Closed Cr7-L closed 2 months ago
It looks like you updated networkx in 3.0 and we support the networkx version is 2.5. We hope you can install the program with the environment.yaml. this will reduces the problem of version incompatibilities between packages. About this problem, You can try to reinstall the environment once again. I hope this is helpful to your question
All the best wenguang
Description of bug
Hello,
I used PhaGNC2 to classify the my viral contigs, but an error occurred during its operation. The log file was very long and there were several errors in it as follows:
python run_Speed_up.py --contig phagcn_test/mixed_example.fasta --len 2000 . . . . ---------------------------Generating Knowledge graph--------------------------- run_KnowledgeGraph.py:681: FutureWarning: adjacency_matrix will return a scipy.sparse array instead of a matrix in Networkx 3.0. adj = nx.adjacency_matrix(G) Traceback (most recent call last): File "run_KnowledgeGraph.py", line 681, in
adj = nx.adjacency_matrix(G)
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/networkx/linalg/graphmatrix.py", line 173, in adjacency_matrix
return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, dtype=dtype, weight=weight)
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/networkx/convert_matrix.py", line 1021, in to_scipy_sparse_matrix
A = to_scipy_sparse_array(
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/networkx/convert_matrix.py", line 923, in to_scipy_sparse_array
A = sp.sparse.coo_array((d, (r, c)), shape=(nlen, nlen), dtype=dtype)
AttributeError: module 'scipy.sparse' has no attribute 'coo_array'
Knowledge Graph Error for file contig_0
Traceback (most recent call last):
File "run_Speed_up.py", line 158, in
df = pd.concat(df_list)
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/pandas/core/reshape/concat.py", line 368, in concat
op = _Concatenator(
File "/home/ubuntu/anaconda3/envs/phagcn/lib/python3.8/site-packages/pandas/core/reshape/concat.py", line 425, in init
raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
Strangely, several time ago, i can run the same code successfully.