Reformat a Newick tree to make its structure easier to read.
Input:
- A Newick tree file.
Notes:
- By default, prints the tree indented with two spaces (
--text/-t“ “). - Use
--text/-tto customize the indentation string. - Use
--compact/-cto output the tree as a single line. - The default output is valid Newick.
- Using non-whitespace characters for
--textmay produce invalid Newick.
Examples:
-
Default indentation
necom nwk indent tree.nwk -
Compact output
necom nwk indent tree.nwk --compact -
Indent with visual guides (not valid Newick)
necom nwk indent tree.nwk --text ". "