nmercount

Count the number of n-mers in a nucleotide or amino acid sequence

Syntax

nmercount(Seq, Length)

Arguments

Seq

Nucleotide or amino acid sequence. Enter a character string or a structure with the field Sequence.

Length

Length of n-mer to count. Enter an integer.

Description

nmercount(Seq, Length) counts the number of n-mers or patterns of a specific length in a sequence.

Examples

Count the number of n-mers in an amino acid sequence and display the first six rows in the cell array.

S = getgenpept('AAA59174','SequenceOnly',true)
nmers = nmercount(S,4);
nmers(1:6,:)

ans = 
    'apes'    [2]
    'dfrd'    [2]
    'eslk'    [2]
    'frdl'    [2]
    'gnys'    [2]
    'lkel'    [2]

See Also

Bioinformatics Toolbox functions basecount, codoncount, dimercount


© 1994-2005 The MathWorks, Inc.