| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Bioinformatics Toolbox |
| Contents | Index |
| Learn more about Bioinformatics Toolbox |
showalignment(Alignment)
showalignment(..., 'MatchColor', MatchColorValue,
...)
showalignment(..., 'SimilarColor' SimilarColorValue,
...)
showalignment(..., 'StartPointers', StartPointersValue,
...)
showalignment(..., 'Columns', ColumnsValue,
...)
showalignment(..., 'TerminalGap', TerminalGapValue,
...)
showalignment(Alignment) displays a color-coded sequence alignment in a MATLAB Figure window.
showalignment(..., 'PropertyName', PropertyValue, ...) calls showalignment with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Enclose each PropertyName in single quotation marks. Each PropertyName is case insensitive. These property name/property value pairs are as follows:
showalignment(..., 'MatchColor', MatchColorValue,
...) specifies the color to highlight matching characters
in the output display.
showalignment(..., 'SimilarColor' SimilarColorValue, ...) specifies the color to highlight similar characters in the output display.
showalignment(..., 'StartPointers', StartPointersValue, ...) specifies the starting indices in the original sequences of a local pairwise alignment.
showalignment(..., 'Columns', ColumnsValue, ...) specifies the number of characters to display in one row when displaying a pairwise alignment, and labels the start of each row with the sequence positions.
showalignment(..., 'TerminalGap', TerminalGapValue, ...) controls the inclusion or exclusion of terminal gaps from the count of matches and similar residues when displaying a pairwise alignment. TerminalGapValue can be true (default) or false.
Alignment |
Pairwise or multiple sequence alignment specified by one of the following:
|
MatchColorValue |
Color to highlight matching characters in the output display. Specify the color with one of the following:
For example, to use cyan, enter [0 1 1], 'c', or 'cyan'. For more information on specifying colors, see ColorSpec. Default: Red, which is specified by [1 0 0], 'r', or 'red' |
SimilarColorValue |
Color to highlight similar characters in the output display. Specify the color with one of the following:
For example, to use cyan, enter [0 1 1], 'c', or 'cyan'. For more information on specifying colors, see ColorSpec. Default: Magenta, which is specified by [1 0 1], 'm', or 'magenta' |
StartPointersValue |
Two-element vector that specifies the starting indices in the original sequences of a local pairwise alignment.
|
ColumnsValue |
Scalar that specifies the number of characters to display in one row when displaying a pairwise alignment. Default: 64 |
TerminalGapValue |
Specifies whether to include or exclude terminal gaps from the count of matches and similar residues when displaying a pairwise alignment. Choices are true (default) or false. |
Display a pairwise sequence alignment:
% Globally align two amino acid sequences
[Score, Alignment] = nwalign('VSPAGMASGYD','IPGKASYD');
% Display the color-coded alignment
showalignment(Alignment);

Notice that for pairwise sequence alignments, matching and similar characters appear in red and magenta respectively..
Display a multiple sequence alignment
% Read a multiple-sequence alignment file
gag = multialignread('aagag.aln');
% Display the color-coded alignment
showalignment(gag)

Notice that for multiple sequence alignments, highly conserved positions appear in red and conserved positions appear in magenta.
Tip To view a multiple-sequence alignment and interact with it, use the multialignviewer function. |
You can also display a multiple or pairwise sequence alignment using the multialignviewer function. The alignment displays in the Multiple Sequence Alignment Viewer window, where you can view and interactively adjust a sequence alignment.
ColorSpec | fastaread | gethmmalignment | localalign | multialign | multialignread | multialignviewer | nwalign | swalign
![]() | shortestpath (biograph) | showhmmprof | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |