seg.sites {ape} | R Documentation |
Find Segregating Sites in DNA Sequences
Description
This function gives the indices of segregating (polymorphic) sites in a sample of DNA sequences.
Usage
seg.sites(x, strict = FALSE, trailingGapsAsN = TRUE)
Arguments
x |
a matrix or a list which contains the DNA sequences. |
strict |
a logical value; if |
trailingGapsAsN |
a logical value; if |
Details
If the sequences are in a list, they must all be of the same length.
If strict = FALSE
(the default), the following rule is used to
determine if a site is polymorphic or not in the presence of ambiguous
bases: ‘A’ and ‘R’ are not interpreted as different, ‘A’ and ‘Y’ are
interpreted as different, and ‘N’ and any other base (ambiguous or
not) are interpreted as not different. If strict = TRUE
, all
letters are considered different.
Alignment gaps are considered different from all letters except for
the leading and trailing gaps if trailingGapsAsN = TRUE
(which
is the default).
Value
A numeric (integer) vector giving the indices of the segregating sites.
Author(s)
Emmanuel Paradis
See Also
base.freq
, theta.s
, nuc.div
(last two in pegas)
Examples
data(woodmouse)
y <- seg.sites(woodmouse)
y
length(y)