Skip to content

Commit

Permalink
Fix #431
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaMolod committed Oct 23, 2024
1 parent 1a6c704 commit 8a9cf3b
Show file tree
Hide file tree
Showing 33 changed files with 969 additions and 7 deletions.
3 changes: 2 additions & 1 deletion alphapulldown/folding_backend/alphafold_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ def postprocess(
plot_pae_from_matrix(
seqs=prediction_result['seqs'],
pae_matrix=prediction_result['predicted_aligned_error'],
figure_name=figure_name,ranking=idx
figure_name=figure_name,
ranking=idx
)

# Save ranking_debug.json.
Expand Down
1 change: 1 addition & 0 deletions alphapulldown/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def __init__(self, description, sequence, feature_dict, regions) -> None:
self.regions = regions
self.new_sequence = ""
self.new_feature_dict = dict()
self.monomeric_description = description
self.description = description
self.prepare_new_self_description()

Expand Down
2 changes: 1 addition & 1 deletion alphapulldown/scripts/run_structure_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def pre_modelling_setup(
for feature_dir in flags.features_directory:
# meta.json is named the same way as the pickle file
if isinstance(interactor, ChoppedObject):
description = interactor.description.split('_')[0]
description = interactor.monomeric_description
elif isinstance(interactor, MonomericObject):
description = interactor.description
meta_json = glob.glob(
Expand Down
10 changes: 5 additions & 5 deletions test/check_predict_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def setUp(self) -> None:
raise FileNotFoundError(f"Directory not found: {self.test_modelling_dir}")
self.args = [
sys.executable,
self.script_path,
self.script_path1,
"--mode=custom",
"--num_cycle=1",
"--num_predictions_per_model=1",
Expand Down Expand Up @@ -279,7 +279,7 @@ def testRunWithTemplate(self):
self.assertTrue(os.path.exists(os.path.join(self.test_features_dir, "3L4Q_C.pkl")))
self.args = [
sys.executable,
self.script_path,
self.script_path1,
"--mode=custom",
"--num_cycle=48",
"--num_predictions_per_model=5",
Expand Down Expand Up @@ -316,7 +316,7 @@ def testRun_7(self):
with tempfile.TemporaryDirectory() as tmpdir:
self.args = [
sys.executable,
self.script_path,
self.script_path1,
"--mode=custom",
"--num_cycle=3",
"--num_predictions_per_model=1",
Expand Down Expand Up @@ -371,7 +371,7 @@ def testRun_8(self):
# Firstly test running with padding AND multimeric template modelling
self.args = [
sys.executable,
self.script_path,
self.script_path1,
"--mode=custom",
"--num_cycle=3",
"--num_predictions_per_model=1",
Expand Down Expand Up @@ -399,7 +399,7 @@ def testRun_9(self):
# Then test running with padding WITHOUT multimeric template modelling
self.args = [
sys.executable,
self.script_path,
self.script_path1,
"--mode=custom",
"--num_cycle=3",
"--num_predictions_per_model=1",
Expand Down
944 changes: 944 additions & 0 deletions test/test_data/predictions/ccp4_v9.log

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions test/test_data/predictions/good.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.18181003584226,26.24696552424502,-2791.6307034091355,B_C,128,0.313,0.266,0.203,311,-0.1,54,1,-29.56,3137.7,0.84
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.04758064516131,26.38746819979306,-2791.6307034091355,B_D,121,0.306,0.248,0.215,292,-0.074,45,1,-25.7,2952.73,0.83
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.01209386281587,26.048184313630387,-4145.3558803465485,C_D,121,0.306,0.248,0.215,303,-0.114,51,3,-26.71,2962.97,0.84
TEST_and_A0A075B6L2_1-10_2-5_3-12,0.103099058355066,0.0630861297249794,0.0,No interface residues detected,No interface residues detected,None,B_C,,,,,,,,,,,
TEST_and_TEST,0.061528983957974445,0.05123987793922424,0.02954929206105133,23.81369346733668,32.230952380952374,-2127.2260633214273,B_C,84,0.25,0.274,0.286,132,0.127,22,0,-19.39,2047.56,0.39
Binary file added test/test_data/predictions/pae_plot_ranked_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/test_data/predictions/pae_plot_ranked_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/test_data/predictions/pae_plot_ranked_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions test/test_data/predictions/predictions_with_good_interpae.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.18181003584226,26.24696552424502,-2791.6307034091355,B_C,128,0.313,0.266,0.203,311,-0.1,54,1,-29.56,3137.7,
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.18181003584226,26.24696552424502,-2791.6307034091355,B_C,128,0.313,0.266,0.203,311,-0.1,54,1,-29.56,3137.7,
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.04758064516131,26.38746819979306,-2791.6307034091355,B_D,121,0.306,0.248,0.215,292,-0.074,45,1,-25.7,2952.73,
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.04758064516131,26.38746819979306,-2791.6307034091355,B_D,121,0.306,0.248,0.215,292,-0.074,45,1,-25.7,2952.73,
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.01209386281587,26.048184313630387,-4145.3558803465485,C_D,121,0.306,0.248,0.215,303,-0.114,51,3,-26.71,2962.97,
TEST_and_TEST_and_TEST,0.09161740784114437,0.08377959013960515,1.0412359506547133,22.01209386281587,26.048184313630387,-4145.3558803465485,C_D,121,0.306,0.248,0.215,303,-0.114,51,3,-26.71,2962.97,
TEST_and_A0A075B6L2_1-10_2-5_3-12,0.103099058355066,0.0630861297249794,0.0,No interface residues detected,No interface residues detected,None,B_C,,,,,,,,,,,
TEST_and_TEST,0.061528983957974445,0.05123987793922424,0.02954929206105133,23.81369346733668,32.230952380952374,-2127.2260633214273,B_C,84,0.25,0.274,0.286,132,0.127,22,0,-19.39,2047.56,
TEST_and_TEST,0.061528983957974445,0.05123987793922424,0.02954929206105133,23.81369346733668,32.230952380952374,-2127.2260633214273,B_C,84,0.25,0.274,0.286,132,0.127,22,0,-19.39,2047.56,
Empty file.

0 comments on commit 8a9cf3b

Please sign in to comment.