diff --git a/orthofinder/scripts/blast_file_processor.py b/orthofinder/scripts/blast_file_processor.py index 6e77c4728afd767c34ff94b1c26071dbf7b040c4..de669e0d93c9557be766ddcb0903b2b84b234ae3 100644 --- a/orthofinder/scripts/blast_file_processor.py +++ b/orthofinder/scripts/blast_file_processor.py @@ -119,7 +119,7 @@ def WriteNormalizedBlastFile(blastDir_list, B, iSpecies, jSpecies, sep = "_", qD iH = 1 iSpeciesOpen = iSpecies jSpeciesOpen = jSpecies - #xSeqID, ySeqID, NormVal = ParseMatrix(B) + #xSeqID, ySeqID, NormVal = ListFromMatrix(B) row = "" for d in blastDir_list: fn = d + "Blast%d_%d.txt" % (iSpeciesOpen, jSpeciesOpen) diff --git a/orthofinder/scripts/matrices.py b/orthofinder/scripts/matrices.py index 11c0bb7b82fccf750ca4fc43b154f22de34f1015..1111fb069280f08f4c66807a58cd0a3984decd6e 100644 --- a/orthofinder/scripts/matrices.py +++ b/orthofinder/scripts/matrices.py @@ -77,7 +77,7 @@ def sparse_max_row(csr_mat): ret[np.diff(csr_mat.indptr) != 0] = np.maximum.reduceat(csr_mat.data,csr_mat.indptr[:-1][np.diff(csr_mat.indptr)>0]) return ret -def ParseMatrix(mat): +def ListsFromMatrix(mat): bdok = mat.todok() SortedMat = sorted(bdok.items()) NormVal=[] @@ -90,4 +90,4 @@ def ParseMatrix(mat): NormVal.append(SortedMat[i][1]) #for i in range(len(Nval)): # print("iSpeciesID_%i\tjSpeciesID_%i ... %f" % (xSeqID[i], ySeqID[i], NormVal[i])) - return xSeqID, ySeqID, NormVal \ No newline at end of file + return xSeqID, ySeqID, NormVal