palindromes
Find palindromes in sequence
Syntax
[Position, Length]
= palindromes(SeqNT)
[Position, Length, Pal]
= palindromes(SeqNT)
... = palindromes(SeqNT,
..., 'Length', LengthValue, ...)
... = palindromes(SeqNT,
..., 'Complement', ComplementValue, ...)
Arguments
SeqNT | One of the following:
|
LengthValue | Integer specifying a minimum length for palindromes. Default
is 6. |
ComplementValue | Controls the return of complementary palindromes, that is,
where the elements match their complementary pairs A-T (or U)
and C-G instead of an exact nucleotide match.
Choices are true or false (default). |
Description
[ finds all
palindromes in sequence Position, Length]
= palindromes(SeqNT)SeqNT with a length
greater than or equal to 6, and returns the starting
indices, Position, and the lengths of the
palindromes, Length.
[ also returns
a cell array, Position, Length, Pal]
= palindromes(SeqNT)Pal, of the palindromes.
... = palindromes( calls SeqNT,
...'PropertyName', PropertyValue,
...)palindromes with optional
properties that use property name/property value pairs. You can specify
one or more properties in any order. Each PropertyName must
be enclosed in single quotation marks and is case insensitive. These
property name/property value pairs are as follows:
... = palindromes( finds
all palindromes longer than or equal to SeqNT,
..., 'Length', LengthValue, ...)LengthValue.
Default is 6.
... = palindromes( controls
the return of complementary palindromes, that is, where the elements
match their complementary pairs SeqNT,
..., 'Complement', ComplementValue, ...)A-T (or A-U)
and C-G instead of an exact nucleotide match.
Choices for ComplementValue are true or false (default).
Examples
Find the palindromes in a simple nucleotide sequence.
[p,l,s] = palindromes('GCTAGTAACGTATATATAAT')
p =
11
12
l =
7
7
s =
'TATATAT'
'ATATATA'
Find the complementary palindromes in a simple nucleotide sequence.
[pc,lc,sc] = palindromes('TAGCTTGTCACTGAGGCCA',... 'Complement',true) pc = 8 lc = 7 sc = 'TCACTGA'
Find the palindromes in a random nucleotide sequence.
a = randseq(100)
a =
TAGCTTCATCGTTGACTTCTACTAA
AAGCAAGCTCCTGAGTAGCTGGCCA
AGCGAGCTTGCTTGTGCCCGGCTGC
GGCGGTTGTATCCTGAATACGCCAT
[pos,len,pal]=palindromes(a)
pos =
74
len =
6
pal =
'GCGGCG'
Version History
Introduced before R2006a
See Also
seqcomplement | seqrcomplement | seqreverse | regexp | strfind