Package Bio :: Package SeqUtils :: Module IsoelectricPoint
[hide private]
[frames] | no frames]

Source Code for Module Bio.SeqUtils.IsoelectricPoint

  1  # Copyright Yair Benita Y.Benita@pharm.uu.nl 
  2  # Biopython (http://biopython.org) license applies 
  3   
  4  """Calculate isoelectric points of polypeptides using methods of Bjellqvist. 
  5   
  6  pK values and the methos are taken from:: 
  7   
  8      * Bjellqvist, B.,Hughes, G.J., Pasquali, Ch., Paquet, N., Ravier, F., Sanchez, 
  9      J.-Ch., Frutiger, S. & Hochstrasser, D.F. 
 10      The focusing positions of polypeptides in immobilized pH gradients can be predicted 
 11      from their amino acid sequences. Electrophoresis 1993, 14, 1023-1031. 
 12   
 13      * Bjellqvist, B., Basse, B., Olsen, E. and Celis, J.E. 
 14      Reference points for comparisons of two-dimensional maps of proteins from 
 15      different human cell types defined in a pH scale where isoelectric points correlate 
 16      with polypeptide compositions. Electrophoresis 1994, 15, 529-539. 
 17   
 18  I designed the algorithm according to a note by David L. Tabb, available at: 
 19  http://fields.scripps.edu/DTASelect/20010710-pI-Algorithm.pdf 
 20   
 21  """ 
 22   
 23   
 24  positive_pKs = {'Nterm': 7.5, 'K': 10.0, 'R': 12.0, 'H': 5.98} 
 25  negative_pKs = {'Cterm': 3.55, 'D': 4.05, 'E': 4.45, 'C': 9.0, 'Y': 10.0} 
 26  pKcterminal = {'D': 4.55, 'E': 4.75} 
 27  pKnterminal = {'A': 7.59, 'M': 7.0, 'S': 6.93, 'P': 8.36, 'T': 6.82, 'V': 7.44, 'E': 7.7} 
 28  charged_aas = ('K', 'R', 'H', 'D', 'E', 'C', 'Y') 
 29   
 30   
 31  # access this module through ProtParam.ProteinAnalysis class. 
 32  # first make a ProteinAnalysis object and then call its isoelectric_point method. 
33 -class IsoelectricPoint(object):
34 - def __init__(self, ProteinSequence, AminoAcidsContent):
35 self.sequence = ProteinSequence 36 self.charged_aas_content = self._select_charged(AminoAcidsContent)
37 38 # This function creates a dictionary with the contents of each charged aa, 39 # plus Cterm and Nterm.
40 - def _select_charged(self, AminoAcidsContent):
41 charged = {} 42 for aa in charged_aas: 43 charged[aa] = float(AminoAcidsContent[aa]) 44 charged['Nterm'] = 1.0 45 charged['Cterm'] = 1.0 46 return charged
47 48 # This function calculates the total charge of the protein at a given pH.
49 - def _chargeR(self, pH, pos_pKs, neg_pKs):
50 PositiveCharge = 0.0 51 for aa, pK in pos_pKs.items(): 52 CR = 10 ** (pK - pH) 53 partial_charge = CR / (CR + 1.0) 54 PositiveCharge += self.charged_aas_content[aa] * partial_charge 55 56 NegativeCharge = 0.0 57 for aa, pK in neg_pKs.items(): 58 CR = 10 ** (pH - pK) 59 partial_charge = CR / (CR + 1.0) 60 NegativeCharge += self.charged_aas_content[aa] * partial_charge 61 62 return PositiveCharge - NegativeCharge
63 64 # This is the action function, it tries different pH until the charge of the protein is 0 (or close).
65 - def pi(self):
66 pos_pKs = dict(positive_pKs) 67 neg_pKs = dict(negative_pKs) 68 nterm = self.sequence[0] 69 cterm = self.sequence[-1] 70 if nterm in pKnterminal: 71 pos_pKs['Nterm'] = pKnterminal[nterm] 72 if cterm in pKcterminal: 73 neg_pKs['Cterm'] = pKcterminal[cterm] 74 75 # Bracket between pH1 and pH2 76 pH = 7.0 77 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 78 if Charge > 0.0: 79 pH1 = pH 80 Charge1 = Charge 81 while Charge1 > 0.0: 82 pH = pH1 + 1.0 83 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 84 if Charge > 0.0: 85 pH1 = pH 86 Charge1 = Charge 87 else: 88 pH2 = pH 89 Charge2 = Charge 90 break 91 else: 92 pH2 = pH 93 Charge2 = Charge 94 while Charge2 < 0.0: 95 pH = pH2 - 1.0 96 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 97 if Charge < 0.0: 98 pH2 = pH 99 Charge2 = Charge 100 else: 101 pH1 = pH 102 Charge1 = Charge 103 break 104 105 # Bisection 106 while pH2 - pH1 > 0.0001 and Charge != 0.0: 107 pH = (pH1 + pH2) / 2.0 108 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 109 if Charge > 0.0: 110 pH1 = pH 111 Charge1 = Charge 112 else: 113 pH2 = pH 114 Charge2 = Charge 115 116 return pH
117