Beispiel #1
0
 def test_aln_tree_seqs(self):
     "aln_tree_seqs returns the muscle alignment and tree from iteration2"
     tree, aln = aln_tree_seqs(path.join(self.temp_dir, 'seq1.txt'), 
                                tree_type="neighborjoining",
                                WorkingDir=self.temp_dir,
                                clean_up=True)
     self.assertEqual(str(tree), '((1:1.125,2:1.125):0.375,3:1.5);')
     self.assertEqual(len(aln), 6)
     self.assertEqual(aln[-2], '>3\n')
     self.assertEqual(aln[-1], 'GCGGCUAUUAGAUCGUA------\n')
Beispiel #2
0
 def test_aln_tree_seqs_spaces(self):
     "aln_tree_seqs should work on filename with spaces"
     try:
         #create sequence files
         f = open(path.join(self.temp_dir_spaces, 'muscle_test_seq1.txt'),'w')
         f.write('\n'.join(self.lines1))
         f.close()
     except OSError:
         pass
     tree, aln = aln_tree_seqs(path.join(self.temp_dir_spaces,\
                                 'muscle_test_seq1.txt'), 
                                 tree_type="neighborjoining",
                                 WorkingDir=getcwd(),
                                 clean_up=True)
     self.assertEqual(str(tree), '((1:1.125,2:1.125):0.375,3:1.5);')
     self.assertEqual(len(aln), 6)
     self.assertEqual(aln[-2], '>3\n')
     self.assertEqual(aln[-1], 'GCGGCUAUUAGAUCGUA------\n')
     remove(self.temp_dir_spaces+'/muscle_test_seq1.txt')