Help - Sorting terminal nodes

From TreeGraph help

The "Sort terminal nodes" feature allows you to sort the terminal nodes of a tree as close as possible to a defined order. This order can either be obtained from another tree or a text file. Note that depending on the topology of your tree not all orders can be applied. TreeGraph will choose the closest possible order under the given topology.

Note that this feature was not available before TreeGraph 2.2.0.

Sorting all terminals or only a subtree

You can choose whether to sort all terminal nodes in your tree document or just sort a certain subtree. If no element is selected while you use choose "Sort terminal nodes..." all leaf nodes of your tree will be sorted. Alternatively you can also select one node (or branch) in the document before and only the terminals in the subtree branching from this element will be sorted.

The dialog

The "Sort terminal nodes"-dialog

You can access the "Sort terminal nodes"-dialog by selecting "Sort terminal nodes..." from the edit menu or the context menu.

Source for new leaf order

You can choose here whether to a text file or the terminal nodes of another opened tree document to define the new terminal node order. If you choose a text file, that needs to be in plain text format and must contain one name in each line. If you use an opened document as the order source instead, you have to specify the node/branch data column to read the element names from. (Note that only the order of the terminal nodes from the top to bottom of the tree is relevant here and the internal topology of the other document is not considered here.)

Node/branch data column used to indentify leaf nodes to be sorted

Here you need to specify which node/branch data column column of your terminal nodes you want to sort contains the same values as you are going to import to specify the order. (In many cases this will be the node names which are selected by default.)

Compare options

This options allow you to further define how the values loaded from the source and the values in the terminal nodes you want to sort shall be matched. (In most cases you can leave this options unchanged.)

  • Ignore leading and trailing white spaces: Check this option, if you want the key "NodeA" to be considered a identical to " NodeA" or "NodeA ".
  • Distinguish between space (" ") and underscore ("_"): Check this option, if you want the key Node A to be considered a identical to Node_A.
  • Case sensitive: Check this option, if you want the key Node A to be considered a identical to Node a or NODE A.
  • Parse numeric values if possible: Check this option, if you want the key 200 to be considered a identical to 200.0 (e.g., English decimal separator), 200,0 (e.g., German decimal separator) or 2E2 (2 · 102).
    • Both decimal separators are supported here. Thousand separators are not allowed, because it would not possible to distinguishing e.g. between "1,236" meaning 1236 in e.g. English and "1,236" meaning 1.236 in e.g. German. In case you have a data file containing thousand separators, use the according format function a spread sheet application (e.g. OpenOffice Calc) or the replace function of a text editor to remove them before opening the file with TreeGraph.
    • If any value can not be parsed as a number, it is still treated as a textual key.


See also