Coder Social home page Coder Social logo

zephyris / discoba_alphafold Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 250 KB

Tools to help improve AlphaFold2 predictions of proteins in Discoba, including Trypanosoma and Leishmania

License: MIT License

Jupyter Notebook 74.89% Shell 19.11% JavaScript 5.36% Python 0.64%

discoba_alphafold's People

Contributors

zephyris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

2333cc

discoba_alphafold's Issues

Issue installing dependencies

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!

Issue with AttributeError: 'Config' object has no attribute 'jax_experimental_name_stack'

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.