예제 #1
0
파일: test_utils.py 프로젝트: kblin/phycolo
 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
파일: test_utils.py 프로젝트: kblin/phycolo
 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
파일: actions.py 프로젝트: kblin/phycolo
def _create_fingerprint(record):
    counts = count_codons(record)
    return Fingerprint(record.id, **counts)