コード例 #1
0
 def compute_distances(self, sequences):
     for seq1, val1 in sequences.items():
         for seq2, val2 in sequences.items():
             if ("".join([seq1, seq2]) not in self.distances):
                 self.distances["".join([seq1, seq2])] = \
                     hamming_distance(val1, val2)
                 self.distances["".join([seq2, seq1])] = \
                     self.distances["".join([seq1, seq2])]
コード例 #2
0
 def compute_distances(self, sequences):
     for seq1 in sequences.keys():
         for seq2 in sequences.keys():
             if ("".join([seq1, seq2]) not in self.distances):
                 self.distances["".join([seq1, seq2])] = hamming_distance(
                     sequences[seq1], sequences[seq2])
                 self.distances["".join(
                     [seq2, seq1])] = self.distances["".join([seq1, seq2])]
コード例 #3
0
ファイル: exhaustive.py プロジェクト: smirarab/sepp
 def compute_distances(self, sequences):
     for seq1, val1 in sequences.items():
         for seq2, val2 in sequences.items():
             if ("".join([seq1, seq2]) not in self.distances):
                 self.distances["".join([seq1, seq2])] = \
                     hamming_distance(val1, val2)
                 self.distances["".join([seq2, seq1])] = \
                     self.distances["".join([seq1, seq2])]
コード例 #4
0
ファイル: exhaustive.py プロジェクト: smirarab/sepp
 def compute_distances(self, sequences):
     for seq1 in sequences.keys():
         for seq2 in sequences.keys():
             if "".join([seq1, seq2]) not in self.distances:
                 self.distances["".join([seq1, seq2])] = hamming_distance(sequences[seq1], sequences[seq2])
                 self.distances["".join([seq2, seq1])] = self.distances["".join([seq1, seq2])]