KosinskiLab / AlphaPulldown

https://doi.org/10.1093/bioinformatics/btac749
GNU General Public License v3.0
199 stars 46 forks source link

singularity error #344

Closed polya18 closed 3 months ago

polya18 commented 4 months ago

When i run singularity exec, it reported fatal error. singularity exec --no-home --bind /media/lenv/alphaIP_out:/mnt /media/lenv/alphaIP_out/alpha-analysis_jax_0.4.sif run_get_good_pae.sh --output_dir=/mnt --cutoff=10 The error is "alpha-analysis_jax_0.4.sif: image format not recognized" I used conda env for AlphaPulldown and singularity. Would you please help me to figure it out?

dingquanyu commented 4 months ago

Hi,

Sorry but it seems that your download process might be disrupted? Could you check if the size of your sif file is 6.4 GB. Otherwise, could you re-download the image again?

Yours Dingquan

polya18 commented 4 months ago

That make sense. Thank you. It did not have any output and suggested me to increase cutoff number. How large does it accept for common Protein-Protein Interaction?

dingquanyu commented 4 months ago

Glad it helped! Perhaps you could try 100 first just to make every single model of yours pass the cutoff.

polya18 commented 4 months ago

I tried a cutoff of 100, but it still didn't work. It reported "protein.pkl does not have ranking_debug.json. Skipped." Does that matter?

krafie commented 4 months ago

Heya, did you find a fix for this? I am having the same issue. It can't find "hits" even with a cut-off of 100. It also skips as no associated ranking_debug.json is found. Any help is appreciated.

Cheers, K

dingquanyu commented 4 months ago

I tried a cutoff of 100, but it still didn't work. It reported "protein.pkl does not have ranking_debug.json. Skipped." Does that matter?

@polya18 It looks like you have mounted the wrong directory and the programme failed to find any sub directories in which ranking_debug.json and necessary pdb files exist.

dingquanyu commented 4 months ago

Heya, did you find a fix for this? I am having the same issue. It can't find "hits" even with a cut-off of 100. It also skips as no associated ranking_debug.json is found. Any help is appreciated.

Cheers, K

Hi @krafie As the printed statement suggests, the folder does not contain ranking_debug.json and will skip it. A missing ranking_debug.json suggests unfinished or crashed modelling job. Alternatively, you might have mounted a wrong directory.

Yours Dingquan

krafie commented 4 months ago

Heya, did you find a fix for this? I am having the same issue. It can't find "hits" even with a cut-off of 100. It also skips as no associated ranking_debug.json is found. Any help is appreciated. Cheers, K

Hi @krafie As the printed statement suggests, the folder does not contain ranking_debug.json and will skip it. A missing ranking_debug.json suggests unfinished or crashed modelling job. Alternatively, you might have mounted a wrong directory.

Yours Dingquan

Hi Dingquan,

thanks for the quick response. I'll look into it again and hope to figure out where it went wrong.

All the best, Karim

B0r1sD commented 4 months ago

Hi everyone, I would like to second this as I was about to open the same issue.

After successfully running Example 1 (verified with Jupyter notebook visualisation - 3rd step feature 1), I don't have interactions with a high enough PAE score.

Command ran:

singularity exec \
    --no-home \
    --bind /data/projects/s20/bodep/projects/alphaPullDown/testing_APD_module/APD_out2/:/mnt \
    /data/projects/s20/bodep/projects/alphaPullDown/feature2/alpha-analysis_jax_0.4.sif \
    run_get_good_pae.sh \
    --output_dir=/mnt \
    --cutoff=10

Output:

/bin/chmod: changing permissions of '/app/run_get_good_pae.sh': Read-only file system
/bin/chmod: changing permissions of '/app/run_execute_notebook.sh': Read-only file system
/bin/chmod: changing permissions of '/app/run_pi_score.sh': Read-only file system
/bin/chmod: changing permissions of '/app/alpha-analysis/get_good_inter_pae.py': Read-only file system
┌──────────────────────────────────────────────────────────────────────────────┐
│                                 PyRosetta-4                                  │
│              Created in JHU by Sergey Lyskov and PyRosetta Team              │
│              (C) Copyright Rosetta Commons Member Institutions               │
│                                                                              │
│ NOTE: USE OF PyRosetta FOR COMMERCIAL PURPOSES REQUIRE PURCHASE OF A LICENSE │
│         See LICENSE.PyRosetta.md or email license@uw.edu for details         │
└──────────────────────────────────────────────────────────────────────────────┘
PyRosetta-4 2024 [Rosetta PyRosetta4.Release.python39.linux 2024.15+release.d972b59c530a12affcbe0eb4a24eedc3ce7d5060 2024-04-02T17:06:29] retrieved from: http://www.pyrosetta.org
core.init: Checking for fconfig files in pwd and ./rosetta/flags
core.init: Rosetta version: PyRosetta4.Release.python39.linux r377 2024.15+release.d972b59 d972b59c530a12affcbe0eb4a24eedc3ce7d5060 http://www.pyrosetta.org 2024-04-02T17:06:29
core.init: Rosetta extras: []
core.init: command: PyRosetta -ex1 -ex2aro -database /opt/conda/lib/python3.9/site-packages/pyrosetta/database
basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=-1885546141 seed_offset=0 real_seed=-1885546141
basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=-1885546141 RG_type=mt19937
I0531 15:34:52.267342 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P08240
I0531 15:34:52.480646 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P08240 1 out of 21 finished.
I0531 15:34:52.480749 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P23588
I0531 15:34:52.769132 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P23588 2 out of 21 finished.
I0531 15:34:52.769237 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P09132
I0531 15:34:52.915187 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P09132 3 out of 21 finished.
I0531 15:34:52.915297 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P22090
I0531 15:34:53.077189 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P22090 4 out of 21 finished.
I0531 15:34:53.077295 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P46778
I0531 15:34:53.227667 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P46778 5 out of 21 finished.
I0531 15:34:53.227783 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P46781
I0531 15:34:53.381500 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P46781 6 out of 21 finished.
I0531 15:34:53.381603 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P60842
I0531 15:34:53.704556 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P60842 7 out of 21 finished.
I0531 15:34:53.704662 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P61011
I0531 15:34:53.889671 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P61011 8 out of 21 finished.
I0531 15:34:53.889774 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q9NX20
I0531 15:34:54.049450 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q9NX20 9 out of 21 finished.
I0531 15:34:54.049554 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q9Y5M8
I0531 15:34:54.337661 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q9Y5M8 10 out of 21 finished.
I0531 15:34:54.337767 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q92901
I0531 15:34:54.514607 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q92901 11 out of 21 finished.
I0531 15:34:54.514711 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q9H2W6
I0531 15:34:54.678627 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q9H2W6 12 out of 21 finished.
I0531 15:34:54.678733 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q14240
I0531 15:34:54.991782 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q14240 13 out of 21 finished.
I0531 15:34:54.991888 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q7L2H7
I0531 15:34:55.163674 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q7L2H7 14 out of 21 finished.
I0531 15:34:55.163775 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q9UHB9
I0531 15:34:55.374704 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q9UHB9 15 out of 21 finished.
I0531 15:34:55.374807 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P37108
I0531 15:34:55.524543 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P37108 16 out of 21 finished.
I0531 15:34:55.524649 140683457803072 get_good_inter_pae.py:112] now processing pi_score_outputs
W0531 15:34:55.524913 140683457803072 get_good_inter_pae.py:143] pi_score_outputs does not have ranking_debug.json. Skipped.
# Comment: pi_score_outputs is an empty folder, generated by running the same command before
I0531 15:34:55.524955 140683457803072 get_good_inter_pae.py:144] done for pi_score_outputs 17 out of 21 finished.
I0531 15:34:55.524986 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_O76094
I0531 15:34:55.894214 140683457803072 get_good_inter_pae.py:144] done for P78344_and_O76094 18 out of 21 finished.
I0531 15:34:55.894318 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P62945
I0531 15:34:56.024253 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P62945 19 out of 21 finished.
I0531 15:34:56.024360 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_Q9BW92
I0531 15:34:56.337667 140683457803072 get_good_inter_pae.py:144] done for P78344_and_Q9BW92 20 out of 21 finished.
I0531 15:34:56.337790 140683457803072 get_good_inter_pae.py:112] now processing P78344_and_P61247
I0531 15:34:56.625008 140683457803072 get_good_inter_pae.py:144] done for P78344_and_P61247 21 out of 21 finished.
I0531 15:34:56.625131 140683457803072 get_good_inter_pae.py:147] Unfortunately, none of your protein models had at least one PAE on the interface below your cutoff value : 10.0.
 Please consider using a larger cutoff.

