Package Bio :: Package Alphabet :: Module Reduced
[hide private]
[frames] | no frames]

Source Code for Module Bio.Alphabet.Reduced

  1  # Copyright 2004 by Iddo Friedberg. 
  2  # All rights reserved. 
  3  # This code is part of the Biopython distribution and governed by its 
  4  # license.  Please see the LICENSE file that should have been included 
  5  # as part of this package. 
  6   
  7  """Reduced alphabets which lump together several amino-acids into one letter. 
  8   
  9  Reduced (redundant or simplified) alphabets are used to represent protein sequences using an 
 10  alternative alphabet which lumps together several amino-acids into one letter, based 
 11  on physico-chemical traits. For example, all the aliphatics (I,L,V) are usually 
 12  quite interchangeable, so many sequence studies group them into one letter 
 13   
 14  Examples of reduced alphabets are available in: 
 15   
 16  http://viscose.ifg.uni-muenster.de/html/alphabets.html 
 17   
 18  The Murphy tables are from here: 
 19   
 20  Murphy L.R., Wallqvist A, Levy RM. (2000) Simplified amino acid 
 21  alphabets for protein fold recognition and implications for folding. 
 22  Protein Eng. 13(3):149-152 
 23   
 24  Bio.utils.reduce_sequence is used to take a Protein alphabet, and reduce it using one of 
 25  the tables here, or a user-defined table. 
 26  """ 
 27   
 28  from Bio import Alphabet 
 29   
 30  __docformat__ = "restructuredtext en" 
 31   
 32  murphy_15_tab = {"L": "L", 
 33                   "V": "L", 
 34                   "I": "L", 
 35                   "M": "L", 
 36                   "C": "C", 
 37                   "A": "A", 
 38                   "G": "G", 
 39                   "S": "S", 
 40                   "T": "T", 
 41                   "P": "P", 
 42                   "F": "F", 
 43                   "Y": "F", 
 44                   "W": "W", 
 45                   "E": "E", 
 46                   "D": "D", 
 47                   "N": "N", 
 48                   "Q": "Q", 
 49                   "K": "K", 
 50                   "R": "K", 
 51                   "H": "H", 
 52  } 
 53   
 54   
55 -class Murphy15(Alphabet.ProteinAlphabet):
56 letters = "LCAGSTPFWEDNQKH" 57 size = 15
58 murphy_15 = Murphy15() 59 60 murphy_10_tab = {"L": "L", 61 "V": "L", 62 "I": "L", 63 "M": "L", 64 "C": "C", 65 "A": "A", 66 "G": "G", 67 "S": "S", 68 "T": "S", 69 "P": "P", 70 "F": "F", 71 "Y": "F", 72 "W": "F", 73 "E": "E", 74 "D": "E", 75 "N": "E", 76 "Q": "E", 77 "K": "K", 78 "R": "K", 79 "H": "H"} 80 81
82 -class Murphy10(Alphabet.ProteinAlphabet):
83 letters = "LCAGSPFEKH" 84 size = 10
85 murphy_10 = Murphy10() 86 87 murphy_8_tab = {"L": "L", 88 "V": "L", 89 "I": "L", 90 "M": "L", 91 "C": "L", 92 "A": "A", 93 "G": "A", 94 "S": "S", 95 "T": "S", 96 "P": "P", 97 "F": "F", 98 "Y": "F", 99 "W": "F", 100 "E": "E", 101 "D": "E", 102 "N": "E", 103 "Q": "E", 104 "K": "K", 105 "R": "K", 106 "H": "H"} 107 108
109 -class Murphy8(Alphabet.ProteinAlphabet):
110 letters = "LASPFEKH" 111 size = 8
112 murphy_8 = Murphy8() 113 114 murphy_4_tab = {"L": "L", 115 "V": "L", 116 "I": "L", 117 "M": "L", 118 "C": "L", 119 "A": "A", 120 "G": "A", 121 "S": "A", 122 "T": "A", 123 "P": "A", 124 "F": "F", 125 "Y": "F", 126 "W": "F", 127 "E": "E", 128 "D": "E", 129 "N": "E", 130 "Q": "E", 131 "K": "E", 132 "R": "E", 133 "H": "E"} 134 135
136 -class Murphy4(Alphabet.ProteinAlphabet):
137 letters = "LAFE" 138 size = 4
139 murphy_4 = Murphy4() 140 141 hp_model_tab = {"A": "P", # Hydrophilic 142 "G": "P", 143 "T": "P", 144 "S": "P", 145 "N": "P", 146 "Q": "P", 147 "D": "P", 148 "E": "P", 149 "H": "P", 150 "R": "P", 151 "K": "P", 152 "P": "P", 153 "C": "H", # Hydrophobic 154 "M": "H", 155 "F": "H", 156 "I": "H", 157 "L": "H", 158 "V": "H", 159 "W": "H", 160 "Y": "H"} 161 162
163 -class HPModel(Alphabet.ProteinAlphabet):
164 letters = "HP" 165 size = 2
166 hp_model = HPModel() 167 168 pc_5_table = {"I": "A", # Aliphatic 169 "V": "A", 170 "L": "A", 171 "F": "R", # Aromatic 172 "Y": "R", 173 "W": "R", 174 "H": "R", 175 "K": "C", # Charged 176 "R": "C", 177 "D": "C", 178 "E": "C", 179 "G": "T", # Tiny 180 "A": "T", 181 "C": "T", 182 "S": "T", 183 "T": "D", # Diverse 184 "M": "D", 185 "Q": "D", 186 "N": "D", 187 "P": "D"} 188 189
190 -class PC5(Alphabet.ProteinAlphabet):
191 letters = "ARCTD" 192 size = 5
193 hp_model = HPModel() 194