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   
 31  murphy_15_tab = {"L": "L", 
 32                   "V": "L", 
 33                   "I": "L", 
 34                   "M": "L", 
 35                   "C": "C", 
 36                   "A": "A", 
 37                   "G": "G", 
 38                   "S": "S", 
 39                   "T": "T", 
 40                   "P": "P", 
 41                   "F": "F", 
 42                   "Y": "F", 
 43                   "W": "W", 
 44                   "E": "E", 
 45                   "D": "D", 
 46                   "N": "N", 
 47                   "Q": "Q", 
 48                   "K": "K", 
 49                   "R": "K", 
 50                   "H": "H", 
 51  } 
 52   
 53   
54 -class Murphy15(Alphabet.ProteinAlphabet):
55 letters = "LCAGSTPFWEDNQKH" 56 size = 15
57 murphy_15 = Murphy15() 58 59 murphy_10_tab = {"L": "L", 60 "V": "L", 61 "I": "L", 62 "M": "L", 63 "C": "C", 64 "A": "A", 65 "G": "G", 66 "S": "S", 67 "T": "S", 68 "P": "P", 69 "F": "F", 70 "Y": "F", 71 "W": "F", 72 "E": "E", 73 "D": "E", 74 "N": "E", 75 "Q": "E", 76 "K": "K", 77 "R": "K", 78 "H": "H"} 79 80
81 -class Murphy10(Alphabet.ProteinAlphabet):
82 letters = "LCAGSPFEKH" 83 size = 10
84 murphy_10 = Murphy10() 85 86 murphy_8_tab = {"L": "L", 87 "V": "L", 88 "I": "L", 89 "M": "L", 90 "C": "L", 91 "A": "A", 92 "G": "A", 93 "S": "S", 94 "T": "S", 95 "P": "P", 96 "F": "F", 97 "Y": "F", 98 "W": "F", 99 "E": "E", 100 "D": "E", 101 "N": "E", 102 "Q": "E", 103 "K": "K", 104 "R": "K", 105 "H": "H"} 106 107
108 -class Murphy8(Alphabet.ProteinAlphabet):
109 letters = "LASPFEKH" 110 size = 8
111 murphy_8 = Murphy8() 112 113 murphy_4_tab = {"L": "L", 114 "V": "L", 115 "I": "L", 116 "M": "L", 117 "C": "L", 118 "A": "A", 119 "G": "A", 120 "S": "A", 121 "T": "A", 122 "P": "A", 123 "F": "F", 124 "Y": "F", 125 "W": "F", 126 "E": "E", 127 "D": "E", 128 "N": "E", 129 "Q": "E", 130 "K": "E", 131 "R": "E", 132 "H": "E"} 133 134
135 -class Murphy4(Alphabet.ProteinAlphabet):
136 letters = "LAFE" 137 size = 4
138 murphy_4 = Murphy4() 139 140 hp_model_tab = {"A": "P", # Hydrophilic 141 "G": "P", 142 "T": "P", 143 "S": "P", 144 "N": "P", 145 "Q": "P", 146 "D": "P", 147 "E": "P", 148 "H": "P", 149 "R": "P", 150 "K": "P", 151 "P": "P", 152 "C": "H", # Hydrophobic 153 "M": "H", 154 "F": "H", 155 "I": "H", 156 "L": "H", 157 "V": "H", 158 "W": "H", 159 "Y": "H"} 160 161
162 -class HPModel(Alphabet.ProteinAlphabet):
163 letters = "HP" 164 size = 2
165 hp_model = HPModel() 166 167 pc_5_table = {"I": "A", # Aliphatic 168 "V": "A", 169 "L": "A", 170 "F": "R", # Aromatic 171 "Y": "R", 172 "W": "R", 173 "H": "R", 174 "K": "C", # Charged 175 "R": "C", 176 "D": "C", 177 "E": "C", 178 "G": "T", # Tiny 179 "A": "T", 180 "C": "T", 181 "S": "T", 182 "T": "D", # Diverse 183 "M": "D", 184 "Q": "D", 185 "N": "D", 186 "P": "D"} 187 188
189 -class PC5(Alphabet.ProteinAlphabet):
190 letters = "ARCTD" 191 size = 5
192 hp_model = HPModel() 193