I've cranked up the cutoff score to 100, even 10000 (which makes no sense but for testing purposes I neglected both fact and logic) but to no avail. I did not look into this deeper, but I assume from this that example data does not have text book perfect scores as one would expect?

I welcome all additional input! Kind regards

dingquanyu commented 4 months ago

Hi @B0r1sD

Thanks for reporting the issue. Could you check whether you got the predictions_with_good_inter_pae.csv in the end?

Yours Dingquan

B0r1sD commented 4 months ago

Hello @dingquanyu

I did not. I checked both the directory I'm working in, the output directory I mounted, and did a find on my whole system. Only place I didn't check is in the container itself. But as it indicated having no scores below cutoff, I didn't bother. Is that expected behaviour, that the predictions_with_good_inter_pae.csv can still be found even with no hits?

dingquanyu commented 4 months ago

Hello @dingquanyu

I did not. I checked both the directory I'm working in, the output directory I mounted, and did a find on my whole system. Only place I didn't check is in the container itself. But as it indicated having no scores below cutoff, I didn't bother. Is that expected behaviour, that the predictions_with_good_inter_pae.csv can still be found even with no hits?

I see. This file is not supposed to be created in this case. I'm just checking if the unexpected file was somehow created unexpectedly. I will look into this issue.

maxvdb-dev commented 3 months ago

@B0r1sD I had the same issue and I found a fix. In the main function of 'get_good_inter_pae.py' there is a line: if "iptm" in data.keys() and "iptm+ptm" in data.keys(): However, ranking_debug.json files only have a "iptm+ptm" dictionary, so by removing the '"iptm" in data.keys() and' part it worked fine. In my case I was interested in all the outputs not only in the ones with a 'good' PAE. So if you need that aswell, you can also deactivate:

