Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index error when running alpha-analysis.sif (solved in updated version of the singularity image. Please download again) #158

Closed
aham41 opened this issue Jul 27, 2023 · 6 comments

Comments

@aham41
Copy link

aham41 commented Jul 27, 2023

Hi, thanks for wonderful software that runs smoothly on our clusters and can simulate large amounts of interactions quickly. This is what I'm doing, and I am very interested in proper evaluation of the simulations through mean interface-PAE and pDockQ parameters. I saw in your example sheet the inclusion of the singularity file 'alpha-analysis.sif'. When running it, I get an index error like this:

I0727 09:59:41.868614 139799888663744 get_good_inter_pae.py:111] now processing SANT_dom_and_sp_A6H8Y1_BDP1_HUMAN_Transcription_factor_TFIIIB_component_B''_homolog_OS_Homo_sapiens_OX_9606_GN_BDP1_PE_1_SV_3
2023-07-27 09:59:43.272972: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-27 09:59:43.720279: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-27 09:59:43.753281: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
I0727 09:59:44.940740 139799888663744 xla_bridge.py:333] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker: 
2023-07-27 09:59:44.943518: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-27 09:59:44.943562: W external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:263] failed call to cuInit: UNKNOWN ERROR (303)
I0727 09:59:44.945541 139799888663744 xla_bridge.py:333] Unable to initialize backend 'cuda': FAILED_PRECONDITION: No visible GPU devices.
I0727 09:59:44.945811 139799888663744 xla_bridge.py:333] Unable to initialize backend 'rocm': NOT_FOUND: Could not find registered platform with name: "rocm". Available platform names are: Host Interpreter CUDA
I0727 09:59:44.946258 139799888663744 xla_bridge.py:333] Unable to initialize backend 'tpu': module 'jaxlib.xla_extension' has no attribute 'get_tpu_client'
W0727 09:59:44.946407 139799888663744 xla_bridge.py:340] No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
Traceback (most recent call last):
  File "/app/alpha-analysis/get_good_inter_pae.py", line 150, in <module>
    app.run(main)
  File "/opt/conda/lib/python3.9/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/opt/conda/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/app/alpha-analysis/get_good_inter_pae.py", line 126, in main
    mpDockq_score = obtain_mpdockq(os.path.join(FLAGS.output_dir,job))
  File "/app/alpha-analysis/get_good_inter_pae.py", line 43, in obtain_mpdockq
    mpDockq_or_pdockq = calc_pdockq(chain_coords,plddt_per_chain,t=8)
  File "/app/alpha-analysis/calculate_mpdockq.py", line 193, in calc_pdockq
    avg_if_plddt = np.average(np.concatenate([plddt1[np.unique(contacts[:,0])], plddt2[np.unique(contacts[:,1])]]))
IndexError: index 663 is out of bounds for axis 0 with size 166

The index-error number is different for each protein and does not correspond to amino acid length. Perhaps anyone have experienced similar issues?

Thanks!

@dingquanyu
Copy link
Collaborator

Hi @aham41

Thank you for your interest in our package and the report. I will look into this problem and get back to you later.

Yours
Dingquan

@dingquanyu
Copy link
Collaborator

Hi @aham41

Thank you again for reporting the issue. This should be solved now if you download the latest version of the singularity image here. It's the same download link as in the manual. Please let us know if the updated version works for you.

Yours
Dingquan

@dingquanyu dingquanyu pinned this issue Jul 31, 2023
@dingquanyu dingquanyu changed the title Index error when running alpha-analysis.sif Index error when running alpha-analysis.sif (solved in updated version of the singularity image. Please download again) Jul 31, 2023
@dingquanyu
Copy link
Collaborator

Dear users,

If you downloaded the singularity image before July 31st 2023 and have encountered the same issue, please download the newer version of the image here. I'm really sorry for this error.

Yours
Dingquan

@aham41
Copy link
Author

aham41 commented Jul 31, 2023

Thank you so much, @dingquanyu, for looking into this issue. Your new .sif appears to have resolved the indexerror and does also seem to run and recognize my output from alphapulldown. After some time, I get a new error, specified below. The log output is much longer than before and now ends with KeyError: 'chains'. There does not seem to be any .csv output in any of my folders or subfolders - any idea?

