| Contents | Index |
AlignStruct = localalign(Seq1, Seq2)
AlignStruct = localalign(Seq1, Seq2,
...'NumAln', NumAlnValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'MinScore', MinScoreValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'Percent', PercentValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'DoAlignment', DoAlignmentValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'Alphabet', AlphabetValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'ScoringMatrix', ScoringMatrixValue,
...)
AlignStruct = localalign(Seq1, Seq2,
...'Scale', ScaleValue, ...)
AlignStruct = localalign(Seq1, Seq2,
...'GapOpen', GapOpenValue, ...)
AlignStruct = localalign(Seq1, Seq2) returns information about the first optimal (highest scoring) local alignment between two sequences in a MATLAB structure.
AlignStruct = localalign(Seq1, Seq2, ...'PropertyName', PropertyValue, ...) calls localalign 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:
AlignStruct = localalign(Seq1, Seq2, ...'NumAln', NumAlnValue, ...) returns information about one or more nonintersecting, local alignments (optimal and suboptimal). It limits the number of alignments to return by specifying the number of local alignments to return. It returns the alignments in decreasing order according to their score.
AlignStruct = localalign(Seq1, Seq2, ...'MinScore', MinScoreValue, ...) returns information about nonintersecting, local alignments (optimal and suboptimal), whose score is greater than MinScoreValue.
AlignStruct = localalign(Seq1, Seq2, ...'Percent', PercentValue, ...) returns information about one or more nonintersecting local alignments (optimal and suboptimal), whose scores are within PercentValue percent of the highest score. It returns the alignments in decreasing order according to their score.
AlignStruct = localalign(Seq1, Seq2, ...'DoAlignment', DoAlignmentValue, ...) specifies whether to include the pairwise alignments in the Alignment field of the output structure. Choices are true (default) or false.
AlignStruct = localalign(Seq1, Seq2, ...'Alphabet', AlphabetValue, ...) specifies the type of sequences. Choices are 'AA' (default) or 'NT'.
AlignStruct = localalign(Seq1, Seq2, ...'ScoringMatrix', ScoringMatrixValue, ...) specifies the scoring matrix to use for the local alignment.
AlignStruct = localalign(Seq1, Seq2, ...'Scale', ScaleValue, ...) specifies a scale factor applied to the output scores, thereby controlling the units of the output scores. Choices are any positive value. Default is 1, which does not change the units of the output score.
AlignStruct = localalign(Seq1, Seq2, ...'GapOpen', GapOpenValue, ...) specifies the penalty for opening a gap in the alignment. Choices are any positive value. Default is 8.
Seq1 |
First amino acid or nucleotide sequence specified by any of the following:
| |
Seq2 |
Second amino acid or nucleotide sequence, which localalign aligns with Seq1. | |
NumAlnValue |
Positive scalar (< or = 2^12) specifying the number of alignments to return. localalign returns the top NumAlnValue local, nonintersecting alignments (optimal and suboptimal). If the number of optimal alignments is greater than NumAlnValue, then localalign returns the first NumAlnValue alignments based on their order in the trace back matrix.
Default: 1 | |
MinScoreValue |
Positive scalar specifying the minimum score of local, nonintersecting alignments (optimal and suboptimal) to return. | |
PercentValue |
Positive scalar between 0 and 100 that limits the return of local, nonintersecting alignments (optimal and suboptimal) to those alignments with a score within PercentValue percent of the highest score. For example, if the highest score is 10.5 and you specify 5 for PercentValue, then localalign determines a minimum score of 10.5 – (10.5 * 0.05) = 9.975. It returns all alignments with a score of 9.975 or higher. | |
DoAlignmentValue |
Controls the inclusion of the pairwise alignments in the Alignment field of the output structure. Choices are true (default) or false. | |
AlphabetValue |
String specifying the type of sequences. Choices are 'AA' (default) or 'NT'. | |
ScoringMatrixValue |
Either of the following:
| |
ScaleValue |
Positive value that specifies a scale factor that is applied to the output scores, thereby controlling the units of the output scores. For example, if the output score is initially determined in bits, and you enter log(2) for ScaleValue, then localalign returns Score in nats. Default is 1, which does not change the units of the output score. | |
GapOpenValue |
Positive value specifying the penalty for opening a gap in the alignment. Default: 8 |
Alignments having no matches or mismatches in common.
An alignment with the highest score.
An alignment with a score less than the highest score.
Limit the number of alignments to return between two sequences by specifying the number of alignments:
% Create variables containing two amino acid sequences.
Seq1 = 'VSPAGMASGYDPGKA';
Seq2 = 'IPGKATREYDVSPAG';
% Use the NumAln property to return information about the
% top three local alignments.
struct1 = localalign(Seq1, Seq2, 'numaln', 3)
struct1 =
Score: [3x1 double]
Start: [3x2 double]
Stop: [3x2 double]
Alignment: {3x1 cell}
% View the scores of the first and second alignments.
struct1.Score(1:2)
ans =
11.0000
9.6667
% View the first alignment.
struct1.Alignment{1}
ans =
VSPAG
|||||
VSPAGLimit the number of alignments to return between two sequences by specifying a minimum score:
% Create variables containing two amino acid sequences.
Seq1 = 'VSPAGMASGYDPGKA';
Seq2 = 'IPGKATREYDVSPAG';
% Use the MinScore property to return information about
% only local alignments with a score greater than 8.
% Use the DoAlignment property to exclude the actual alignments.
struct2 = localalign(Seq1,Seq2,'minscore',8,'doalignment',false)
struct2 =
Score: [2x1 double]
Start: [2x2 double]
Stop: [2x2 double]Limit the number of alignments to return between two sequences by specifying a percentage from the maximum score:
% Create variables containing two amino acid sequences.
Seq1 = 'VSPAGMASGYDPGKA';
Seq2 = 'IPGKATREYDVSPAG';
% Use the Percent property to return information about only
% local alignments with a score within 15% of the maximum score.
struct3 = localalign(Seq1, Seq2, 'percent', 15)
struct3 =
Score: [2x1 double]
Start: [2x2 double]
Stop: [2x2 double]
Alignment: {2x1 cell}
Specify a scoring matrix and gap opening penalty when aligning two sequences:
% Create variables containing two nucleotide sequences.
Seq1 = 'CCAATCTACTACTGCTTGCAGTAC';
Seq2 = 'AGTCCGAGGGCTACTCTACTGAAC';
% Create a scoring matrix with a match score of 10 and a mismatch
% score of -9
sm = [10 -9 -9 -9;
-9 10 -9 -9;
-9 -9 10 -9;
-9 -9 -9 10];
% Use the ScoringMatrix and GapOpen properties when returning
% information about the top three local alignments.
struct4 = localalign(Seq1, Seq2, 'alpha', 'nt', ...
'scoringmatrix', sm, 'gapopen', 20, 'numaln', 3)
struct4 =
Score: [3x1 double]
Start: [3x2 double]
Stop: [3x2 double]
Alignment: {3x1 cell} [1] Barton, G. (1993). An efficient algorithm to locate all locally optimal alignments between two sequences allowing for gaps. CABIOS 9, 729–734.
blosum | dayhoff | gonnet | nuc44 | nwalign | pam | showalignment | swalign

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |