Package Bio :: Package PDB :: Module FragmentMapper'
[hide private]
[frames] | no frames]

Module FragmentMapper'

source code

Classify protein backbone structure according to Kolodny et al's fragment libraries. It can be regarded as a form of objective secondary structure classification. Only fragments of length 5 or 7 are supported (ie. there is a 'central' residue).

Full reference:

Kolodny R, Koehl P, Guibas L, Levitt M. Small libraries of protein fragments model native protein structures accurately. J Mol Biol. 2002 323(2):297-307.

The definition files of the fragments can be obtained from:

http://csb.stanford.edu/~rachel/fragments/

You need these files to use this module.

The following example uses the library with 10 fragments of length 5. The library files can be found in directory 'fragment_data'.

>>> model=structure[0]
>>> fm=FragmentMapper(lsize=10, flength=5, dir="fragment_data")
>>> fm.map(model)
>>> fragment=fm[residue]
Classes [hide private]
  Fragment
Represent a polypeptide C-alpha fragment.
  FragmentMapper
Map polypeptides in a model to lists of representative fragments.
Functions [hide private]
 
_make_fragment_list(pp, length)
Dice up a peptide in fragments of length "length".
source code
 
_map_fragment_list(flist, reflist)
Map all frgaments in flist to the closest (in RMSD) fragment in reflist.
source code
 
_read_fragments(size, length, dir='.')
Read a fragment spec file (available from http://csb.stanford.edu/rachel/fragments/ and return a list of Fragment objects.
source code
Variables [hide private]
  _FRAGMENT_FILE = 'lib_%s_z_%s.txt'
  standard_aa_names = ['ALA', 'CYS', 'ASP', 'GLU', 'PHE', 'GLY',...
  to_one_letter_code = {'2AS': 'D', '3AH': 'H', '5HP': 'E', 'ACL...
Function Details [hide private]

_make_fragment_list(pp, length)

source code 

Dice up a peptide in fragments of length "length".

Parameters:
  • pp ([Residue, Residue, ...]) - a list of residues (part of one peptide)
  • length (int) - fragment length

_map_fragment_list(flist, reflist)

source code 

Map all frgaments in flist to the closest (in RMSD) fragment in reflist.

Returns a list of reflist indices.

Parameters:

_read_fragments(size, length, dir='.')

source code 

Read a fragment spec file (available from http://csb.stanford.edu/rachel/fragments/ and return a list of Fragment objects.

Parameters:
  • size (int) - number of fragments in the library
  • length (int) - length of the fragments
  • dir (string) - directory where the fragment spec files can be found

Variables Details [hide private]

standard_aa_names

Value:
['ALA',
 'CYS',
 'ASP',
 'GLU',
 'PHE',
 'GLY',
 'HIS',
 'ILE',
...

to_one_letter_code

Value:
{'2AS': 'D',
 '3AH': 'H',
 '5HP': 'E',
 'ACL': 'R',
 'AGM': 'R',
 'AIB': 'A',
 'ALA': 'A',
 'ALM': 'A',
...