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