check = examine_inter_pae(

                # pae_mtx, seq_lengths, cutoff=FLAGS.cutoff)

And remove the 'if check' line. It is important though that you rebuild the Apptainer container/image after making changes to the python script as the build uses the static version of the script after it has been build.

dingquanyu commented 3 months ago

@maxvdb-dev thanks a lot for the advice and tips! You could also just turn the and into orin this line. https://github.com/KosinskiLab/AlphaPulldown/blob/29682ab83c8c5aa0e19d54c48b61883730143435/alphapulldown/analysis_pipeline/get_good_inter_pae.py#L127 I will fix this problem later.

dingquanyu commented 3 months ago

Hi @maxvdb-dev and @B0r1sD

I have updated the singularity image in this PR #361 . Could you re-download it from: https://www.embl-hamburg.de/AlphaPulldown/downloads/alpha-analysis_jax_0.4.sif and try again? I have randomly selected 10 from the example pulldown pairs and they finished fine. I believe it should work now. Feel free to reopen this issue if it doesn't work for you.

Yours Dingquan

B0r1sD commented 3 months ago

Hey @dingquanyu I've tried it again with the updated .sif file you linked (file size is 8 kB less so I know it was changed). Unfortunately, it has not changed anything it seems like, as I still don't get output (no CSV) when using the valid output from example 1.

Anything I can provide to make your debugging easier? And on which data did you test it exactly; I only find https://github.com/KosinskiLab/AlphaPulldown/tree/main/test/test_data/P0DPR3_and_P0DPR3 as shared test data which I tried but also does not give a CSV file:

Unfortunately, none of your protein models had at least one PAE on the interface below your cutoff value : 10.0.
dingquanyu commented 3 months ago

Hi @B0r1sD

Sorry I meant the examples from the baits.txt and candidates.txt. Here are the protein pairs I have tested:

P78344;P08240
P78344;Q14240
P78344;P62945
P78344;O76094
P78344;P23588
P78344;P09132
P78344;P22090
P78344;P46778
P78344;P46781
P78344;P60842
P78344;P61011
P78344;Q9NX20
P78344;Q9Y5M8

and here's what I got:

jobs iptm_ptm iptm pDockQ/mpDockQ average_interface_pae average_interface_plddt binding_energy interface Num_intf_residues Polar Hydrophobic Charged contact_pairs sc hb sb int_solv_en int_area pi_score
P78344_and_P60842 0.8073141777145266 0.85734236 0.6216370121365561 7.164437719753811 73.72813370473541 -13852.26395926436 B_C 67 0.239 0.269 0.299 59 0.522 23 32 -9.48 3384.44 1.21
P78344_and_Q14240 0.7565451762167229 0.810629 0.6496131321314101 10.689969138294433 75.9755367231638 -11850.808590485196 B_C 94 0.213 0.287 0.362 108 0.514 35 39 -8.13 3537.5 0.89
P78344_and_P62945 0.6290067873741413 0.671387 0.06515304551943633 17.472288744790212 34.442784810126575 -24469.558976366974 B_C 15 0.333 0.133 0.533 18 0.365 2 19 2.23 1212.56 -0.33
P78344_and_P09132 0.6211262691675556 0.6589203 0.08134475366649119 10.510612529080088 66.92890109890108 -28394.159764210377 B_C 9 0.111 0.556 0.333 6 0.388 7 13 3.48 765.08 -0.49
P78344_and_P22090 0.5515223939913818 0.59033155 0.14460282477765915 20.55140308838386 58.60125000000003 -15654.731419052754 B_C 27 0.296 0.259 0.407 30 0.418 8 11 -0.2 1471.83 -0.87
P78344_and_O76094 0.5169412161606898 0.5467848 0.2130915592329316 23.06159787928253 45.59938144329897 -65640.10889856739 B_C 139 0.309 0.252 0.288 218 0.226 46 11 -31.67 4363.1 0.56
P78344_and_Q9NX20 0.36620426396535577 0.35568807 0.20392021331888244 19.932819245505506 63.48367816091956 -34954.06917864921 B_C 46 0.239 0.217 0.326 69 0.095 15 10 -2.43 1540.74 -0.77
P78344_and_P23588 0.34902449646950484 0.34881938 0.1385904745097395 15.125836796890884 43.50447826086955 -24956.307968167053 B_C 50 0.3 0.4 0.2 51 0.521 9 9 -23.48 2401.89 1.28
P78344_and_P61011 0.33512340677145236 0.32496715 0.3353651779084972 25.146222874294363 60.29734693877547 -23965.434001309848 B_C 85 0.294 0.388 0.118 133 0.194 17 5 -10.47 2421.55 0.57
P78344_and_P08240 0.21724664073114736 0.18381809 0.31321204279729065 28.314014073117495 62.73298113207545 -110237.89718595374 B_C 63 0.222 0.365 0.317 86 0.191 14 9 -6.76 2537.77 -0.49
P78344_and_Q9Y5M8 0.22085763865889452 0.1837084 0.4620402338477464 26.252773164644122 76.23718309859156 -50507.42865413394 B_C 53 0.189 0.377 0.34 78 0.079 17 4 -7.3 1403.33 -0.22

Perhaps you could try again but use a cutoff value of 100? Yours Dingquan

B0r1sD commented 3 months ago

Hi @B0r1sD

Sorry I meant the examples from the baits.txt and candidates.txt. Here are the protein pairs I have tested:

P78344;P08240
P78344;Q14240
P78344;P62945
P78344;O76094
P78344;P23588
P78344;P09132
P78344;P22090
P78344;P46778
P78344;P46781
P78344;P60842
P78344;P61011
P78344;Q9NX20
P78344;Q9Y5M8

and here's what I got: jobs iptm_ptm iptm pDockQ/mpDockQ average_interface_pae average_interface_plddt binding_energy interface Num_intf_residues Polar Hydrophobic Charged contact_pairs sc hb sb int_solv_en int_area pi_score P78344_and_P60842 0.8073141777145266 0.85734236 0.6216370121365561 7.164437719753811 73.72813370473541 -13852.26395926436 B_C 67 0.239 0.269 0.299 59 0.522 23 32 -9.48 3384.44 1.21 P78344_and_Q14240 0.7565451762167229 0.810629 0.6496131321314101 10.689969138294433 75.9755367231638 -11850.808590485196 B_C 94 0.213 0.287 0.362 108 0.514 35 39 -8.13 3537.5 0.89 P78344_and_P62945 0.6290067873741413 0.671387 0.06515304551943633 17.472288744790212 34.442784810126575 -24469.558976366974 B_C 15 0.333 0.133 0.533 18 0.365 2 19 2.23 1212.56 -0.33 P78344_and_P09132 0.6211262691675556 0.6589203 0.08134475366649119 10.510612529080088 66.92890109890108 -28394.159764210377 B_C 9 0.111 0.556 0.333 6 0.388 7 13 3.48 765.08 -0.49 P78344_and_P22090 0.5515223939913818 0.59033155 0.14460282477765915 20.55140308838386 58.60125000000003 -15654.731419052754 B_C 27 0.296 0.259 0.407 30 0.418 8 11 -0.2 1471.83 -0.87 P78344_and_O76094 0.5169412161606898 0.5467848 0.2130915592329316 23.06159787928253 45.59938144329897 -65640.10889856739 B_C 139 0.309 0.252 0.288 218 0.226 46 11 -31.67 4363.1 0.56 P78344_and_Q9NX20 0.36620426396535577 0.35568807 0.20392021331888244 19.932819245505506 63.48367816091956 -34954.06917864921 B_C 46 0.239 0.217 0.326 69 0.095 15 10 -2.43 1540.74 -0.77 P78344_and_P23588 0.34902449646950484 0.34881938 0.1385904745097395 15.125836796890884 43.50447826086955 -24956.307968167053 B_C 50 0.3 0.4 0.2 51 0.521 9 9 -23.48 2401.89 1.28 P78344_and_P61011 0.33512340677145236 0.32496715 0.3353651779084972 25.146222874294363 60.29734693877547 -23965.434001309848 B_C 85 0.294 0.388 0.118 133 0.194 17 5 -10.47 2421.55 0.57 P78344_and_P08240 0.21724664073114736 0.18381809 0.31321204279729065 28.314014073117495 62.73298113207545 -110237.89718595374 B_C 63 0.222 0.365 0.317 86 0.191 14 9 -6.76 2537.77 -0.49 P78344_and_Q9Y5M8 0.22085763865889452 0.1837084 0.4620402338477464 26.252773164644122 76.23718309859156 -50507.42865413394 B_C 53 0.189 0.377 0.34 78 0.079 17 4 -7.3 1403.33 -0.22

Perhaps you could try again but use a cutoff value of 100? Yours Dingquan

Hey @dingquanyu I tried it with that cutoff value, also to no avail. Don't think anything was cached, as I used the new .sif file and ran the command from feature 2 which uses this image directly. For further clarification, I run that command on the output acquired from step 2 (predicting of the structures). In my case (see image and error message from earlier), on APD_out2 which contains the folders with the prediction files. image

Thanks for the help!

dingquanyu commented 3 months ago

@B0r1sD Thanks for the update. Could you show me the full singularity command you have run? I guess you might have mounted a wrong directory. Based on your screenshot, the correct mount is: --bind testing_APD_module/APD_out2:/mnt Maybe you mounted --bind testing_APD_module/APD_out2/P78344_and_O76094:/mnt instead? If so, then the singularity will report no structure has satisfied the cutoff, no matter how high the cutoff is.

Yours Dingquan

B0r1sD commented 3 months ago

@B0r1sD Thanks for the update. Could you show me the full singularity command you have run? I guess you might have mounted a wrong directory. Based on your screenshot, the correct mount is: --bind testing_APD_module/APD_out2:/mnt Maybe you mounted --bind testing_APD_module/APD_out2/P78344_and_O76094:/mnt instead? If so, then the singularity will report no structure has satisfied the cutoff, no matter how high the cutoff is.

Yours Dingquan

No, as seen in my first example from above. I mount the folder which contains the folders. Maybe others from this thread can try it out to see if it works for them? I'll definitely check again next week to be sure. Thanks if possible @polya18 @krafie @maxvdb-dev !

B0r1sD commented 2 months ago

I finally was able to get the predictions_with_good_interpae.csv file thanks to the newest alpha-analysis.sif singularity file (2.0.0 beta v3). However, I applied this on output from APD v1.0.4 so it might not be completely accurate as per the release notes:

If you have created models using the versions prior to the alphapulldown==2.0.0b3, please rerun the run_multimer_jobs.py before using the updated the singularity image. The rerun will be quick as only the result pickles are to be changed.

But some feedback, Singularities' --nv option is now needed in order to use the GPU, otherwise you get the error:

Unable to initialize backend 'cuda': FAILED_PRECONDITION: No visible GPU devices.

Command ran for feature 2:

singularity exec --nv --no-home --bind /path/to/APD_OUT2:/mnt /path/to/alpha-analysis.sif run_get_good_pae.sh --output_dir=/mnt --cutoff=10

Ping @dingquanyu