Spaces:
Sleeping
Sleeping
Update src/bin/PROBE.py
Browse files- src/bin/PROBE.py +6 -6
src/bin/PROBE.py
CHANGED
|
@@ -17,7 +17,7 @@ def load_representation(multi_col_representation_vector_file_path):
|
|
| 17 |
|
| 18 |
def run_probe(benchmarks, representation_name, representation_file_human, representation_file_affinity, similarity_tasks=["Sparse","200","500"], function_prediction_aspect="All_Aspects", function_prediction_dataset="All_Data_Sets", family_prediction_dataset=["nc","uc50","uc30","mm15"], detailed_output=False):
|
| 19 |
print("\n\nPROBE (Protein RepresentatiOn Benchmark) run is started...\n\n")
|
| 20 |
-
|
| 21 |
|
| 22 |
if any(item in ['similarity', 'function', 'family', 'all'] for item in benchmarks):
|
| 23 |
print("\nRepresentation vectors are loading...\n")
|
|
@@ -31,7 +31,7 @@ def run_probe(benchmarks, representation_name, representation_file_human, repres
|
|
| 31 |
ssi.similarity_tasks = similarity_tasks
|
| 32 |
ssi.detailed_output = detailed_output
|
| 33 |
similarity_result = ssi.calculate_all_correlations()
|
| 34 |
-
|
| 35 |
|
| 36 |
if "function" in benchmarks:
|
| 37 |
print("\n\nOntology-based protein function prediction benchmark is running...\n")
|
|
@@ -41,24 +41,24 @@ def run_probe(benchmarks, representation_name, representation_file_human, repres
|
|
| 41 |
fp.representation_name = representation_name
|
| 42 |
fp.detailed_output = detailed_output
|
| 43 |
function_results = fp.pred_output()
|
| 44 |
-
|
| 45 |
|
| 46 |
if "family" in benchmarks:
|
| 47 |
print("\n\nDrug target protein family classification benchmark is running...\n")
|
| 48 |
tfc.representation_path = representation_file_human
|
| 49 |
tfc.representation_name = representation_name
|
| 50 |
tfc.detailed_output = detailed_output
|
| 51 |
-
|
| 52 |
for dataset in family_prediction_dataset:
|
| 53 |
family_result = tfc.score_protein_rep(dataset)
|
| 54 |
-
|
| 55 |
|
| 56 |
if "affinity" in benchmarks:
|
| 57 |
print("\n\nProtein-protein binding affinity estimation benchmark is running...\n")
|
| 58 |
bae.skempi_vectors_path = representation_file_affinity
|
| 59 |
bae.representation_name = representation_name
|
| 60 |
affinity_result = bae.predict_affinities_and_report_results()
|
| 61 |
-
|
| 62 |
|
| 63 |
|
| 64 |
print("\n\nPROBE (Protein RepresentatiOn Benchmark) run is finished...\n")
|
|
|
|
| 17 |
|
| 18 |
def run_probe(benchmarks, representation_name, representation_file_human, representation_file_affinity, similarity_tasks=["Sparse","200","500"], function_prediction_aspect="All_Aspects", function_prediction_dataset="All_Data_Sets", family_prediction_dataset=["nc","uc50","uc30","mm15"], detailed_output=False):
|
| 19 |
print("\n\nPROBE (Protein RepresentatiOn Benchmark) run is started...\n\n")
|
| 20 |
+
results = {}
|
| 21 |
|
| 22 |
if any(item in ['similarity', 'function', 'family', 'all'] for item in benchmarks):
|
| 23 |
print("\nRepresentation vectors are loading...\n")
|
|
|
|
| 31 |
ssi.similarity_tasks = similarity_tasks
|
| 32 |
ssi.detailed_output = detailed_output
|
| 33 |
similarity_result = ssi.calculate_all_correlations()
|
| 34 |
+
results['similarity'] = similarity_result
|
| 35 |
|
| 36 |
if "function" in benchmarks:
|
| 37 |
print("\n\nOntology-based protein function prediction benchmark is running...\n")
|
|
|
|
| 41 |
fp.representation_name = representation_name
|
| 42 |
fp.detailed_output = detailed_output
|
| 43 |
function_results = fp.pred_output()
|
| 44 |
+
results['function'] = function_results
|
| 45 |
|
| 46 |
if "family" in benchmarks:
|
| 47 |
print("\n\nDrug target protein family classification benchmark is running...\n")
|
| 48 |
tfc.representation_path = representation_file_human
|
| 49 |
tfc.representation_name = representation_name
|
| 50 |
tfc.detailed_output = detailed_output
|
| 51 |
+
results['family'] = {}
|
| 52 |
for dataset in family_prediction_dataset:
|
| 53 |
family_result = tfc.score_protein_rep(dataset)
|
| 54 |
+
results['family']['dataset'] = family_result
|
| 55 |
|
| 56 |
if "affinity" in benchmarks:
|
| 57 |
print("\n\nProtein-protein binding affinity estimation benchmark is running...\n")
|
| 58 |
bae.skempi_vectors_path = representation_file_affinity
|
| 59 |
bae.representation_name = representation_name
|
| 60 |
affinity_result = bae.predict_affinities_and_report_results()
|
| 61 |
+
results['affinity'] = affinity_result
|
| 62 |
|
| 63 |
|
| 64 |
print("\n\nPROBE (Protein RepresentatiOn Benchmark) run is finished...\n")
|