def sequence_info(self): # peptide length limit is 11 vector = [] for i in range(self.length): v = [0] * 20 v[aa.get_aa(self.peptide[i])] = 1 vector.extend(v) return vector
def c_x(self, fragmentation_site): if fragmentation_site <= 0 or fragmentation_site >= self.length: return 0 vector = [0] * 20 # amino acids after fragmentation site for i in range(fragmentation_site, self.length): vector[aa.get_aa(self.peptide[i])] += 1 return vector
def cterm_is_x(self): vector = [0] * 20 vector[aa.get_aa(self.peptide[self.length - 1])] = 1 return vector
def nterm_is_x(self): vector = [0] * 20 vector[aa.get_aa(self.peptide[0])] = 1 return vector