ValueError: attempt to get argmax of an empty sequence
Expected Behavior
trying to get produced relaxed models of tcr-pmhc complexes running on the terminal (prior to the update it worked)
Current Behavior
In the fasta file contains the sequences of mhc:peptide:tcr-alpha:linker:tcr-beta (in that respective order separated by ':') In the script, the only thing I changed is the max template date to 2018-04-30 instead of 2100-01-01 as that is my cutoff as AlphaFold is trained on protein chains in the PDB released before 2018-04-30.
Steps to Reproduce (for bugs)
/piercehome/cheungm/colabfold_batch/batch.py --amber --templates --num-recycle 3 --use-gpu-relax /piercehome/cheungm/FASTA_linker/Class_1/6l9l_linker.fasta /piercehome/cheungm/colabfold_batch/output_new/
ColabFold Output (for bugs)
2022-07-14 01:52:35,852 Running colabfold 1.3.0 (d9adee4372a543fc3ecd104476f5da476dc85a3a) 2022-07-14 01:52:37,498 --max-msa can not be used in combination with AlphaFold2-multimer (--max-msa ignored) WARNING: You are welcome to use the default MSA server, however keep in mind that it's a limited shared resource only capable of processing a few thousand MSAs per day. Please submit jobs only from a single IP address. We reserve the right to limit access to the server case-by-case when usage exceeds fair use.
If you require more MSAs:
-
You can precompute all MSAs with
colabfold_searchor -
You can host your own API and pass it to
--host-url2022-07-14 01:52:43,639 Found 8 citations for tools or databases 2022-07-14 01:52:46,400 Query 1/1: 6l9l (length 415) 2022-07-14 01:52:47,026 Sleeping for 10s. Reason: PENDING
2022-07-14 01:52:57,617 Sleeping for 5s. Reason: RUNNING
2022-07-14 01:53:03,198 Sleeping for 5s. Reason: RUNNING
2022-07-14 01:53:08,802 Sleeping for 6s. Reason: RUNNING
2022-07-14 01:53:15,389 Sleeping for 10s. Reason: RUNNING
2022-07-14 01:53:25,988 Sleeping for 7s. Reason: RUNNING
2022-07-14 01:53:33,596 Sleeping for 9s. Reason: RUNNING
2022-07-14 01:53:43,226 Sleeping for 5s. Reason: RUNNING
2022-07-14 01:53:48,835 Sleeping for 10s. Reason: RUNNING
2022-07-14 01:53:59,435 Sleeping for 6s. Reason: RUNNING
COMPLETE: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 750/750 [elapsed: 01:21 remaining: 00:00] 2022-07-14 01:54:30,835 Sequence 0 found templates: ['3nfn_A', '1k5n_A', '1lk2_A', '6eny_F', '1s7q_A', '1s7v_D', '6at5_A', '1tmc_A', '3e3q_Y', '4nhu_E', '4ms8_A', '2qrs_A', '2qrt_A', '4nhu_E', '6at5_A', '6eny_F', '1s7v_D', '4nhu_E'] 2022-07-14 01:54:30,836 Sequence 1 found no templates 2022-07-14 01:54:39,089 Sequence 2 found templates: ['5yax_A', '5yax_B', '6at6_A', '5fcs_L', '3wlw_D', '5wca_L', '3n9g_L', '5fcs_L', '4iml_B', '4iml_L', '5yax_A', '5yax_B', '5t93_A', '3wlw_D', '5wca_L', '3n9g_L', '4iml_B', '4iml_L', '6at6_A'] 2022-07-14 01:54:39,413 Sequence 3 found templates: [] 2022-07-14 01:54:51,460 Sequence 4 found templates: ['3e3q_F', '2apt_B', '3tf7_C', '3tf7_K', '2p1y_A', '1bwm_A', '2bnu_B', '4p46_B', '4p23_B', '2apx_A', '2p1y_A', '4ww1_B', '5e9d_E', '3tf7_C', '3tf7_K', '3r8b_D', '4h1l_H', '1bwm_A', '4p23_B', '4p46_B'] COMPLETE: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 750/750 [elapsed: 00:01 remaining: 00:00] 2022-07-14 01:54:53,595 Could not generate input features 6l9l: attempt to get argmax of an empty sequence Traceback (most recent call last): File "/piercehome/cheungm/colabfold_batch/batch.py", line 1353, in run model_type, File "/piercehome/cheungm/colabfold_batch/batch.py", line 1039, in generate_input_feature input_feature = process_multimer_features(features_for_chain) File "/piercehome/cheungm/colabfold_batch/batch.py", line 886, in process_multimer_features chain_features, chain_id File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/alphafold/data/pipeline_multimer.py", line 88, in convert_monomer_features feature = np.argmax(feature, axis=-1).astype(np.int32) File "<array_function internals>", line 6, in argmax File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 1195, in argmax return _wrapfunc(a, 'argmax', axis=axis, out=out) File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc return bound(*args, **kwds) ValueError: attempt to get argmax of an empty sequence
Context
originally i got the same error in the now closed regarding the release date error (https://github.com/sokrypton/ColabFold/issues/267), however, after reinstalling colabfold on my cluster, leads to this new error which im unable to bypass.
Your Environment
prior to running i use a different cluster (that has more gpu's), module load gcc/cuda, and conda activate colabfold_conda
thank you in advance!
Can you share the sequence? Especially the linker sequence, since that seems to be causing something weird in the following line:
2022-07-14 01:54:39,413 Sequence 3 found templates: []
We updated the databases yesterday and are still ironing out some remaining issues.
The latest commit should fix your issue
my 6l9l_linker.fasta contains:
6l9l GPHSMRYYETATSRRGLGEPRYTSVGYVDDKEFVRFDSDAENPRYEPQVPWMEQEGPEYWERITQIAKGQEQWFRVNLRTLLGYYNQSAGGTHTLQRMYGCDVGSDGRLLRGYEQFAYDGCDYIALNEDLRTWTAADMAAQITRRKWEQAGAAEYYRAYLEGECVEWLHRYLKNG:SPSYAYHQF:KTTQPDSMESTEGETVHLPCSHATISGNEYIYWYRQVPLQGPEYVTHGLQQNTTNSMAFLAIASDRKSSTLILTHVSLRDAAVYHCILQGTGSKLSFGKGAKLTVS:GSADDAKKDAAKKDGKS:VTQSPRNKVTVTGGNVTLSCRQTNSHNYMYWYRQDTGHGLRLIHYSYGAGNLQIGDVPDGYKATRTTQEDFFLLLELASPSQTSLYFCASSDGDYEQYFGPGTRLTVL
unfortunately i still get the same error when I run it
I just attempted to remove the linker sequence and I still obtain the same error:
2022-07-14 08:38:26,497 Running colabfold 1.3.0 (d9adee4372a543fc3ecd104476f5da476dc85a3a) 2022-07-14 08:38:27,440 --max-msa can not be used in combination with AlphaFold2-multimer (--max-msa ignored) WARNING: You are welcome to use the default MSA server, however keep in mind that it's a limited shared resource only capable of processing a few thousand MSAs per day. Please submit jobs only from a single IP address. We reserve the right to limit access to the server case-by-case when usage exceeds fair use.
If you require more MSAs:
-
You can precompute all MSAs with
colabfold_searchor -
You can host your own API and pass it to
--host-url2022-07-14 08:38:30,609 Found 8 citations for tools or databases 2022-07-14 08:38:33,258 Query 1/1: 6l9l (length 398) 2022-07-14 08:38:40,995 Sequence 0 found templates: ['3nfn_A', '1k5n_A', '1lk2_A', '6eny_F', '1s7q_A', '1s7v_D', '6at5_A', '1tmc_A', '3e3q_Y', '4nhu_E', '4ms8_A', '2qrs_A', '2qrt_A', '4nhu_E', '6at5_A', '6eny_F', '1s7v_D', '4nhu_E'] 2022-07-14 08:38:41,004 Sequence 1 found no templates 2022-07-14 08:38:49,246 Sequence 2 found templates: ['5yax_A', '5yax_B', '6at6_A', '5fcs_L', '3wlw_D', '5wca_L', '3n9g_L', '5fcs_L', '4iml_B', '4iml_L', '5yax_A', '5yax_B', '5t93_A', '3wlw_D', '5wca_L', '3n9g_L', '4iml_B', '4iml_L', '6at6_A'] 2022-07-14 08:38:49,566 Sequence 3 found templates: [] 2022-07-14 08:38:50,595 Could not generate input features 6l9l: attempt to get argmax of an empty sequence Traceback (most recent call last): File "/piercehome/cheungm/colabfold_batch/batch.py", line 1353, in run model_type, File "/piercehome/cheungm/colabfold_batch/batch.py", line 1039, in generate_input_feature input_feature = process_multimer_features(features_for_chain) File "/piercehome/cheungm/colabfold_batch/batch.py", line 886, in process_multimer_features chain_features, chain_id File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/alphafold/data/pipeline_multimer.py", line 88, in convert_monomer_features feature = np.argmax(feature, axis=-1).astype(np.int32) File "<array_function internals>", line 6, in argmax File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 1195, in argmax return _wrapfunc(a, 'argmax', axis=axis, out=out) File "/piercehome/cheungm/colabfold_batch/colabfold-conda/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc return bound(*args, **kwds) ValueError: attempt to get argmax of an empty sequence 2022-07-14 08:38:50,596 Done
Can you update to the latest git version? That once includes the fix for your query.
just reinstalled it and it worked, thanks so much!