예제 #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])]