5 \title{Base frequencies from DNA Sequences}
7 \code{base.freq} computes the frequencies (absolute or relative) of
8 the four DNA bases (adenine, cytosine, guanine, and thymidine) from a
11 \code{GC.content} computes the proportion of G+C (using the previous
12 function). All missing or unknown sites are ignored.
14 \code{Ftab} computes the contingency table with the absolute
15 frequencies of the DNA bases from a pair of sequences.
18 base.freq(x, freq = FALSE, all = FALSE)
23 \item{x}{a vector, a matrix, or a list which contains the DNA
25 \item{y}{a vector with a single DNA sequence.}
26 \item{freq}{a logical specifying whether to return the proportions
27 (the default) or the absolute frequencies (counts).}
28 \item{all}{a logical; by default only the counts of A, C, G, and T are
29 returned. If \code{all = TRUE}, all counts of bases, ambiguous codes,
30 missing data, and alignment gaps are returned.}
33 The base frequencies are computed over all sequences in the
36 For \code{Ftab}, if the argument \code{y} is given then both \code{x}
37 and \code{y} are coerced as vectors and must be of equal length. If
38 \code{y} is not given, \code{x} must be a matrix or a list and only
39 the two first sequences are used.
42 A numeric vector with names \code{c("a", "c", "g", "t")} (and possibly
43 \code{"r", "m", ...}, a single numeric value, or a four by four matrix
44 with similar dimnames.
46 \author{Emmanuel Paradis}
48 \code{\link{seg.sites}}, \code{\link[pegas]{nuc.div}},
54 base.freq(woodmouse, TRUE)
55 base.freq(woodmouse, TRUE, TRUE)
58 Ftab(woodmouse[1, ], woodmouse[2, ]) # same than above
59 Ftab(woodmouse[14:15, ]) # between the last two