RSvan / SPEACH_AF

MIT License
14 stars 6 forks source link

Using SPEACH-AF with AF2 instead of ColabFold #3

Open JasonWang2002 opened 5 months ago

JasonWang2002 commented 5 months ago

Hello,

The .ipynb script works correctly for .a3m files generated from ColabFold; however, when I try to use the generated files in AlphaFold2 version 2.3, I get the following error message:

Traceback (most recent call last): File "/path/to/alphafold232/alphafold/run_alphafold.py", line 468, in app.run(main) File "/path/to/alphafold232/miniconda3/envs/af232/lib/python3.8/site-packages/absl/app.py", line 312, in run _run_main(main, args) File "/path/to/alphafold232/miniconda3/envs/af232/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main sys.exit(main(argv)) File "/path/to/alphafold232/alphafold/run_alphafold.py", line 443, in main predict_structure( File "/path/to/alphafold232/alphafold/run_alphafold.py", line 196, in predict_structure feature_dict = data_pipeline.process( File "/path/to/alphafold232/alphafold/alphafold/data/pipeline.py", line 232, in process msa_features = make_msa_features((uniref90_msa, bfd_msa, mgnify_msa)) File "/path/to/alphafold232/alphafold/alphafold/data/pipeline.py", line 79, in make_msa_features features['deletion_matrix_int'] = np.array(deletion_matrix, dtype=np.int32) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (12654,) + inhomogeneous part.

This error does not arise when using the _00.a3m file generated that is a copy of the input .a3m, but does for the other output .a3m files which are edited. Could you help us understand the cause of this issue?   Thanks, Jason

iamysk commented 2 months ago

I've got the same issue. Only protein_00.a3 (original MSA) seems to work. And I see this error both with AF2 and colabfold.

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5064,) + inhomogeneous part

This is for a revision, so it'd be great if a patch or solution could be provided.

Thanks