map | R Documentation |
Assigns match and insert states to alignment columns using the maximum a posteriori algorithm outlined in Durbin et al (1998) chapter 5.7.
map( x, seqweights = NULL, residues = NULL, gap = "-", endchar = "?", pseudocounts = "background", lambda = 0, qa = NULL, qe = NULL, cpp = TRUE )
x |
a matrix of aligned sequences. Accepted modes are "character" and "raw" (the latter being used for "DNAbin" and "AAbin" objects). |
seqweights |
either NULL (default; all sequences are given
weights of 1) or a numeric vector the same length as |
residues |
either NULL (default; emitted residues are automatically
detected from the sequences), a case sensitive character vector
specifying the residue alphabet, or one of the character strings
"RNA", "DNA", "AA", "AMINO". Note that the default option can be slow for
large lists of character vectors. Furthermore, the default setting
|
gap |
the character used to represent gaps in the alignment matrix
(if applicable). Ignored for |
endchar |
the character used to represent unknown residues in
the alignment matrix (if applicable). Ignored for |
pseudocounts |
character string, either "background", Laplace"
or "none". Used to account for the possible absence of certain
transition and/or emission types in the input sequences.
If |
lambda |
penalty parameter used to favour models with fewer match states. Equivalent to the log of the prior probability of marking each column (Durbin et al 1998, chapter 5.7). |
qa |
an optional named 9-element vector of background transition
probabilities with |
qe |
an optional named vector of background emission probabilities
the same length as the residue alphabet (i.e. 4 for nucleotides and 20
for amino acids) and with corresponding names (i.e. |
cpp |
logical, indicates whether the dynamic programming matrix should be filled using compiled C++ functions (default; many times faster). The FALSE option is primarily retained for bug fixing and experimentation. |
see Durbin et al (1998) chapter 5.7 for details of the maximum a posteriori algorithm for optial match and insert state assignment.
a logical vector with length = ncol(x) indicating the columns to be
assigned as match states (TRUE
) and those assigned as inserts
(FALSE
).
Shaun Wilkinson
Durbin R, Eddy SR, Krogh A, Mitchison G (1998) Biological sequence analysis: probabilistic models of proteins and nucleic acids. Cambridge University Press, Cambridge, United Kingdom.
derivePHMM
## Maximum a posteriori assignment of match states to the small ## alignment example in Figure 5.3, Durbin et al (1998) data(globins) map(globins)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.