def test_prot_mixedcase(self): fd_test = self._prep_fd(['p-mixedcase']) fd_true = smof.FileDescription() fd_true.ntype['prot'] += 1 fd_true.ncase['mixedcase'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def test_illegal(self): fd_test = self._prep_fd(['illegal']) fd_true = smof.FileDescription() fd_true.ntype['illegal'] += 1 fd_true.ncase['uppercase'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def test_prot_gapped(self): fd_test = self._prep_fd(['p-gapped']) fd_true = smof.FileDescription() fd_true.ntype['prot'] += 1 fd_true.ncase['uppercase'] += 1 fd_true.ufeat['gapped'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def test_prot_initial_met(self): fd_test = self._prep_fd(['p-initial-Met']) fd_true = smof.FileDescription() fd_true.ntype['prot'] += 1 fd_true.ncase['uppercase'] += 1 fd_true.pfeat['initial-Met'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def test_prot_terminal_stop(self): fd_test = self._prep_fd(['p-terminal-stop']) fd_true = smof.FileDescription() fd_true.ntype['prot'] += 1 fd_true.ncase['uppercase'] += 1 fd_true.pfeat['terminal-stop'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def test_prot_selenocysteine(self): fd_test = self._prep_fd(['p-selenocysteine']) fd_true = smof.FileDescription() fd_true.ntype['prot'] += 1 fd_true.ncase['uppercase'] += 1 fd_true.pfeat['selenocysteine'] += 1 self.assertTrue(self._equal_counts(fd_true, fd_test))
def _prep_fd(self, keys): fd = smof.FileDescription() for key in keys: seq = smof.FSeq(header=key, seq=self.seqs[key]) fd.add_seq(seq) return (fd)