sokrypton / sokrypton/ColabFold
AlphaFold crash
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 2.9k
- Forks
- 747
- PR merge metrics
- No merged PRs in 30d
Description
Introduction
This bug was previously reported here: https://github.com/googlecolab/colabtools/issues/3687
It seems that they recognized the bug, but that you are better suited to solve it.
This is the recommendation that I received:
"--> File an issue over at https://github.com/sokrypton/ColabFold/issues - this is maintained by a 3rd party"
Expected Behavior
Protein structure estimation
Current Behavior
AlphaFold systematically crashes at the step described below
Steps to Reproduce (for bugs)
Please make sure to reproduce the issue after a "Factory Reset" in Colab.
If running locally ypdate you local installation colabfold_batch to the newest version.
Please provide your input if you can share it.
I am using AlphaFold (here: https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/beta/AlphaFold2_advanced.ipynb#scrollTo=bQe3KeyTcv0n) with exactly the same parameters, almost all default parameters, for several months, changing only the protein sequence. For the first time, the program crashes systematically at the step "Run alphafold"
and issues the following error message:
Running model_1_ptm_seed_0: 0%
0/1 [elapsed: 00:32 remaining: ?]
AttributeError Traceback (most recent call last)
in <cell line: 67>()
65 # run alphafold
66 ###########################
---> 67 outs, model_rank = cf_af.run_alphafold(feature_dict, opt, runner, num_models, num_samples, subsample_msa,
68 rank_by=rank_by, show_images=show_images)
47 frames
[... skipping hidden 12 frame]
[... skipping hidden 9 frame]
[... skipping hidden 8 frame]
/content/alphafold/alphafold/model/utils.py in mask_mean(mask, value, axis, drop_mask_channel, eps)
54 elif axis is None:
55 axis = list(range(len(mask_shape)))
---> 56 assert isinstance(axis, collections.Iterable), (
57 'axis needs to be either an iterable, integer or "None"')
58
AttributeError: module 'collections' has no attribute 'Iterable'
The crash is reproducible here: https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/beta/AlphaFold2_advanced.ipynb#scrollTo=bQe3KeyTcv0n
using for example this sequence, although any sequence would do it: YSGTARYHTQMLRVREFIRFHQIPNPLRQRLEEYFQHAWSYTNGIDMNAVLKGFPECLQADICLHLNRSLLQHCKPFRGATKGCLRALAMKFKTTHAPPGDTLVHAGDLLTALYFISRGSIEILRGDVVLAILGKNDIFGEPLNLYARPGKSNGDVRALTYCDLHKIHRDDLLEVLDMYPEFSDHFWSSLEITFNLR
ColabFold Output (for bugs)
Please make sure to also post the complete ColabFold output. You can use gist.github.com for large output.
Reported in the previous section
Context
Providing context helps us come up with a solution and improve our documentation for the future.
Your Environment
Include as many relevant details about the environment you experienced the bug in.
- Git commit used
- If you run it on a local system. Please add the server specifications
- Operating system and version:
I run it on the webpage as explained above.
Other details:
MACOS 11.7.6
the issue is independent from the internet browser: Safari, Firefox and google chrome
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked AlphaFold2_advanced.ipynb notebook after a Colab factory reset and confirm whether the crash still occurs during the “Run alphafold” step. Then inspect alphafold/alphafold/model/utils.py at mask_mean, especially the failing axis check. Done means the supplied sequence completes that step without the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- bioinformatics, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100