Learn R Programming

strataG (version 2.0.2)

baseFreqs: Base Frequencies

Description

Calculate nucleotide base frequencies along a sequence.

Usage

baseFreqs(x, bases = NULL, ignore = c("n", "x", "-", "."))

Arguments

x

a '>gtypes object with aligned sequences or a list of aligned DNA sequences.

bases

character vector of bases. Must contain valid IUPAC codes. If NULL, will return summary of frequencies of observed bases.

ignore

a character vector of bases to ignore when calculating frequencies.

Value

For each gene, a list containing:

site.freqs a matrix of base frequencies at each site.
base.freqs a vector of overall base proportion composition.

Examples

Run this code
# NOT RUN {
data(dloop.g)
bf <- baseFreqs(dloop.g)

# Frequencies of first 10 sites
bf$site.freqs[, 1:10]

# Base composition
bf$base.freqs

# }

Run the code above in your browser using DataLab