Beispiel #1
0
 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
Beispiel #2
0
  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
Beispiel #3
0
 def cterm_is_x(self):
   vector = [0] * 20
   vector[aa.get_aa(self.peptide[self.length - 1])] = 1
   return vector
Beispiel #4
0
 def nterm_is_x(self):
   vector = [0] * 20
   vector[aa.get_aa(self.peptide[0])] = 1
   return vector