Package Bio :: Package FSSP :: Module fssp_rec
[hide private]
[frames] | no frames]

Source Code for Module Bio.FSSP.fssp_rec

 1  """A superclass for reading [f]ixed-column type [f]lat-[f]ile records.""" 
 2   
 3   
4 -class fff_rec(object):
5 - def __init__(self, inrec=''):
6 self.data = inrec
7
8 - def __repr__(self):
9 return str(self.data)
10 __str__ = __repr__ 11
12 - def __len__(self):
13 return len(self.data)
14
15 - def __getitem__(self, index):
16 if isinstance(index, slice): 17 return self.data[index] 18 elif (isinstance(index, tuple) or isinstance(index, list)) \ 19 and len(index) == 2: 20 # Not sure if this is needed anymore: 21 return self.data[index[0]:index[1]] 22 else: 23 return self.data[index]
24 25
26 -class align(object):
27 """Definition of the align section in a FSSP file.""" 28 abs_res_num = (0, 4) 29 pdb_res_num = (4, 9) 30 chain_id = 10 31 res_name = 12 32 ss1 = 15 33 turn3 = 17 34 turn4 = 18 35 turn5 = (20, 22) 36 acc = (34, 37) 37 start_aa_list = 42
38