Learn R Programming

rphast (version 1.6.9)

base.freq.msa: Get the frequencies of characters in an alignment

Description

Get the frequencies of characters in an alignment

Usage

base.freq.msa(x, seq = NULL, ignore.missing = TRUE, ignore.gaps = TRUE)

Arguments

x

An object of type msa

seq

A vector of character strings identifying the sequence(s) to get base frequencies for. If NULL, use all sequences.

ignore.missing

If TRUE, ignore missing data characters ("N" and "?"). Must be TRUE if seq is stored as a pointer.

ignore.gaps

If TRUE, ignore gaps. Must be TRUE if seq is stored as a pointer.

Value

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.

See Also

statfreq.msa, which gets observed frequencies of states in an alignment with respect to a substitution model, and works for pointers.