showalignment

(To be removed) Display color-coded sequence alignment

showalignment will be removed in a future release.

Syntax

showalignment(Alignment)
showalignment(..., 'MatchColor', MatchColorValue, ...)
showalignment(..., 'SimilarColor' SimilarColorValue, ...)
showalignment(..., 'StartPointers', StartPointersValue, ...)
showalignment(..., 'Columns', ColumnsValue, ...)
showalignment(..., 'TerminalGap', TerminalGapValue, ...)

Description

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.

Input Arguments

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:

  • Three-element numeric vector of RGB values

  • Character vector or string containing a predefined single-letter color code

  • Character vector or string containing a predefined color name

For example, to use cyan, enter [0 1 1], 'c', or 'cyan'. For more information on specifying colors, see Color Options.

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:

  • Three-element numeric vector of RGB values

  • Character vector or string containing a predefined single-letter color code

  • Character vector or string containing a predefined color name

For example, to use cyan, enter [0 1 1], 'c', or 'cyan'. For more information on specifying colors, see Color Options.

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.

Tip

You can use the third output returned by swalign as the StartPointersValue.

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.

Examples

Display a pairwise sequence alignment:

Notice that for pairwise sequence alignments, matching and similar characters appear in red and magenta respectively..

Display a multiple sequence alignment

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 seqalignviewer function.

More About

collapse all

Color Options

The following lists the predefined colors and their RGB triplet equivalents. The short names and long names are character vectors that specify one of eight preset colors. The RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color; the intensities must be in the range [0 1].

RGB Triplet

Short Name

Long Name

[1 1 0]

y

yellow

[1 0 1]

m

magenta

[0 1 1]

c

cyan

[1 0 0]

r

red

[0 1 0]

g

green

[0 0 1]

b

blue

[1 1 1]

w

white

[0 0 0]

k

black

Alternatives

You can also display a multiple or pairwise sequence alignment using the seqalignviewer function. The alignment displays in the Biological Sequence Alignment window, where you can view and interactively adjust a sequence alignment.

Compatibility Considerations

expand all

Warns starting in R2020b

Introduced before R2006a