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  __docformat__ = "restructuredtext en" 
 24   
 25  positive_pKs = {'Nterm': 7.5, 'K': 10.0, 'R': 12.0, 'H': 5.98} 
 26  negative_pKs = {'Cterm': 3.55, 'D': 4.05, 'E': 4.45, 'C': 9.0, 'Y': 10.0} 
 27  pKcterminal = {'D': 4.55, 'E': 4.75} 
 28  pKnterminal = {'A': 7.59, 'M': 7.0, 'S': 6.93, 'P': 8.36, 'T': 6.82, 'V': 7.44, 'E': 7.7} 
 29  charged_aas = ('K', 'R', 'H', 'D', 'E', 'C', 'Y') 
 30   
 31   
 32  # access this module through ProtParam.ProteinAnalysis class. 
 33  # first make a ProteinAnalysis object and then call its isoelectric_point method. 
34 -class IsoelectricPoint(object):
35 - def __init__(self, ProteinSequence, AminoAcidsContent):
36 self.sequence = ProteinSequence 37 self.charged_aas_content = self._select_charged(AminoAcidsContent)
38 39 # This function creates a dictionary with the contents of each charged aa, 40 # plus Cterm and Nterm.
41 - def _select_charged(self, AminoAcidsContent):
42 charged = {} 43 for aa in charged_aas: 44 charged[aa] = float(AminoAcidsContent[aa]) 45 charged['Nterm'] = 1.0 46 charged['Cterm'] = 1.0 47 return charged
48 49 # This function calculates the total charge of the protein at a given pH.
50 - def _chargeR(self, pH, pos_pKs, neg_pKs):
51 PositiveCharge = 0.0 52 for aa, pK in pos_pKs.items(): 53 CR = 10**(pK-pH) 54 partial_charge = CR/(CR+1.0) 55 PositiveCharge += self.charged_aas_content[aa] * partial_charge 56 57 NegativeCharge = 0.0 58 for aa, pK in neg_pKs.items(): 59 CR = 10**(pH-pK) 60 partial_charge = CR/(CR+1.0) 61 NegativeCharge += self.charged_aas_content[aa] * partial_charge 62 63 return PositiveCharge - NegativeCharge
64 65 # This is the action function, it tries different pH until the charge of the protein is 0 (or close).
66 - def pi(self):
67 pos_pKs = dict(positive_pKs) 68 neg_pKs = dict(negative_pKs) 69 nterm = self.sequence[0] 70 cterm = self.sequence[-1] 71 if nterm in pKnterminal: 72 pos_pKs['Nterm'] = pKnterminal[nterm] 73 if cterm in pKcterminal: 74 neg_pKs['Cterm'] = pKcterminal[cterm] 75 76 # Bracket between pH1 and pH2 77 pH = 7.0 78 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 79 if Charge > 0.0: 80 pH1 = pH 81 Charge1 = Charge 82 while Charge1 > 0.0: 83 pH = pH1 + 1.0 84 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 85 if Charge > 0.0: 86 pH1 = pH 87 Charge1 = Charge 88 else: 89 pH2 = pH 90 Charge2 = Charge 91 break 92 else: 93 pH2 = pH 94 Charge2 = Charge 95 while Charge2 < 0.0: 96 pH = pH2 - 1.0 97 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 98 if Charge < 0.0: 99 pH2 = pH 100 Charge2 = Charge 101 else: 102 pH1 = pH 103 Charge1 = Charge 104 break 105 106 # Bisection 107 while pH2 - pH1 > 0.0001 and Charge != 0.0: 108 pH = (pH1 + pH2) / 2.0 109 Charge = self._chargeR(pH, pos_pKs, neg_pKs) 110 if Charge > 0.0: 111 pH1 = pH 112 Charge1 = Charge 113 else: 114 pH2 = pH 115 Charge2 = Charge 116 117 return pH
118