Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update src/bin/semantic_similarity_infer.py
Browse files
    	
        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 | 
            -
                    " | 
| 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 == " | 
| 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 == " | 
| 81 | 
             
                        protein1 = proteinListNew[i]
         | 
| 82 | 
             
                        protein2 = proteinListNew[j]
         | 
| 83 | 
             
                        real = human_proteinSimilarityMatrix.loc[protein1, protein2]
         | 
|  | |
| 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]
         | 
