def test_parse_phylip_test_4(self): f = data_stream("phylip_test_4.phy") seqs = phylip_io.read(f) self.assertEqual(len(seqs), 6) self.assertEqual(len(seqs[0]), 25) self.assertEqual(str(seqs[1]), "GTGGTGGTGGGCGCCGGCCGTGTGG") self.assertEqual(seqs[2].name, "ddrasa") f.close()
def test_read(self): f = data_stream("phylip_test_1.phy") seqs = phylip_io.read(f) # print seqs self.assertEqual(len(seqs), 10) self.assertEqual(seqs[0].name, "Cow") self.assertEqual(len(seqs[1]), 234) f.close()
def test_parse_phylip_test_3(self): f = data_stream("phylip_test_3.phy") seqs = phylip_io.read(f) self.assertEqual(len(seqs), 6) self.assertEqual(len(seqs[0]), 20) self.assertEqual(str(seqs[1]), "CGTTACTCGTTGTCGTTACT") self.assertEqual(seqs[1].name, "Hesperorni") f.close()
def test_parse_phylip_dna(self): f = data_stream("dna.phy") seqs = phylip_io.read(f) self.assertEqual(len(seqs), 10) self.assertEqual(len(seqs[0]), 705) self.assertEqual(str(seqs[1][0:10]), "ATGGCACACC") self.assertEqual(seqs[2].name, "Chicken") f.close()