def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) tree = parse_newick(open(opts.master_tree, 'U')) support_file = open(opts.support) bootstraps = parse_bootstrap_support(support_file) support_file.close() write_pdf_bootstrap_tree(tree, opts.output_file, bootstraps)
def test_parse_bootstrap_support(self): """parse_distmat should read distmat correctly""" input_txt = """#\ta\tb\tc. #more comments here node2\t0 17node\t0.11922 """ lines = input_txt.splitlines() exp = {'17node':0.11922, 'node2':0.00} obs = parse_bootstrap_support(lines) self.assertFloatEqual(obs, exp)
def test_parse_bootstrap_support(self): """parse_distmat should read distmat correctly""" input_txt = """#\ta\tb\tc. #more comments here node2\t0 17node\t0.11922 """ lines = input_txt.splitlines() exp = {'17node': 0.11922, 'node2': 0.00} obs = parse_bootstrap_support(lines) self.assertFloatEqual(obs, exp)