Example #1
0
 def test_boundary_of_glucagons_peptides_using_indexes(
         self, glucagon_peptides, glucagon_seq):
     # all peptides
     for (start, stop, seq) in glucagon_peptides:
         index = glucagon_seq.index(seq)
         start = SequencePoint.from_index(index)
         # if len(seq) == 1, then start = stop, thus "+ len(seq) - 1"
         stop = SequencePoint.from_index(index + len(seq) - 1)
         self.check_boundaries(start, stop, seq, glucagon_seq)
Example #2
0
 def test_from_index_that_live_is_cut_from_peptide_elvislives_using_indexes(
         self):
     index = self.parent.protein_seq.index(self.parent.pep_seq)
     start = SequencePoint.from_index(index)
     # if len(seq) == 1, then start = stop, thus "+ len(seq) - 1"
     stop = SequencePoint.from_index(index + len(self.parent.pep_seq) -
                                     1)
     self.check_boundaries(start, stop, self.parent.pep_seq,
                           self.parent.protein_seq)
Example #3
0
 def test_from_index_fails_when_called_with_an_instantiated_object(
         self):
     with pytest.raises(ValueError):
         SequencePoint.from_index(SequencePoint(10))