Skip to Main Content Skip to Search
Product Documentation

nmercount - Count n-mers in nucleotide or amino acid sequence

Syntax

Nmer = nmercount(Seq, Length)
Nmer = nmercount(Seq, Length, C)

Input Arguments

Seq

One of the following:

Length

Integer specifying the length of n-mer to count.

Output Arguments

NmerCell array containing the n-mer counts in Seq.

Description

Nmer = nmercount(Seq, Length) counts the n-mers or patterns of a specific length in Seq, a nucleotide sequence or amino acid sequence, and returns the n-mer counts in a cell array.

Nmer = nmercount(Seq, Length, C) returns only the n-mers with cardinality of at least C.

Examples

  1. Use the getgenpept function to retrieve the amino acid sequence for the human insulin receptor.

    S = getgenpept('AAA59174','SequenceOnly',true);
  2. Count the number of four-mers in the amino acid sequence and display the first 20 rows in the cell array.

    nmers = nmercount(S,4);
    nmers(1:20,:)
    
    ans = 
        'APES'    [2]
        'DFRD'    [2]
        'ESLK'    [2]
        'FRDL'    [2]
        'GNYS'    [2]
        'LKEL'    [2]
        'SHCQ'    [2]
        'SLKD'    [2]
        'SVRI'    [2]
        'TDYL'    [2]
        'TSLA'    [2]
        'TVIN'    [2]
        'VING'    [2]
        'VPLD'    [2]
        'YALV'    [2]
        'AAAA'    [1]
        'AAAP'    [1]
        'AAEI'    [1]
        'AAEL'    [1]
        'AAFP'    [1]
    

See Also

aacount | basecount | codoncount | dimercount

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS