Help - Old tutorial:Automatically assign label IDs

From TreeGraph help


If you have a tree with several labels on each branch without having label IDs specified (like the example uses in this tutorial) it is not possible to apply formats to a certain group of labels (e.g. the first one on every branch). This tutorial shows how to group labels to different label IDs within a few steps.

The example data used in this tutorial can be downloaded here.

Document with different labels

As you can see in the image on the right the example document contains two types of labels (one with values between 0 and 1 and another with values between 0 and 100) as well as an additional label with the text "A -> B". The additional label is the only one which has a label ID ("comment") assigned.

(The document at this state is called State1.xtg in the example data archive.)

Assigned label ID for the first group of labels

1) Assigning label IDs

We now want to assign two more label IDs. One for all the labels with floating point values and one for the one with values between 0 and 100. This is only possible if the floating point labels are always first and the others are always second (or contrariwise).

We can do that by selecting Assign label IDs from the edit menu. Now TreeGraph 2 has assigned label IDs to all labels previously without an ID. You can check that by selecting a label and clicking Change label ID from the edit menu. The occurring dialog displays the assigned label ID of the selected label. Since we do not want to change the ID of this label now click Cancel to return to the main window of TreeGraph.

(The document at this state is called State2.xtg in the example data archive.)

Rename label ID dialog

2) Renaming the label IDs

The randomly chosen IDs may not be very meaningful, so we change their name (e.g. bootstrap or Bayes). This is done by selecting Rename label ID... from the edit menu. In the appearing window select the label ID to rename from the list and enter a new name in the text field above. Than click the Rename button. If you are finished click the OK bottom and the renaming is executed. If you want to keep the old names click the Cancel button and no IDs will be renamed no matter what you have entered until yet.

Renaming a label ID means that all labels which previously had the old ID (in this case H0MA2FW910H1) now have the new ID (in this case bootstrap). Don't mix that up with the change of a label ID for a single label which can also be done in the edit menu (see step 1).

(The document at this state is called State3.xtg in the example data archive.)

The formatted document

3) Formatting labels

Now that all label IDs are assigned you are able to format the different types of labels separately (e.g. moving the bootstrap values under the branch. (For details of this see Label.)

(The document at this state is called State4.xtg in the example data archive.)

See also