Skip to content

Commit 2ab7925

Browse files
committed
allow mult-line newick
allow the newick tree to span multiple lines in the input file
1 parent 05d3e8c commit 2ab7925

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

phy2html.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ def create_html_tree(inname: str, outname: str, col_width: str = "40px", row_hei
188188
name_width: str = "200px", prefix: str = "", label_branches: bool = False,
189189
rows_per_tip: int = 2) -> list:
190190
with open(inname, "r") as infile:
191-
newick_str = infile.readline()
191+
newick_str = infile.read()
192+
newick_str = newick_str[:newick_str.find(";")+1]
193+
newick_str.replace("\n", "")
192194
print()
193195
print("Input file: " + inname)
194196
print("Imported Tree String: ", newick_str)

0 commit comments

Comments
 (0)