Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
Bio.SeqUtils.IsoelectricPoint.IsoelectricPoint Class Reference

List of all members.

Public Member Functions

def __init__
def pi

Public Attributes

 sequence
 charged_aas_content

Private Member Functions

def _select_charged
def _chargeR

Detailed Description

Definition at line 31 of file IsoelectricPoint.py.


Constructor & Destructor Documentation

def Bio.SeqUtils.IsoelectricPoint.IsoelectricPoint.__init__ (   self,
  ProteinSequence,
  AminoAcidsContent 
)

Definition at line 32 of file IsoelectricPoint.py.

00032 
00033     def __init__(self, ProteinSequence, AminoAcidsContent):
00034         self.sequence = ProteinSequence        
00035         self.charged_aas_content = self._select_charged(AminoAcidsContent)


Member Function Documentation

def Bio.SeqUtils.IsoelectricPoint.IsoelectricPoint._chargeR (   self,
  pH,
  pos_pKs,
  neg_pKs 
) [private]

Definition at line 47 of file IsoelectricPoint.py.

00047 
00048     def _chargeR(self, pH, pos_pKs, neg_pKs):
00049         PositiveCharge = 0.0
00050         for aa, pK in pos_pKs.iteritems():         
00051              CR = 10**(pK-pH)
00052              partial_charge = CR/(CR+1.0)
00053              PositiveCharge += self.charged_aas_content[aa] * partial_charge 
00054 
00055         NegativeCharge = 0.0
00056         for aa, pK in neg_pKs.iteritems():         
00057              CR = 10**(pH-pK)
00058              partial_charge = CR/(CR+1.0)
00059              NegativeCharge += self.charged_aas_content[aa] * partial_charge 
00060 
00061         return PositiveCharge - NegativeCharge       

Here is the caller graph for this function:

def Bio.SeqUtils.IsoelectricPoint.IsoelectricPoint._select_charged (   self,
  AminoAcidsContent 
) [private]

Definition at line 38 of file IsoelectricPoint.py.

00038 
00039     def _select_charged(self, AminoAcidsContent):
00040         charged = {}    
00041         for aa in charged_aas:
00042             charged[aa] = float(AminoAcidsContent[aa])
00043         charged['Nterm'] = 1.0
00044         charged['Cterm'] = 1.0
00045         return charged

Definition at line 63 of file IsoelectricPoint.py.

00063 
00064     def pi(self):        
00065         pos_pKs = dict(positive_pKs)
00066         neg_pKs = dict(negative_pKs)
00067         nterm = self.sequence[0]
00068         cterm = self.sequence[-1]    
00069         if nterm in pKnterminal.keys():
00070             pos_pKs['Nterm'] = pKnterminal[nterm]
00071         if cterm in pKcterminal.keys():
00072             neg_pKs['Cterm'] = pKcterminal[cterm]
00073 
00074         # Bracket between pH1 and pH2
00075         pH = 7.0
00076         Charge = self._chargeR(pH, pos_pKs, neg_pKs)
00077         if Charge > 0.0:
00078             pH1 = pH
00079             Charge1 = Charge
00080             while Charge1 > 0.0:
00081                 pH = pH1 + 1.0
00082                 Charge = self._chargeR(pH, pos_pKs, neg_pKs)
00083                 if Charge > 0.0:
00084                     pH1 = pH
00085                     Charge1 = Charge
00086                 else:
00087                     pH2 = pH
00088                     Charge2 = Charge
00089                     break
00090         else:
00091             pH2 = pH
00092             Charge2 = Charge
00093             while Charge2 < 0.0:
00094                 pH = pH2 - 1.0
00095                 Charge = self._chargeR(pH, pos_pKs, neg_pKs)
00096                 if Charge < 0.0:
00097                     pH2 = pH
00098                     Charge2 = Charge
00099                 else:
00100                     pH1 = pH
00101                     Charge1 = Charge
00102                     break
00103 
00104         # Bisection
00105         while pH2 - pH1 > 0.0001 and Charge!=0.0:
00106             pH = (pH1 + pH2) / 2.0
00107             Charge = self._chargeR(pH, pos_pKs, neg_pKs)
00108             if Charge > 0.0:
00109                 pH1 = pH
00110                 Charge1 = Charge
00111             else:
00112                 pH2 = pH
00113                 Charge2 = Charge
00114 
00115         return pH

Here is the call graph for this function:


Member Data Documentation

Definition at line 34 of file IsoelectricPoint.py.

Definition at line 33 of file IsoelectricPoint.py.


The documentation for this class was generated from the following file: