Main Content

seqdotplot

Create dot plot of two sequences

Description

seqdotplot(Seq1,Seq2) plots a figure that visualizes the match between two sequences.

seqdotplot(Seq1,Seq2,Window,Number) plots sequence matches when at least Number matches occur in a window of size Window. When plotting nucleotide sequences, start with a Window of 11 and Number of 7.

Matches = seqdotplot(___) returns the number of dots in the dot plot matrix for any of the input argument combinations in the previous syntaxes.

example

[Matches,Matrix] = seqdotplot(___) returns the dot plot as a sparse matrix for any of the input argument combinations in the previous syntaxes.

Examples

collapse all

This example shows the similarities between the prion protein (PrP) nucleotide sequences of two ruminants, the moufflon and the golden takin.

Retrieve the nucleotide sequence of the prion protein (PrP) for the moufflon from the GenBank database.

moufflon = getgenbank('AB060288',Sequence=true);

Retrieve the nucleotide sequence of the prion protein (PrP) for the golden takin from GenBank.

takin = getgenbank('AB060290',Sequence=true);

Generate a dot plot to visually compare the sequences of moufflon and takin.The window size is set to 11 and the step size is set to 7 for the comparison. Find the number of dots in the dot plot matrix.

Matches= seqdotplot(moufflon,takin,11,7)
Warning: Match matrix has more points than available screen pixels.
         Scaling image by factors of 1 in X and 2 in Y.

Figure contains an axes object. The axes object with xlabel Sequence 2, ylabel Sequence 1 contains an object of type image.

Matches = 5552

Input Arguments

collapse all

Nucleotide or amino acid sequences, specified as a character vector, string, or structure with the field Sequence.

Data Types: char | string | struct

Nucleotide or amino acid sequences, specified as a character vector, string, or structure with the field Sequence.

Data Types: char | string | struct

Size of a window, specified as an integer.

Data Types: double

Number of characters within the window that match, specified as an integer.

Data Types: double

Output Arguments

collapse all

Number of dots in the dot plot matrix, returned as an integer.

Dot plot, returned as a sparse matrix.

Version History

Introduced before R2006a

See Also

|