def isoelectric_point(self): """Calculate the isoelectric point. Uses the module IsoelectricPoint to calculate the pI of a protein. """ aa_content = self.count_amino_acids() ie_point = IsoelectricPoint.IsoelectricPoint(self.sequence, aa_content) return ie_point.pi()
def calc_region_charges(seq, cur_window): """Perform calculation of charges via isoelectric points for a sequence. """ # internal small regions, so do not deal with C and N terminal charges IsoelectricPoint.pKcterminal = {} IsoelectricPoint.pKnterminal = {} cur_pos = 0 region_charges = [] while cur_pos < len(seq) - cur_window: cur_seq = seq[cur_pos:cur_pos + cur_window] prot_analysis = ProtParam.ProteinAnalysis(str(cur_seq)) ie_calc = IsoelectricPoint.IsoelectricPoint( cur_seq, prot_analysis.count_amino_acids()) region_charges.append(ie_calc.pi()) cur_pos += 1 return region_charges
def charge_at_pH(self, pH): """Calculate the charge of a protein at given pH.""" aa_content = self.count_amino_acids() charge = IsoelectricPoint.IsoelectricPoint(self.sequence, aa_content) return charge.charge_at_pH(pH)