I0731 15:40:27.997601 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_O00257
2023-07-31 15:40:29.685571: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-31 15:40:30.191058: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-31 15:40:30.228608: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
I0731 15:40:31.840776 140439605523648 xla_bridge.py:333] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker: 
2023-07-31 15:40:31.844029: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /software/lib64::/.singularity.d/libs
2023-07-31 15:40:31.844096: W external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:263] failed call to cuInit: UNKNOWN ERROR (303)
I0731 15:40:31.846421 140439605523648 xla_bridge.py:333] Unable to initialize backend 'cuda': FAILED_PRECONDITION: No visible GPU devices.
I0731 15:40:31.846760 140439605523648 xla_bridge.py:333] Unable to initialize backend 'rocm': NOT_FOUND: Could not find registered platform with name: "rocm". Available platform names are: Host CUDA Interpreter
I0731 15:40:31.847428 140439605523648 xla_bridge.py:333] Unable to initialize backend 'tpu': module 'jaxlib.xla_extension' has no attribute 'get_tpu_client'
W0731 15:40:31.847666 140439605523648 xla_bridge.py:340] No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
I0731 15:40:32.524582 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_O00257 1 out of 8 finished.
I0731 15:40:32.524880 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_A8MV65
I0731 15:40:32.862844 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_A8MV65 2 out of 8 finished.
I0731 15:40:32.863065 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_A6H8Y1
I0731 15:40:41.468980 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_A6H8Y1 3 out of 8 finished.
I0731 15:40:41.469524 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_O00258
I0731 15:40:41.688738 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_O00258 4 out of 8 finished.
I0731 15:40:41.688964 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_O00327
I0731 15:40:42.455925 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_O00327 5 out of 8 finished.
I0731 15:40:42.456578 140439605523648 get_good_inter_pae.py:112] now processing pi_score_outputs
I0731 15:40:42.457089 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_O00268
I0731 15:40:44.245056 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_O00268 6 out of 8 finished.
I0731 15:40:44.245481 140439605523648 get_good_inter_pae.py:112] now processing SANT_dom_and_sp_A6NEQ2
I0731 15:40:44.700783 140439605523648 get_good_inter_pae.py:133] done for SANT_dom_and_sp_A6NEQ2 7 out of 8 finished.
mkdir: cannot create directory ‘/mnt/pi_score_outputs’: File exists
I0731 15:40:44.738240 140439605523648 get_good_inter_pae.py:66] pi_score output for SANT_dom_and_sp_A8MV65 will be stored at /mnt/pi_score_outputs/SANT_dom_and_sp_A8MV65

 ... session 'name' Created
 ... structure read and understood
 ... structural equivalence analysed
 ... molecular surfaces analysed
 ... 1 potential contacts identified, now processing:
     |
 ... total 1 interfaces calculated
 ... assembly analysis: not performed as no crystal data were found.
 ... results written

 +++ session 'name' erased

/software/pi_score/utils.py:305: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.
  topredict_1 = sc.transform(topredict_1)
Checking local paths
*****Selecting model for training*****
*****Setting output directory for results*****
*****Setting input for assessment*****
*****Iterating over each structure to assess*****
*****Making results subdirectory specific to each structure in output directory*****
/mnt/pi_score_outputs/SANT_dom_and_sp_A8MV65/ranked_0
*****Doing PDB, ranked_0.pdb  *****
*****Calculating interface*****
*****Calculating contacts*****
*****Iterating over interfaces in structure*****
*****Calculating interface features*****
*****Calculating shape complementarity*****
Writing sc script ['C', 'B']
ranked_0_clean.pdb_C_B_sc_infle.sh OUTFLE for SC
*****Calculating pisa *****
*****Writing CSV file with features *****
*****Calculating PI-score*****
I0731 15:40:55.604880 140439605523648 get_good_inter_pae.py:66] pi_score output for SANT_dom_and_sp_A6H8Y1 will be stored at /mnt/pi_score_outputs/SANT_dom_and_sp_A6H8Y1
 SC:  mds: too many atoms

 ... session 'name' Created
 ... structure read and understood
 ... structural equivalence analysed
 ... molecular surfaces analysed
 ... 1 potential contacts identified, now processing:
     |
 ... total 1 interfaces calculated
 ... assembly analysis: not performed as no crystal data were found.
 ... results written

 +++ session 'name' erased

Checking local paths
*****Selecting model for training*****
*****Setting output directory for results*****
*****Setting input for assessment*****
*****Iterating over each structure to assess*****
*****Making results subdirectory specific to each structure in output directory*****
/mnt/pi_score_outputs/SANT_dom_and_sp_A6H8Y1/ranked_0
*****Doing PDB, ranked_0.pdb  *****
*****Calculating interface*****
*****Calculating contacts*****
*****Iterating over interfaces in structure*****
*****Calculating interface features*****
*****Calculating shape complementarity*****
Writing sc script ['C', 'B']
ranked_0_clean.pdb_C_B_sc_infle.sh OUTFLE for SC
*****Calculating pisa *****
*****Writing CSV file with features *****
*****Calculating PI-score*****
All features could not be calculated successfully for atleast one of the interfaces!
Exiting
I0731 15:41:07.321153 140439605523648 get_good_inter_pae.py:66] pi_score output for SANT_dom_and_sp_O00258 will be stored at /mnt/pi_score_outputs/SANT_dom_and_sp_O00258

 ... session 'name' Created
 ... structure read and understood
 ... structural equivalence analysed
 ... molecular surfaces analysed
 ... 1 potential contacts identified, now processing:
     |
 ... total 1 interfaces calculated
 ... assembly analysis: not performed as no crystal data were found.
 ... results written

 +++ session 'name' erased

