Get the frequencies of characters in an alignment
base.freq.msa(x, seq = NULL, ignore.missing = TRUE, ignore.gaps = TRUE)
An object of type msa
A vector of character strings identifying the sequence(s)
to get base frequencies for. If NULL
, use all sequences.
If TRUE, ignore missing data characters ("N" and "?"). Must be TRUE if seq is stored as a pointer.
If TRUE, ignore gaps. Must be TRUE if seq is stored as a pointer.
A data frame with one row for each unique state (usually "A", "C", "G", "T", and possibly "N", "?", "-", counts for each state, and overall frequency of each state.
statfreq.msa
, which gets observed frequencies of states
in an alignment with respect to a substitution model, and works for
pointers.