baseFreqs: Base Frequencies

Description Usage Arguments Value Author(s) Examples

View source: R/baseFreqs.R

Description

Calculate nucleotide base frequencies along a sequence.

Usage

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

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 site frequencies.

simplify

if there is a single locus, return result in a simplified form? If FALSE a list will be returned wth one element per locus.

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.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

1
2
3
4
5
6
7
8
data(dloop.g)
bf <- baseFreqs(dloop.g)

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

# Base composition
bf$base.freqs

strataG documentation built on Feb. 28, 2020, 9:07 a.m.