diff --git a/src/projet8.py b/src/projet8.py index 17f06e6..b4c6819 100644 --- a/src/projet8.py +++ b/src/projet8.py @@ -43,7 +43,19 @@ class Conformations: return squareform(pdist(dfnum, metric ='jaccard')) - + def dissimilarity(self, matrix): + """ + Returns a matrix of the distance between all conformations computed + according to a substitution matrix of the protein blocks. + If no substitution matrix is specified, use the matrix from the + PBxplore package. + """ + dissimilarity = np.ndarray((self.df.shape[0],self.df.shape[0])) + if matrix == None: + matrix = pd.read_table("data/PBs_substitution_matrix.dat", + index_col=False, sep ='\t') + matrix.index = matrix.columns + if __name__ == "__main__": if len(sys.argv) != 2: