zephyris / discoba_alphafold Goto Github PK
View Code? Open in Web Editor NEWTools to help improve AlphaFold2 predictions of proteins in Discoba, including Trypanosoma and Leishmania
License: MIT License
Tools to help improve AlphaFold2 predictions of proteins in Discoba, including Trypanosoma and Leishmania
License: MIT License
Hi,
I think this a known problem that has been reported before. I am trying to run the DiscobaAlphaFold2HMMERv2.ipynb Colab notebook using the example query sequence, but I get the following error message:
Step 2 - Install dependencies:
installing colabfold...
ERROR: Cannot install colabfold[alphafold-minus-jax]==1.5.5 and tensorflow-cpu==2.11.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible
CalledProcessError Traceback (most recent call last)
in <cell line: 1>()
----> 1 get_ipython().run_cell_magic('bash', '-s $use_amber $use_templates $python_version', '\nset -e\n\nUSE_AMBER=$1\nUSE_TEMPLATES=$2\nPYTHON_VERSION=$3\n\nif [ ! -f COLABFOLD_READY ]; then\n echo "installing colabfold..."\n # install dependencies\n # We have to use "--no-warn-conflicts" because colab already has a lot preinstalled with requirements different to ours\n pip install -q --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold" "tensorflow-cpu==2.11.0"\n pip uninstall -yq jax jaxlib\n pip install -q "jax[cuda]==0.3.25" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n\n\n # for debugging\n ln -s /usr/local/lib/python3./dist-packages/colabfold colabfold\n ln -s /usr/local/lib/python3./dist-packages/alphafold alphafold\n touch COLABFOLD_READY\nfi\n\n# setup conda\nif [ ${USE_AMBER} == "True" ] || [ ${USE_TEMPLATES} == "True" ]; then\n if [ ! -f CONDA_READY ]; then\n echo "installing conda..."\n wget -qnc https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n bash Miniconda3-latest-Linux-x86_64.sh -bfp /usr/local 2>&1 1>/dev/null\n rm Miniconda3-latest-Linux-x86_64.sh\n conda config --set auto_update_conda false\n touch CONDA_READY\n fi\nfi\n# setup template search\nif [ ${USE_TEMPLATES} == "True" ] && [ ! -f HH_READY ]; then\n ...
4 frames
/usr/local/lib/python3.10/dist-packages/google/colab/_shell.py in run_cell_magic(self, magic_name, line, cell)
332 if line and not cell:
333 cell = ' '
--> 334 return super().run_cell_magic(magic_name, line, cell)
335
336
/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2471 with self.builtin_trap:
2472 args = (magic_arg_s, cell)
-> 2473 result = fn(*args, **kwargs)
2474 return result
2475
/usr/local/lib/python3.10/dist-packages/IPython/core/magics/script.py in named_script_magic(line, cell)
140 else:
141 line = script
--> 142 return self.shebang(line, cell)
143
144 # write a basic docstring:
in shebang(self, line, cell)
/usr/local/lib/python3.10/dist-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/usr/local/lib/python3.10/dist-packages/IPython/core/magics/script.py in shebang(self, line, cell)
243 sys.stderr.flush()
244 if args.raise_error and p.returncode!=0:
--> 245 raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
246
247 def _run_script(self, p, cell, to_close):
CalledProcessError: Command 'b'\nset -e\n\nUSE_AMBER=$1\nUSE_TEMPLATES=$2\nPYTHON_VERSION=$3\n\nif [ ! -f COLABFOLD_READY ]; then\n echo "installing colabfold..."\n # install dependencies\n # We have to use "--no-warn-conflicts" because colab already has a lot preinstalled with requirements different to ours\n pip install -q --no-warn-conflicts "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold" "tensorflow-cpu==2.11.0"\n pip uninstall -yq jax jaxlib\n pip install -q "jax[cuda]==0.3.25" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n\n\n # for debugging\n ln -s /usr/local/lib/python3./dist-packages/colabfold colabfold\n ln -s /usr/local/lib/python3./dist-packages/alphafold alphafold\n touch COLABFOLD_READY\nfi\n\n# setup conda\nif [ ${USE_AMBER} == "True" ] || [ ${USE_TEMPLATES} == "True" ]; then\n if [ ! -f CONDA_READY ]; then\n echo "installing conda..."\n wget -qnc https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n bash Miniconda3-latest-Linux-x86_64.sh -bfp /usr/local 2>&1 1>/dev/null\n rm Miniconda3-latest-Linux-x86_64.sh\n conda config --set auto_update_conda false\n touch CONDA_READY\n fi\nfi\n# setup template search\nif [ ${USE_TEMPLATES} == "True" ] && [ ! -f HH_READY ]; then\n echo "installing hhsuite..."\n conda install -y -q -c conda-forge -c bioconda kalign2=2.04 hhsuite=3.3.0 python="${PYTHON_VERSION}" 2>&1 1>/dev/null\n touch HH_READY\nfi\n# s...
Importantly, I also tried using this notebook in December 2023 and back then I got a different error:
Step 3 - Generate custom multiple sequence alignment:
FileNotFoundError Traceback (most recent call last)
in <cell line: 106>()
105 f = open(os.path.join(jobname, f"{jobname}.custom.a3m"), "w")
106 if msa_use_discoba:
--> 107 i = open(os.path.join(jobname, f"{jobname}.mms.a3m"), "r")
108 f.write(i.read()+"\n")
109 i.close()
FileNotFoundError: [Errno 2] No such file or directory: โD2VGM6_1c8b6/D2VGM6_1c8b6.mms.a3m'
I am at a loss on how to even try to address these issues, so any help would be greatly appreciated.
Thank you very much for your help and time!
Hi there,
Apologies in advance if this issue hasn't enough detail.
I'm trying to run the example query sequence (A4IBK2) and few hypothetical sequences and I seem to be running up against a consistent Attribute Error in the 8th cell - "Gather input features, predict structure":
"running model_1
UnfilteredStackTrace Traceback (most recent call last)
in
60 model_params=model_params, use_model=use_model,
---> 61 do_relax=use_amber)
28 frames
UnfilteredStackTrace: AttributeError: 'Config' object has no attribute 'jax_experimental_name_stack'
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.
The above exception was the direct cause of the following exception:
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/haiku/_src/module.py in wrapped(self, *args, **kwargs)
419 f = functools.partial(unbound_method, self)
420 f = functools.partial(run_interceptors, f, method_name, self)
--> 421 if jax.config.jax_experimental_name_stack and module_name:
422 local_module_name = module_name.split("/")[-1]
423 f = jax.named_call(f, name=local_module_name)
AttributeError: 'Config' object has no attribute 'jax_experimental_name_stack'
From looking at Stack Overflow the issue seems to be with the version of JAX. I have tried the following recommendation but this does not seem to fix the issue:
"jax.tree_multimap was deprecated in JAX version 0.3.5, and removed in JAX version 0.3.16.
You can either change the source to use jax.tree_map as a drop-in replacement for jax.tree_multimap, or install an older version of JAX, e.g.:
!pip install "jax<=0.3.16" "jaxlib<=0.3.16"
And then be sure to restart your runtime to pick up the new version."
I had tried updating the code to install version 0.3.16 of JAX but to no avail. I can't seem to find where in the code to swap the jax.tree_multimap for jax.tree_map, unfortunately. Any help or advice would be greatly appreciated. Thanks in advance, Felix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.