KosinskiLab / AlphaPulldown

https://doi.org/10.1093/bioinformatics/btac749
GNU General Public License v3.0
190 stars 46 forks source link

ValueError: operands could not be broadcast together #287

Closed Stigimoloch closed 4 days ago

Stigimoloch commented 5 months ago

Hi, I have some problems with second step on pulldown protocols. I got this type of error:

Traceback (most recent call last): File "/opt/anaconda3/envs/AlphaPulldown/bin/run_multimer_jobs.py", line 462, in app.run(main) File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/opt/anaconda3/envs/AlphaPulldown/bin/run_multimer_jobs.py", line 433, in main multimers = create_multimer_objects(data, FLAGS.monomer_objects_dir, not FLAGS.no_pair_msa) File "/opt/anaconda3/envs/AlphaPulldown/bin/run_multimer_jobs.py", line 235, in create_multimer_objects multimer = MultimericObject(interactors=interactors,pair_msa=pair_msa, multimeric_mode = FLAGS.multimeric_mode) File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/alphapulldown/objects.py", line 452, in init self.create_all_chain_features() File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/alphapulldown/objects.py", line 583, in create_all_chain_features self.feature_dict = self.pair_and_merge( File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/alphapulldown/objects.py", line 553, in pair_and_merge np_example = feature_processing.process_final(np_example) File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/alphafold/data/feature_processing.py", line 167, in process_final np_example = _make_msa_mask(np_example) File "/opt/anaconda3/envs/AlphaPulldown/lib/python3.10/site-packages/alphafold/data/feature_processing.py", line 191, in _make_msa_mask np_example['msa_mask'] *= seq_mask[None] ValueError: operands could not be broadcast together with shapes (457,448) (1,414) (457,448)

Do You know what going on? and how to solve this problem. Regards, Rafał

dingquanyu commented 5 months ago

Hi Rafal,

Sorry this error occurred I suppose you created feature pickles using mmseqs2? Previous version of mmseqs2 could lead to this error in some cases so I recently pushed a fix to the main branch. Could you pull the changes from the main branch and rerun the feature creation jobs using updated mmseqs2? Detailed discussions can be found in this issue: #233

Hope it helps.

Yours Dingquan

dingquanyu commented 4 months ago

Hi,

Just checking if it works now?

Yours Dingquan

dvbrown commented 4 months ago

Dear Dingquan,

I encountered this same issue installing AlphaPulldown from pip:

python3 -m pip install alphapulldown==1.0.4

Has this latest fix been propagated to the pip manager? Alternatively can I have instructions to build Alphapulldown from the GitHub repo?

Many thanks, Daniel

dingquanyu commented 4 months ago

Hi @dvbrown Sorry the fixed version hasn't been released to pip yet but I have published a pre-release version which has this issue fixed on testpypi. Would you mind trying it here:

pip uninstall alphapulldown
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ alphapulldown==2.0.0b1

I suppose you generated features via mmseqs2? Then I'm afraid you have to rerun it after installing this pre-released version. An official new release will be published to pypi after testing soon this week.

Yours Dingquan

DimaMolod commented 4 days ago

Now released and merged to main. Closing...