Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.FSSP.FSSPAlignDict Class Reference

List of all members.

Public Member Functions

def __init__
def build_resnum_list
def abs
def pdb
def sequence
def fasta_mult_align

Public Attributes

 pdb_res_dict
 abs_res_dict
 data

Detailed Description

Definition at line 154 of file __init__.py.


Constructor & Destructor Documentation

Definition at line 155 of file __init__.py.

00155 
00156    def __init__(self):
00157       # The following two dictionaries are pointers to records in self
00158       # The first dictionary is a "pdb_residue_number: self_key"
00159       # The second dictionary is a "absolute_residue_number: self_key"
00160       self.pdb_res_dict = {}
00161       self.abs_res_dict = {}
      self.data = {}

Here is the caller graph for this function:


Member Function Documentation

def Bio.FSSP.FSSPAlignDict.abs (   self,
  num 
)

Definition at line 168 of file __init__.py.

00168 
00169    def abs(self,num):
      return self[self.abs_res_dict[num]]

Here is the caller graph for this function:

Definition at line 162 of file __init__.py.

00162 
00163    def build_resnum_list(self):
00164       for i in self:
00165          self.abs_res_dict[self[i].abs_res_num] = i
         self.pdb_res_dict[self[i].pdb_res_num] = i

Definition at line 184 of file __init__.py.

00184 
00185    def fasta_mult_align(self):
00186       mult_align_dict = {}
00187       for j in self.abs(1).pos_align_dict:
00188          mult_align_dict[j] = ''
00189       for fssp_rec in self.itervalues():
00190          for j in fssp_rec.pos_align_dict:
00191             mult_align_dict[j] += fssp_rec.pos_align_dict[j].aa
00192       seq_order = mult_align_dict.keys()
00193       seq_order.sort()
00194       out_str = ''
00195       for i in seq_order:
00196          out_str += '> %d\n' % i
00197          k = 0
00198          for j in mult_align_dict[i]:
00199             k += 1
00200             if k % 72 == 0:
00201                out_str += '\n'
00202             out_str += j
00203          out_str += '\n'
00204       return out_str

Here is the call graph for this function:

def Bio.FSSP.FSSPAlignDict.pdb (   self,
  num 
)

Definition at line 172 of file __init__.py.

00172 
00173    def pdb(self,num):
      return self[self.pdb_res_dict[num]]
def Bio.FSSP.FSSPAlignDict.sequence (   self,
  num 
)

Definition at line 176 of file __init__.py.

00176 
00177    def sequence(self,num):
00178       s = ''
00179       sorted_pos_nums = self.abs_res_dict.keys()
00180       sorted_pos_nums.sort()
00181       for i in sorted_pos_nums:
00182          s += self.abs(i).pos_align_dict[num].aa
00183       return s

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 160 of file __init__.py.

Definition at line 161 of file __init__.py.

Definition at line 159 of file __init__.py.


The documentation for this class was generated from the following file: