Documentation Center

  • Trial Software
  • Product Updates


Visualize and edit multiple sequence alignment


  • seqalignviewer(___,'R2012b',true)
  • seqalignviewer('close')



seqalignviewer opens the Sequence Alignment app, where you can display and interactively adjust multiple sequence alignments.

seqalignviewer(Alignment) loads a group of previously multiply aligned sequences into the app, where you can view and interactively adjust the alignment.

seqalignviewer(Alignment,Name,Value) opens the app with additional options specified by one or more Name,Value pair arguments.

seqalignviewer(___,'R2012b',true) runs the previous version of the Sequence Alignment app, using any of the input arguments in previous syntaxes.

seqalignviewer('close') closes the Sequence Alignment app.

    Tip   If gaps are available after you have selected a block from aligned sequences, then there are three regions that you can drag and move horizontally:

    • Selected block

    • Block on the left of the selection

    • Block on the right of the selection


expand all

View a Multiple Sequence Alignment File

This example shows how to view a multiple sequence alignment file.

Load and view a multiple sequence alignment file.


Alternatively, you can click Sequence Alignment on the Apps tab to open the app, and view the alignment data.

Input Arguments

expand all

Alignment — Multiple sequence alignment (MSA) datastructure | character array | string | 3-by-N character array

Multiple sequence alignment (MSA) data, specified as:

  • MATLAB® structure containing a Sequence field, such as returned by fastaread, gethmmalignment, multialign, or multialignread

  • MATLAB character array containing MSA data, such as returned by multialign

  • String specifying a file or URL containing MSA data

  • 3-by-N character array showing the pairwise alignment of two sequences, such as returned by nwalign or swalign.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Alphabet','AA' specifies that the aligned sequences are amino acid sequences.

'Alphabet' — Type of aligned sequences'AA' | 'NT'

Type of aligned sequences, specified as 'AA' for amino acid sequences or 'NT' for nucleotide sequences. If you do not specify the type, seqalignviewer attempts to determine the correct type. If it cannot, it defaults to 'AA'.

Example: 'Alphabet','AA'

'SeqHeaders' — List of names to label sequences in alignment windowarray of structures containing a Header or Name field | cell array of strings

List of names to label the sequences in the alignment window, specified as a MATLAB array of structures containing a Header or Name field or cell array of strings. The number of elements in either array must be the same as the number of sequences in the alignment data Alignment.

Example: 'SeqHeaders',names


You can also display a color-coded multiple or pairwise sequence alignment using the showalignment function. However, the alignment displays in a MATLAB Figure window, where you cannot interact with it.

See Also

| | | | | | | | |

Was this topic helpful?