The Distance view shows a matrix (i.e., table) of numbers representing distances computed for each pair of sequences for the selected aligned block. Sequence distances are used as input in creating the phylogenetic tree shown in the Tree view. Selections within the Distance view are synchronized with other views in MegAlign Pro. Similarly, selections made elsewhere will be highlighted simultaneously in the Distance view.

The Distance view is only accessible after you have performed a multiple alignment, and becomes inaccessible again if you unalign the sequences. After performing an alignment, you can access the view by clicking on the Distance tab.

The upper-right and lower-left triangles of the matrix can show different information depending on Values selections made in the Distance section of the Style panel. For instance, in the image above, %Identity appears in the upper-right and Distance in the lower-left. Note that no numbers appear on the diagonal, since a sequence cannot differ from itself. In certain situations, it may not be possible to calculate distances for every pair of aligned sequences, in which case “NA” is displayed. In other cases, “NA” may be an artifact of the computational algorithm; for example, an attempt to calculate the log of a negative number.

If Identity is displayed, note that larger numbers correspond to greater differences between sequences. Uncorrected distances are always ≤1.0. However, the Kimura and Tamura-Nei values can exceed 1.0 because they reflect the inferred actual number of nucleotide substitutions or amino acid replacements per site, not the observed distance. When the divergence between a pair of sequence is greater than about 0.75, it may not be possible to calculate a value for corrected distance using the Kimura and Tamura-Nei metrics.


Information bar:

The blue/gray bar at the top of the view starts on the left end showing the color of the Block (multi-block Mauve alignments only). The rest of the information bar consists of information pertaining to the current selection.

Selection Example Information displayed
Nothing The distance calculation metric chosen via Distance > Parameters followed by the left-bottom Value and top-right Value chosen in the Distance section of the Style panel.
One sequence or a row/column header (letter) The name of the sequence and length in bp.
One table cell The number of sequences involved in the cell and their alignment status.


Tasks pertaining to the Distance view:

Task How To
Customize the look and layout of the Distance view See Customize the look and layout. Statistical metrics and fonts are set using the Distance section of the Style panel.
Search for a sequence by name Click the Search tool () on the right of the header area to open a search area. See Search for a sequence using a text query for details.
Change the method and/or parameters used to generate the distance table Click the Change Analysis Parameters tool ( ). This opens the Analysis Options dialog where you can specify the Metric and Gap Treatment. Another way to access the same dialog is to use Distance > Parameters.



Use the Metric drop-down menu to change the metric used to calculated distance. Note that metric selection is disabled for projects without sequences. Otherwise, choices include:

  • Uncorrected Pairwise Distance – (the default metric) – The number of identical bases (or residues) divided by the number of bases being compared, ignoring any positions with gaps). Uncorrected pairwise distance can be converted to %Identity using the formula: %ID = 100 * (1 – distance).

  • Kimura – (protein sequences only) – The Kimura model (1983), which should not be used for very divergent sequences, uses the formula: D = – ln (1 – p – 0.2 p2), where p is the uncorrected pairwise distance. The Kimura distance approximates the “PAM distance” used in MegAlign.

  • Scoredist – (protein sequences only) – This model, developed by Sonnhammer and Hollich (2005) computes the alignment score between two sequences using the BLOSUM62 scoring matrix. The units for the ScoreDist function are “percent accepted point mutations” (PAM). Scores are converted to distances and normalized by the average scores of the two sequences matched to them. This approach works even for very divergent sequences, providing that there are overlapping residues.

  • Tamura-Nei (1993) – (nucleotide sequences and low degrees of divergence only) – An estimate of divergence using the TN93 model of the evolutionary process. This model attempts to separately account for different rates of transversion mutations (e.g., purine ↔ pyrimidine) and the two categories of transition mutations (i.e., purine only A ↔ G; pyrimidine only C ↔ T). The frequencies of each type of nucleotide do not need to be the same.


    Use the Gap Treatment drop-down menu to specify when gaps should be ignored. Choices include:

  • Global gap removal – (default) This option ignores any column that contains a gap in any of the aligned sequences in the project. This is the only enabled option for MegAlign Pro projects created prior to the 12.0 release (spring 2014).

  • Pairwise gap removal – This option ignores any column that has a gap in either of the two sequences being compared.
Expand the header to show style tools Click the Show Style tool () to add a row below the current header that allows you to control the settings in the Distance section of the Style panel.



To minimize the row, click the tool again or use the Collapse tool (inverted ‘v’) on the right of the row.
Export data from the view Click the Export Data tool (), a shortcut to the File > Export Data subcommands. See Export data to a file.
See additional details in the view header To add a second row of header information, click the Show Quick Details tool ().




  • Sequences – The number of sequences in the alignment or in the active block.

  • Global/Pairwise gap removal – The gap treatment specified in the Distance section.

  • Residues considered – Total length of alignment minus all columns containing even a single gap. This field shows both the minimum and maximum number of residues considered, if they differ. The banners at the tops of the Distance and Tree views will show a range here if different numbers of residues are considered for different pairs of sequences. This happens frequently when Pairwise gap removal is checked. However, if the minimum and maximum values differ greatly, we recommend selecting Global gap removal instead
Display a tooltip with the name of the sequence corresponding to a cell Hover over any row/column header or any cell. For projects using Pairwise gap removal (see Distance section), the tool tip also contains the number of residues considered for that pair.

Select all cells in the table Choose Distance > Table > Select All.
Use editing commands with the Distance table Choose Distance > Table > Copy (Select All, Rename, Rename with Fields).
Freeze scrolling Choose Distance > Table > Freeze Scrolling Region. In a large table, this command allows you to compare rows near the top with those further down.

Need more help with this?
Contact DNASTAR

Thanks for your feedback.