Back to index

python-biopython  1.60
fssp_rec.py
Go to the documentation of this file.
00001 # A superclass for reading [f]ixed-column type [f]lat-[f]ile records. (e.g.
00002 class fff_rec:
00003    def __init__(self,inrec=''):
00004       self.data = inrec
00005    def __repr__(self):
00006       return str(self.data)
00007    __str__ = __repr__
00008 
00009    def __len__(self):
00010       return len(self.data)
00011    
00012    def __getitem__(self,index):
00013       if isinstance(index, slice):
00014          return self.data[index]
00015       elif (isinstance(index, tuple) or isinstance(index, list)) \
00016       and len(index) == 2:
00017          #Not sure if this is needed anymore:
00018          return self.data[index[0]:index[1]]
00019       else:
00020          return self.data[index]
00021 
00022 # Definition of the align section in a FSSP file
00023 class align(object):
00024    abs_res_num = (0,4)
00025    pdb_res_num = (4,9)
00026    chain_id = 10
00027    res_name = 12
00028    ss1 = 15
00029    turn3 = 17
00030    turn4 = 18
00031    turn5 = (20,22)
00032    acc = (34,37)
00033    start_aa_list = 42
00034