/software/pi_score/utils.py:305: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.
  topredict_1 = sc.transform(topredict_1)
Checking local paths
*****Selecting model for training*****
*****Setting output directory for results*****
*****Setting input for assessment*****
*****Iterating over each structure to assess*****
*****Making results subdirectory specific to each structure in output directory*****
/mnt/pi_score_outputs/SANT_dom_and_sp_O00258/ranked_0
*****Doing PDB, ranked_0.pdb  *****
*****Calculating interface*****
*****Calculating contacts*****
*****Iterating over interfaces in structure*****
*****Calculating interface features*****
*****Calculating shape complementarity*****
Writing sc script ['C', 'B']
ranked_0_clean.pdb_C_B_sc_infle.sh OUTFLE for SC
*****Calculating pisa *****
*****Writing CSV file with features *****
*****Calculating PI-score*****
I0731 15:41:14.954941 140439605523648 get_good_inter_pae.py:66] pi_score output for SANT_dom_and_sp_O00327 will be stored at /mnt/pi_score_outputs/SANT_dom_and_sp_O00327

 ... session 'name' Created
 ... structure read and understood
 ... structural equivalence analysed
 ... molecular surfaces analysed
 ... 1 potential contacts identified, now processing:
     |
 ... total 1 interfaces calculated
 ... assembly analysis: not performed as no crystal data were found.
 ... results written

 +++ session 'name' erased

/software/pi_score/utils.py:305: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.
  topredict_1 = sc.transform(topredict_1)
Checking local paths
*****Selecting model for training*****
*****Setting output directory for results*****
*****Setting input for assessment*****
*****Iterating over each structure to assess*****
*****Making results subdirectory specific to each structure in output directory*****
/mnt/pi_score_outputs/SANT_dom_and_sp_O00327/ranked_0
*****Doing PDB, ranked_0.pdb  *****
*****Calculating interface*****
*****Calculating contacts*****
*****Iterating over interfaces in structure*****
*****Calculating interface features*****
*****Calculating shape complementarity*****
Writing sc script ['C', 'B']
ranked_0_clean.pdb_C_B_sc_infle.sh OUTFLE for SC
*****Calculating pisa *****
*****Writing CSV file with features *****
*****Calculating PI-score*****
I0731 15:41:27.693117 140439605523648 get_good_inter_pae.py:66] pi_score output for SANT_dom_and_sp_A6NEQ2 will be stored at /mnt/pi_score_outputs/SANT_dom_and_sp_A6NEQ2
Checking local paths
*****Selecting model for training*****
*****Setting output directory for results*****
*****Setting input for assessment*****
*****Iterating over each structure to assess*****
*****Making results subdirectory specific to each structure in output directory*****
/mnt/pi_score_outputs/SANT_dom_and_sp_A6NEQ2/ranked_0
*****Doing PDB, ranked_0.pdb  *****
*****Calculating interface*****
*****Calculating contacts*****
*****Iterating over interfaces in structure*****
*****Calculating interface features*****
*****Calculating shape complementarity*****
Writing sc script ['C', 'B']
ranked_0_clean.pdb_C_B_sc_infle.sh OUTFLE for SC
Traceback (most recent call last):
  File "/software/pi_score/run_piscore_wc.py", line 242, in <module>
    main()
  File "/software/pi_score/run_piscore_wc.py", line 190, in main
    parse_sc_output('tmp_sc.out')
  File "/software/pi_score/sc_utils.py", line 43, in parse_sc_output
    with open(outfle,'r') as out:
IOError: [Errno 116] Stale file handle: 'tmp_sc.out'
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3621, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'chains'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/alpha-analysis/get_good_inter_pae.py", line 151, in <module>
    app.run(main)
  File "/opt/conda/lib/python3.9/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/opt/conda/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/app/alpha-analysis/get_good_inter_pae.py", line 140, in main
    pi_score_df = run_and_summarise_pi_score(FLAGS.output_dir,good_jobs,FLAGS.surface_thres)
  File "/app/alpha-analysis/get_good_inter_pae.py", line 92, in run_and_summarise_pi_score
    pi_score['interface'] = pi_score['chains']
  File "/opt/conda/lib/python3.9/site-packages/pandas/core/frame.py", line 3505, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/opt/conda/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
    raise KeyError(key) from err
KeyError: 'chains'

Again, thanks a lot!
Best regards

@dingquanyu
Copy link
Collaborator

Hi,

It looks like All features could not be calculated successfully for atleast one of the interfaces! appeared in SANT_dom_and_sp_A6H8Y1. Could you try moving this directory somewhere else and rerun again?

@aham41
Copy link
Author

aham41 commented Jul 31, 2023

Yes, it works, fantastic!

Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants