1
2
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
31
33 - def __init__(self, ProteinSequence, AminoAcidsContent):
36
37
38
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
48 - def _chargeR(self, pH, pos_pKs, neg_pKs):
49 PositiveCharge = 0.0
50 for aa, pK in pos_pKs.iteritems():
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.iteritems():
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
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.keys():
70 pos_pKs['Nterm'] = pKnterminal[nterm]
71 if cterm in pKcterminal.keys():
72 neg_pKs['Cterm'] = pKcterminal[cterm]
73
74
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
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