For a set of m sequences (or taxa), there are m(m-1)/2 pairwise distances. These distances can be arranged either in the lower-left or in the upper-right triangular matrix. After writing the #mega,!Title,!Description, and !Format commands (some of which are optional), you then need to write all the taxa names (see below). Taxa names are followed by the distance matrix. An example of a matrix is:
#one
#two
#three
#four
#five
1.0 2.0 3.0 4.0
3.0 2.5 4.6
1.3 3.6
4.2
In the above example, pairwise distances are written in the upper triangular matrix (upper-right format). Two alternate distance matrix formats are:
Lower-left matrix |
Upper-right matrix |
||||||
d12 |
|
|
|
d12 |
d13 |
d14 |
d15 |
d13 |
d23 |
|
|
|
d23 |
d24 |
d25 |
d14 |
d24 |
d34 |
|
|
|
d34 |
d35 |
d15 |
d25 |
d35 |
d45 |
|
|
|
d45 |