def hydf(self, fragmentation_site, ion_type): if fragmentation_site <= 0 or fragmentation_site >= self.length: return 0 s = 0 if ion_type == 'b': for i in range(fragmentation_site): h = hydph.get_aa_hydph(self.peptide[i]) s += h elif ion_type == 'y': for i in range(fragmentation_site, self.length - 1): h = hydph.get_aa_hydph(self.peptide[i]) s += h return s
def sequence_hydph_info(self): vector = [] for i in range(self.length): vector.append(hydph.get_aa_hydph(self.peptide[i])) return vector
def hydp(self): s = 0 for aa in self.peptide: s += hydph.get_aa_hydph(aa) return s
def hydc_fragmentation_site(self, fragmentation_site): if fragmentation_site <= 0 or fragmentation_site >= self.length: return 0 return hydph.get_aa_hydph(self.peptide[fragmentation_site])
def hydc_x(self, fragmentation_site, distance): if fragmentation_site + distance <= 0\ or fragmentation_site + distance >= self.length: return 0 return hydph.get_aa_hydph(self.peptide[fragmentation_site + distance])
def hydpra(self, fragmentation_site): if fragmentation_site <= 0 or fragmentation_site >= self.length: return 0 return (hydph.get_aa_hydph(self.peptide[fragmentation_site]) + hydph.get_aa_hydph(self.peptide[fragmentation_site - 1])) / 2