From 4f7bc2c79d5a9f53eda256ea46bf1474adc2dea4 Mon Sep 17 00:00:00 2001 From: fransua Date: Fri, 25 Aug 2017 00:27:53 +0200 Subject: [PATCH] tree_search tool: fixed rendering --- treematcher/tools/ete_search.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/treematcher/tools/ete_search.py b/treematcher/tools/ete_search.py index da4719a..2024ee1 100755 --- a/treematcher/tools/ete_search.py +++ b/treematcher/tools/ete_search.py @@ -152,18 +152,18 @@ def run(args): else: image += str(pattern_num) ts = TreeStyle() - + ts.show_leaf_name = True for n in t.traverse(): nstyle = NodeStyle() - nstyle["fgcolor"] = "red" - nstyle["size"] = 5 + if n in matches: + nstyle["fgcolor"] = "green" + nstyle["size"] = 7 + else: + nstyle["fgcolor"] = "red" + nstyle["size"] = 5 n.set_style(nstyle) - for match in matches: - match.img_style["size"] = 15 - match.img_style["fgcolor"] = "green" - - t.render(image, tree_style=ts) + t.render(image, tree_style=ts, layout=lambda x: None) else: if pattern_length > 1: # multiple patterns if match_length > 1: # one file per match on each pattern