phbradley / TCRdock

python tools for TCR:peptide-MHC modeling and analysis
MIT License
65 stars 9 forks source link

Internal alphafold library issue #6

Open a3609640 opened 1 year ago

a3609640 commented 1 year ago

Hello, I followed the suggested command lines on the git to run TCRdock.

## Step 1: Parse a TCR:peptide-MHC ternary structure PDB file python parse_tcr_pmhc_pdbfile.py --pdbfiles examples/parsing/1qsf.pdb \ --organism human --mhc_class 1 --out_tsvfile output/parse_output.tsv

## Step 2: Set up for AlphaFold modeling a set of TCR:pMHC complexes python setup_for_alphafold.py --targets_tsvfile examples/benchmark/single_target.tsv \ --output_dir test_setup_single

## Step 3: Run AlphaFold modeling python run_prediction.py --targets test_setup_single/targets.tsv \ --outfile_prefix test_run_single --model_names model_2_ptm \ --data_dir /n/shared_db/alphafold/

Unfortunately, I encountered the following error message:

(tcrdock_test_python3.9) [sw34@compute-a-16-162 TCRdock]$ python run_prediction.py --targets test_setup_single/targets.tsv \

--outfile_prefix test_run_single --model_names model_2_ptm \
--data_dir /n/shared_db/alphafold/ 

Traceback (most recent call last): File "/home/sw34/TCRdock/run_prediction.py", line 77, in import predict_utils File "/home/sw34/TCRdock/predict_utils.py", line 14, in import haiku as hk File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/init.py", line 17, in from haiku import data_structures File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/data_structures.py", line 17, in from haiku._src.data_structures import to_immutable_dict File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/_src/data_structures.py", line 30, in from haiku._src import utils File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/_src/utils.py", line 24, in import jax File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/init.py", line 108, in from .experimental.maps import soft_pmap File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/experimental/maps.py", line 25, in from .. import numpy as jnp File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/numpy/init.py", line 16, in from . import fft File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/numpy/fft.py", line 17, in from jax._src.numpy.fft import ( File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/_src/numpy/fft.py", line 19, in from jax import lax File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/lax/init.py", line 330, in from jax._src.lax.fft import ( File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/_src/lax/fft.py", line 144, in xla.backend_specific_translations['cpu'][fft_p] = pocketfft.pocketfft AttributeError: module 'jaxlib.pocketfft' has no attribute 'pocketfft'

This error seems to be a known issue with Alphafold and was fixed in a newer version of Alphafold on August 9, 2022. https://github.com/deepmind/alphafold/issues/523 However, based on the information provided in the changes_to_alphafold.txt file in the TCRdock repository, the snapshot associated with the linked alphafold commit dates back to November 5, 2021.

Would it be feasible to consider updating the internal alphafold library bundled within TCRdock to a more recent version? Thank you very much!

phbradley commented 1 year ago

Hi there,

Thanks for trying the code! Yes, there are some compatibility issues with alphafold and jax. Have you tried using an older version of jax, for example, 0.2.22, and for jaxlib 0.1.72 ? I've added a google colab notebook that shows a working example of installing the software in the colab setting:

https://github.com/phbradley/TCRdock/blob/main/tcrdock_colab_pipeline_v1.ipynb

which uses the versions listed here:

https://github.com/phbradley/TCRdock/blob/main/requirements_colab_python38.txt

I also don't think it would be too hard to use a more recent version of alphafold-- as you note below, the changes we made are very minimal, so you could also try that route.

Take care, Phil


From: Su Wu @.> Sent: Wednesday, August 16, 2023 10:44 AM To: phbradley/TCRdock @.> Cc: Subscribed @.***> Subject: [phbradley/TCRdock] Internal alphafold library issue (Issue #6)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hello, I followed the suggested command lines on the git to run TCRdock.

Step 1: Parse a TCR:peptide-MHC ternary structure PDB file

python parse_tcr_pmhc_pdbfile.py --pdbfiles examples/parsing/1qsf.pdb --organism human --mhc_class 1 --out_tsvfile output/parse_output.tsv

Step 2: Set up for AlphaFold modeling a set of TCR:pMHC complexes

python setup_for_alphafold.py --targets_tsvfile examples/benchmark/single_target.tsv --output_dir test_setup_single

Step 3: Run AlphaFold modeling

python run_prediction.py --targets test_setup_single/targets.tsv --outfile_prefix test_run_single --model_names model_2_ptm --data_dir /n/shared_db/alphafold/

Unfortunately, I encountered the following error message:

(tcrdock_test_python3.9) @.*** TCRdock]$ python run_prediction.py --targets test_setup_single/targets.tsv \

--outfile_prefix test_run_single --model_names model_2_ptm \ --data_dir /n/shared_db/alphafold/

Traceback (most recent call last): File "/home/sw34/TCRdock/run_prediction.py", line 77, in import predict_utils File "/home/sw34/TCRdock/predict_utils.py", line 14, in import haiku as hk File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/init.py", line 17, in from haiku import data_structures File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/data_structures.py", line 17, in from haiku._src.data_structures import to_immutable_dict File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/_src/data_structures.py", line 30, in from haiku._src import utils File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/haiku/_src/utils.py", line 24, in import jax File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/init.py", line 108, in from .experimental.maps import soft_pmap File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/experimental/maps.py", line 25, in from .. import numpy as jnp File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/numpy/init.py", line 16, in from . import fft File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/numpy/fft.py", line 17, in from jax._src.numpy.fft import ( File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/_src/numpy/fft.py", line 19, in from jax import lax File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/lax/init.py", line 330, in from jax._src.lax.fft import ( File "/home/sw34/.conda/envs/tcrdock_test_python3.9/lib/python3.9/site-packages/jax/_src/lax/fft.py", line 144, in xla.backend_specific_translations['cpu'][fft_p] = pocketfft.pocketfft AttributeError: module 'jaxlib.pocketfft' has no attribute 'pocketfft'

This error seems to be a known issue with Alphafold and was fixed in a newer version of Alphafold on August 9, 2022. deepmind/alphafold#523https://urldefense.com/v3/__https://github.com/deepmind/alphafold/issues/523__;!!GuAItXPztq0!g3UuVRjD7cWrbL4LIGz_LpexrHCrZoYi5jc6W8Ubd2MqmfcbtfJs3SRuXhmU2RnlRNNd2KJHIsTh6ZP4ShnAdy-6$ However, based on the information provided in the changes_to_alphafold.txt file in the TCRdock repository, the snapshot associated with the linked alphafold commit dates back to November 5, 2021.

Would it be feasible to consider updating the internal alphafold library bundled within TCRdock to a more recent version? Thank you very much!

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/phbradley/TCRdock/issues/6__;!!GuAItXPztq0!g3UuVRjD7cWrbL4LIGz_LpexrHCrZoYi5jc6W8Ubd2MqmfcbtfJs3SRuXhmU2RnlRNNd2KJHIsTh6ZP4StJlv6Nc$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABBNCHZYTRGNUZHPJENFMLLXVUBJBANCNFSM6AAAAAA3S4EFWM__;!!GuAItXPztq0!g3UuVRjD7cWrbL4LIGz_LpexrHCrZoYi5jc6W8Ubd2MqmfcbtfJs3SRuXhmU2RnlRNNd2KJHIsTh6ZP4Sgb0NT7h$. You are receiving this because you are subscribed to this thread.Message ID: @.***>