(Back | Contents | Next)

## Divergence

(Note: it is recommended that you be familiar with the material in the data file conversion section before reading this section.)

Divergence allows you to define the relationships between populations by linking populations pairwise into parent (or ancestor) populations. This Divergence linkage is defined on the `Data Partitions` tab. Once that is complete, the user can go to the `Migration Matrix` tab to edit the migration matrix.

Note: Because you are defining the relationship between pairs of populations and their parent, the process is iterative. You pick the first pair, the software links them to their parent, and then you pick the next pair. Thus there is a bit of back and forth between screens until you get all the connections defined. We would like to have done this graphically, but, given the constraints of the current interface, that was not possible. This interface is, quite frankly, a stop gap that saves you from editing the XML code directly (something you definitely don't wish to do). It's a bit clunky, but it does work and it has error checking.

### Divergence Definition

Here is the `Data Partitions` tab for a 3 population data set before divergence is turned on. Note that the content of the `Divergence` button is "Off".

Picking the `Divergence` button yields the following screen:

There are two things that can be done here:

- `Rename Parent` allows you to edit the parent name. You should be aware that the XML parser that will eventually read the output from this converter into LAMARC gets confused by spaces in names, so they are automatically replaced with underscores. The software is not being perverse, it is protecting you from an unsophisticated parser.
- `Pick Children` This is a list of all the populations that currently do not have parents. Parents can only have 2 children, so after you check two the rest will gray out. If you make a mistake, just pick the incorrect one again, it will uncheck, and the rest of the names will become active again. `Unselect All` will uncheck all the children. Not much of a gain in this case, but if there were 4 or 5 children it is useful.

Now that the first parent is chosen, the `Data Partitions` tab now looks like this. Note that the `Divergence` button now reads "Continue" and there is a `parent` cell bridging the "North" and "South" populations with the name "Parent_1".

One puzzler is if you looked at the `Migration Matrix` tab you would find only the migration matrix between the populations and no sign of "Parent_1". This is because the Divergence structure is not yet fully defined, so the Migration Matrix does not know what to do.

In order to finish the Divergence definition it is necessary to pick the Divergence button again. This time the resulting screen looks like:

As there are only two items lacking a parent at this point, both "East" and "Parent_1" are automatically checked. One can still edit the name, of course.

Accepting "Parent_2" leads to the fully populated Divergence `Data Partitions` tab with the `Divergence` button reading "Done"

By the way, if this was all a horrible mistake, just pick the `Divergence` button again and it will shut Divergence off and delete all the parent information.

### Divergence-Migration Matrix

When Divergence definition is done the `Migration Matrix` tab displays the Divergence-Migration Matrix. It has an identical form to the Migration Matrix except there are now rows and columns for the parent populations. If you had done any edits in the Migration Matrix before turning Divergence on, they will still be present. And if you turn Divergence off, the edits in the Population part of the matrix will not change, though the Parent part of the matrix will be lost.

[Technical note: Divergence-Migration is actually a different Force from Migration. This is probably irrelevant to the average user but has serious internal consequences for the software.]

One thing that looks different about the Divergence-Migration Matrix is there are "invalid" cells off the diagonal. This is because it is impossible to have migration between populations if they don't exist at the same time. In this case, "North" and "South" are children of "Parent_1" and thus do not exist until "Parent_1" disappears.

Also note that the matrix has "invalid" in the entire bottom row and last column. This is because there are no other populations defined after the final parent "Parent_2" is defined, so migration cannot occur. Conceptually one could leave "Parent_2" off the matrix, but this format makes clear what is going on and is consistent with the Migration Matrix for a single population, which has a single "invalid" cell in it.

Editing the individual cells is exactly the same as the Migration Matrix discussed previously.

(Back | Contents | Next)