Пример #1
0
 def test_count_codons(self):
     """Test utils.count_codons()"""
     codons = count_codons(self.record)
     self.assertEqual(144, codons["GCC"])
     self.assertEqual(0, codons["TAA"])
Пример #2
0
 def test_count_codons_ignore_invalid(self):
     invalid = seqio.read(get_file_path("invalid_codons.gbk"))
     codons = count_codons(invalid)
     self.assertEqual(143, codons["GCC"])
Пример #3
0
def _create_fingerprint(record):
    counts = count_codons(record)
    return Fingerprint(record.id, **counts)