Skip to content

nwkit sanitize

Kenji Fukushima edited this page Mar 9, 2023 · 2 revisions

Overview

nwkit sanitize eliminates non-standard Newick flavors and standardizes the format.

Examples

In this example, the tree does not superficially change, but a singleton branch is collapsed, and quotations are introduced to the tip labels.

Command

nwkit sanitize --name_quote single --infile input.nwk --outfile output.nwk

input.nwk

((((a:1,b:1):1):1,c:1):1,((d:1,e:1),f:1):1):0;
image

output.nwk

(('c':1,('a':1,'b':1):2):1,(('d':1,'e':1):1,'f':1):1):0;
image
Clone this wiki locally