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

Source Code for Module Bio.FSSP.fssp_rec

 1  from types import ListType, TupleType 
 2  # A superclass for reading [f]ixed-column type [f]lat-[f]ile records. (e.g. 
3 -class fff_rec:
4 - def __init__(self,inrec=''):
5 self.data = inrec
6 - def __repr__(self):
7 return str(self.data)
8 __str__ = __repr__ 9
10 - def __getslice__(self,low,high):
11 return self.data[low:high]
12
13 - def __len__(self):
14 return len(self.data)
15 - def __getitem__(self,index):
16 if ((type(index) is TupleType or type(index) is ListType) and 17 len(index) == 2): 18 return self.data[index[0]:index[1]] 19 else: 20 return self.data[index]
21 22 # Definition of the align section in a FSSP file
23 -class align:
24 abs_res_num = (0,4) 25 pdb_res_num = (4,9) 26 chain_id = 10 27 res_name = 12 28 ss1 = 15 29 turn3 = 17 30 turn4 = 18 31 turn5 = (20,22) 32 acc = (34,37) 33 start_aa_list = 42
34