Package biana :: Package BianaObjects :: Module CDHIT
[hide private]
[frames] | no frames]

Source Code for Module biana.BianaObjects.CDHIT

 1  # CD HIT related classes 
 2   
3 -class CDHITCluster(object):
4
5 - def __init__(self, representant = None, matches = None):
6 7 self.representant = representant 8 9 if matches is None: 10 self.matches = [] 11 else: 12 self.matches = matches
13
14 - def set_representant(self, representant):
15 self.representant = representant
16
17 - def get_representant(self):
18 return self.representant
19
20 - def add_match(self, match):
21 self.matches.append(match)
22
23 - def get_matches(self):
24 return self.matches
25 26
27 -class CDHITMatch(object):
28
29 - def __init__(self, sequenceID, start_pos, end_pos, repr_start_pos, repr_end_pos, identity):
30 31 self.sequenceID = sequenceID 32 self.start_pos = start_pos 33 self.end_pos = end_pos 34 self.repr_start_pos = repr_start_pos 35 self.repr_end_pos = repr_end_pos 36 self.identity = identity
37