Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

aacount

Count amino acids in sequence

Syntax

AAStruct = aacount(SeqAA)
AAStruct = aacount(SeqAA, ...'Ambiguous', AmbiguousValue, ...)
AAStruct = aacount(SeqAA, ...'Gaps', GapsValue, ...)
AAStruct = aacount(SeqAA, ...'Chart', ChartValue, ...)

Input Arguments

SeqAA

One of the following:

Examples: 'ARN' or [1 2 3]

AmbiguousValue

Character vector specifying how to treat ambiguous amino acid characters (B, Z, or X). Choices are:

  • 'ignore' (default) — Skips ambiguous characters

  • 'bundle' — Counts ambiguous characters and reports the total count in the Ambiguous field.

  • 'prorate' — Counts ambiguous characters and distributes them proportionately in the appropriate fields. For example, the counts for the character B are distributed evenly between the D and N fields.

  • 'individual' — Counts ambiguous characters and reports them in individual fields.

  • 'warn' — Skips ambiguous characters symbols and displays a warning.

GapsValue

Specifies whether gaps, indicated by a hyphen (-), are counted or ignored. Choices are true or false (default).

ChartValueCharacter vector specifying a chart type. Choices are 'pie' or 'bar'.

Output Arguments

AAStruct1-by-1 MATLAB structure containing fields for the standard 20 amino acids (A, R, N, D, C, Q, E, G, H, I, L, K, M, F, P, S, T, W, Y, and V).

Description

AAStruct = aacount(SeqAA) counts the number of each type of amino acid in SeqAA, an amino acid sequence, and returns the counts in AAStruct, a 1-by-1 MATLAB structure containing fields for the standard 20 amino acids (A, R, N, D, C, Q, E, G, H, I, L, K, M, F, P, S, T, W, Y, and V).

  • Ambiguous amino acid characters (B, Z, or X), gaps, indicated by a hyphen (-), and end terminators (*) are ignored by default.

  • Unrecognized characters are ignored and cause the following warning message.

    Warning: Unknown symbols appear in the sequence. These will be ignored.

AAStruct = aacount(SeqAA, ...'PropertyName', PropertyValue, ...) calls aacount 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:

AAStruct = aacount(SeqAA, ...'Ambiguous', AmbiguousValue, ...) specifies how to treat ambiguous amino acid characters (B, Z, or X). Choices are:

  • 'ignore' (default)

  • 'bundle'

  • 'prorate'

  • 'individual'

  • 'warn'

AAStruct = aacount(SeqAA, ...'Gaps', GapsValue, ...) specifies whether gaps, indicated by a hyphen (-), are counted or ignored. Choices are true or false (default).

AAStruct = aacount(SeqAA, ...'Chart', ChartValue, ...) creates a chart showing the relative proportions of the amino acids. ChartValue can be 'pie' or 'bar'.

Examples

collapse all

Use the fastaread function to load the sequence of the human p53 tumor protein.

p53 = fastaread('p53aa.txt')
p53 = 

  struct with fields:

      Header: 'gi|8400738|ref|NP_000537.2| tumor protein p53 [Homo sapiens]'
    Sequence: 'MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPRVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD'

Count the amino acids in the sequence, and display the results in a pie chart.

count = aacount(p53,'Chart','pie');

Introduced before R2006a

Was this topic helpful?