added Conformation.dissimilarity method, unfinished
parent
26eed4d9f2
commit
dc6da63651
|
|
@ -43,7 +43,19 @@ class Conformations:
|
||||||
|
|
||||||
return squareform(pdist(dfnum, metric ='jaccard'))
|
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 __name__ == "__main__":
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue