Example #1
0
def _get_all_composables(tmp_dir_name):
    test_model1 = evo.model("HKY85")
    test_model2 = evo.model("GN")
    test_hyp = evo.hypothesis(test_model1, test_model2)
    test_num_reps = 100

    applications = [
        align.align_to_ref(),
        align.progressive_align(model="GY94"),
        evo.ancestral_states(),
        evo.bootstrap(hyp=test_hyp, num_reps=test_num_reps),
        evo.hypothesis(test_model1, test_model2),
        evo.model("GN"),
        evo.tabulate_stats(),
        sample.fixed_length(100),
        sample.min_length(100),
        io.write_db(tmp_dir_name, create=True),
        io.write_json(tmp_dir_name, create=True),
        io.write_seqs(tmp_dir_name, create=True),
        sample.omit_bad_seqs(),
        sample.omit_degenerates(),
        sample.omit_duplicated(),
        sample.take_codon_positions(1),
        sample.take_named_seqs(),
        sample.trim_stop_codons(gc=1),
        translate.select_translatable(),
        tree.quick_tree(),
        tree.scale_branches(),
        tree.uniformize_tree(),
    ]
    return applications
Example #2
0
 def test_uniformize_tree(self):
     """equivalent topologies should be the same"""
     a = make_tree(treestring="(a,(b,c),(d,e))")
     b = make_tree(treestring="(e,d,(a,(b,c)))")
     make_uniform = tree_app.uniformize_tree(root_at="c",
                                             ordered_names=list("abcde"))
     u_a = make_uniform(a).get_newick()
     u_b = make_uniform(b).get_newick()
     self.assertTrue(u_a == u_b)
     # but different ones different
     c = make_tree(treestring="(e,c,(a,(b,d)))")
     u_c = make_uniform(c).get_newick()
     self.assertFalse(u_a == u_c)