Main Content

hmmprofgenerate

Generate random sequence drawn from profile hidden Markov model (HMM)

Syntax

Sequence = hmmprofgenerate(Model)
[Sequence, Profptr] = hmmprofgenerate(Model)
... = hmmprofgenerate(Model, ...'Align', AlignValue, ...)
... = hmmprofgenerate(Model, ...'Flanks', FlanksValue, ...)
... = hmmprofgenerate(Model, ...'Signature', SignatureValue, ...)

Arguments

Model

Hidden Markov model created with the hmmprofstruct function.

AlignValue

Controls the use of uppercase letters for matches and lowercase letters for inserted letters. Choices are true or false (default).

FlanksValue

Controls the inclusion of the symbols generated by the FLANKING INSERT states in the output sequence. Choices are true or false (default).

SignatureValue

Controls the return of the most likely path and symbols. Choices are true or false (default).

Description

Sequence = hmmprofgenerate(Model) returns a sequence of amino acids or nucleotides drawn from the profile Model. The length, alphabet, and probabilities of the Model are stored in a structure. For more information about this structure, see hmmprofstruct.

[Sequence, Profptr] = hmmprofgenerate(Model) returns a vector of the same length as the profile model pointing to the respective states in the output sequence. Null pointers (0) mean that such states do not exist in the output sequence, either because they are never touched (i.e., jumps from the BEGIN state to MATCH states or from MATCH states to the END state), or because DELETE states are not in the output sequence (not aligned output; see below).

... = hmmprofgenerate(Model, ...'PropertyName', PropertyValue, ...) calls hmmprofgenerate 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 quotes and is case insensitive. These property name/property value pairs are as follows:

... = hmmprofgenerate(Model, ...'Align', AlignValue, ...) if Align is true, the output sequence is aligned to the model as follows: uppercase letters and dashes correspond to MATCH and DELETE states respectively (the combined count is equal to the number of states in the model). Lowercase letters are emitted by the INSERT or FLANKING INSERT states. If AlignValue is false, the output is a sequence of uppercase symbols. The default value is true.

... = hmmprofgenerate(Model, ...'Flanks', FlanksValue, ...) if Flanks is true, the output sequence includes the symbols generated by the FLANKING INSERT states. The default value is false.

... = hmmprofgenerate(Model, ...'Signature', SignatureValue, ...) if SignatureValue is true, returns the most likely path and symbols. The default value is false.

Examples

load('hmm_model_examples','model_7tm_2') % load a model example
rand_sequence = hmmprofgenerate(model_7tm_2)

Version History

Introduced before R2006a