added Conformation.dissimilarity method, unfinished
parent
26eed4d9f2
commit
dc6da63651
|
|
@ -43,6 +43,18 @@ 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__":
|
||||
|
|
|
|||
Loading…
Reference in New Issue