Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: operands could not be broadcast together #287

Open
Stigimoloch opened this issue Mar 13, 2024 · 4 comments
Open

ValueError: operands could not be broadcast together #287

Stigimoloch opened this issue Mar 13, 2024 · 4 comments
Milestone

Comments

@Stigimoloch
Copy link

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
Copy link
Collaborator

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
Copy link
Collaborator

Hi,

Just checking if it works now?

Yours
Dingquan

@dvbrown
Copy link

dvbrown commented Apr 9, 2024

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
Copy link
Collaborator

dingquanyu commented Apr 9, 2024

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

@jkosinski jkosinski added this to the Version2 milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants