gyigit commited on
Commit
a8fb5e4
·
2 Parent(s): c2d943a 61341f8

Merge branch 'main' of https://huggingface.co/spaces/mgyigit/probe3

Browse files
src/about.py CHANGED
@@ -93,7 +93,7 @@ Submit your own representation models and compare their performance across these
93
 
94
  If you find PROBE useful, please consider citing our work."""
95
 
96
- similarity_tasks_options = ["Sparse", "200", "500"]
97
  function_prediction_aspect_options = ["MF", "BP", "CC", "All_Aspects"]
98
  function_prediction_dataset_options = ["High", "Middle", "Low", "All_Data_Sets"]
99
  family_prediction_dataset_options = ["nc", "uc50", "uc30", "mm15"]
 
93
 
94
  If you find PROBE useful, please consider citing our work."""
95
 
96
+ similarity_tasks_options = ["sparse", "200", "500"]
97
  function_prediction_aspect_options = ["MF", "BP", "CC", "All_Aspects"]
98
  function_prediction_dataset_options = ["High", "Middle", "Low", "All_Data_Sets"]
99
  family_prediction_dataset_options = ["nc", "uc50", "uc30", "mm15"]
src/bin/semantic_similarity_infer.py CHANGED
@@ -52,7 +52,7 @@ def calculateCorrelationforOntology(aspect, matrix_type):
52
  similarityMatrixNameDict = {
53
  "All": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix.csv"),
54
  "500": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_500_proteins.csv"),
55
- "Sparse": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_500_proteins.csv"),
56
  "200": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_200_proteins.csv")
57
  }
58
 
@@ -64,7 +64,7 @@ def calculateCorrelationforOntology(aspect, matrix_type):
64
  for prot in proteinList:
65
  proteinListNew.append(prot)
66
 
67
- if matrix_type == "Sparse":
68
  sparsified_path = os.path.join(script_dir, "../data/auxilary_input/SparsifiedSimilarityCoordinates_" + aspect + "_for_highest_500.npy")
69
  sparsified_similarity_coordinates = np.load(sparsified_path)
70
  protParamList = sparsified_similarity_coordinates
@@ -77,7 +77,7 @@ def calculateCorrelationforOntology(aspect, matrix_type):
77
  for tup in tqdm(protParamList):
78
  i = tup[0]
79
  j = tup[1]
80
- if matrix_type == "Sparse":
81
  protein1 = proteinListNew[i]
82
  protein2 = proteinListNew[j]
83
  real = human_proteinSimilarityMatrix.loc[protein1, protein2]
@@ -113,7 +113,7 @@ def calculate_all_correlations():
113
  corr, p_value = calculateCorrelationforOntology(aspect, similarity_matrix_type)
114
 
115
  corr_key = f"{similarity_matrix_type}_{aspect}_correlation"
116
- p_value_key = f"{similarity_matrix_type}_{aspect}_p_value"
117
 
118
  results[corr_key] = corr
119
  results[p_value_key] = p_value
 
52
  similarityMatrixNameDict = {
53
  "All": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix.csv"),
54
  "500": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_500_proteins.csv"),
55
+ "sparse": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_500_proteins.csv"),
56
  "200": os.path.join(script_dir, "../data/preprocess/human_" + aspect + "_proteinSimilarityMatrix_for_highest_annotated_200_proteins.csv")
57
  }
58
 
 
64
  for prot in proteinList:
65
  proteinListNew.append(prot)
66
 
67
+ if matrix_type == "sparse":
68
  sparsified_path = os.path.join(script_dir, "../data/auxilary_input/SparsifiedSimilarityCoordinates_" + aspect + "_for_highest_500.npy")
69
  sparsified_similarity_coordinates = np.load(sparsified_path)
70
  protParamList = sparsified_similarity_coordinates
 
77
  for tup in tqdm(protParamList):
78
  i = tup[0]
79
  j = tup[1]
80
+ if matrix_type == "sparse":
81
  protein1 = proteinListNew[i]
82
  protein2 = proteinListNew[j]
83
  real = human_proteinSimilarityMatrix.loc[protein1, protein2]
 
113
  corr, p_value = calculateCorrelationforOntology(aspect, similarity_matrix_type)
114
 
115
  corr_key = f"{similarity_matrix_type}_{aspect}_correlation"
116
+ p_value_key = f"{similarity_matrix_type}_{aspect}_pvalue"
117
 
118
  results[corr_key] = corr
119
  results[p_value_key] = p_value