You can visually compare sequences in the alignment to one of the aligned sequences by using settings in MegAlign Pro’s Style panel to highlight differences or matches.

By default, the comparison is against the reference sequence, if you have specified one. Otherwise, the default is to compare sequences to the consensus. However, you can choose any sequence as the comparison sequence, and you can switch between comparisons without affecting subsequent alignments, the variant table, or the positions of the sequences in the Sequences view.

When might you want to do a comparison? Imagine that you have aligned a thousand CoV-2 genomes, and computed variants. All the viral strains are similar, and none of them is “special” enough to merit use as the reference for alignment or variant computation. In this case, a visual comparison is probably all you need.

To visually compare sequences in the Sequences view:

The following comparison applies to any alignment other than Mauve. Results are displayed in the Sequences view.

  1. Add sequences to the project.
  1. If desired, specify a reference by right-clicking on a sequence and choosing Use as Reference.
  1. Align the sequences using any algorithm. If you use Align > Align with Options and choose MAFFT, the Align Sequences dialog will give you a second chance to specify a reference.
  1. To make residues of interest stand out in the Sequences view, use the Multiple alignment section of the Style panel (View > Style > Multiple Alignment).

    • If a different comparison sequence is desired, use the Compare to drop-down menu.

    • Use the Alignment coloring drop-down menu to choose what to color and display. For example, you could choose to Color only differences from comparison sequence, Color only matches to comparison sequence, or Show only differences from comparison sequence.

    • If desired, check the box Differences from comparison sequence and choose one or more of the font-style options (Bold, Italic, Underline). This accentuates mismatches even more, even if you’ve coloring conserved or not conserved residues.

In the Sequences view, similarities/differences will appear as you specified in the Multiple alignment section.

To change which sequence is compared against in the Sequences view:

You can either:

  • Set a reference sequence by right-clicking a sequence in a view, and choosing Use as Reference.

Choosing a different comparison sequence affects only the Sequences view. It doesn’t cause sequences to be moved, impact the variant table, or affect subsequent alignments.

By contrast, specifying a reference sequence automatically sets it as the comparison sequence for the Sequences view. It also moves that sequence to the header of the view, making it easier to compare against any other sequence in the body of the view. The variant table will change to show either the variants based on the new reference, or a button for computing those variants. In addition, if you align the sequences in the project again and use MAFFT, the reference will be used for that alignment.

In the example below (image), the alignment was done with MAFFT using “Rat” as the reference. “Red Bread Mold” was chosen as the comparison sequence and Show only differences from comparison sequence was selected in the Style panel. Note that “Rat” continues to be used as the reference sequence (blue box). With this type of automatic coloring selected, it is easy to see that “Red Bread Mold” is the active comparison sequence (red), since it appears in normal black text throughout. In all other sequences, including the reference sequence, only differences from the comparison sequence are displayed (yellow).

To visually compare sequences in the Overview (Mauve alignments only):

For Mauve alignments, the Overview may show multiple aligned blocks on either forward or reverse strands. The blocks for the Overview comparison sequence are all drawn on the forward strand. Blocks for other sequences are drawn on the reverse strand if they align to the reverse-complement of the corresponding block in the comparison sequence.

You can change the Overview comparison sequence using the procedure below. This procedure is independent of any comparison performed in the Sequences view using the steps in the first section of this topic.

  1. Add sequences to the project.
  1. Align the sequences using Mauve.
  1. Choose which sequence should show all its blocks on the forward strand, using the Compare to drop-down menu in the Overview section of the Style panel (View > Style > Overview).

Need more help with this?

Thanks for your feedback.