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