amova
(ade4) and
amova
(pegas) for details on the specific
implementation.poppr.amova(x, hier = NULL, clonecorrect = FALSE, within = TRUE,
dist = NULL, squared = TRUE, correction = "quasieuclid", sep = "_",
filter = FALSE, threshold = 0, algorithm = "farthest_neighbor",
missing = "loci", cutoff = 0.05, quiet = FALSE, method = c("ade4",
"pegas"), nperm = 0)
genind
or genclone
objectformula
that defines your population
hierarchy. (e.g.: ~Population/Subpopulation). See Details below.logical
if TRUE
, the data set will be clone
corrected with respect to the lowest level of the hierarchy. The default is
set to FALSE
. See clonecorrect
for detailslogical
. When this is set to TRUE
(Default),
variance within individuals are calculated as well. If this is set to
FALSE
, The lowest level of the hierarchy will be the sample level.
See Details below.NULL
(default), the raw pairwise distances will be calculated
via diss.dist
.character
defining the correction method for
non-euclidean distances. Options are quasieuclid
(Default), lingoes
, and
logical
When set to TRUE
, mlg.filter will be run
to determine genotypes from the distance matrix. It defaults to
FALSE
. You can set the parameters with algorithm
and
threshold
arguments. Nmissingno
. Default is
"loci"
.missingno
for details.logical
If FALSE
(Default), messages regarding any
corrections will be printed to the screen. If TRUE
, no messages will
be printed.amova
from the ade4 package. See
amova
for details.amova
class list
that contains the results in the first four elements. The inputs are
contained in the last three elements. The inputs required for the ade4
implementation are:
genind
object, but can be daunting for a novice R user. This function
automates the entire process. Since there are many variables regarding
genetic data, some points need to be highlighted:
genind
and
genclone
} objects. They are useful for defining the
population factor for your data. See the function strata
for
details on how to properly define these strata. within = TRUE
, poppr will split diploid
genotypes into haplotypes and use those to calculate within-individual
variance. No estimation of phase is made. This acts much like the default
settings for AMOVA in the Arlequin software package. Within individual
variance will not be calculated for haploid individuals or dominant
markers.}
quasieuclid
, lingoes
, and
cailliez
. The correction of these distances should not
adversely affect the outcome of the analysis.}
mlg.filter
. This can necessarily only be done AMOVA tests
that do not account for within-individual variance. The distance matrix used
to calculate the amova is derived from using mlg.filter
with
the option stats = "distance"
, which reports the distance between
multilocus genotype clusters. One useful way to utilize this feature is to
correct for genotypes that have equivalent distance due to missing data.
(See example below.)}
within = TRUE
) in the
pegas implementation. If you want to perform permutation analyses on the
pegas implementation, you must set within = FALSE
. In addition,
while clone correction is implemented for both methods, filtering is only
implemented for the ade4 version.}
amova
(ade4) amova
(pegas)
clonecorrect
diss.dist
missingno
is.euclid
strata
data(Aeut)
strata(Aeut) <- other(Aeut)$population_hierarchy[-1]
agc <- as.genclone(Aeut)
agc
amova.result <- poppr.amova(agc, ~Pop/Subpop)
amova.result
amova.test <- randtest(amova.result) # Test for significance
plot(amova.test)
amova.test
# You can get the same results with the pegas implementation
amova.pegas <- poppr.amova(agc, ~Pop/Subpop, method = "pegas")
amova.pegas
amova.pegas$varcomp/sum(amova.pegas$varcomp)
# Clone correction is possible
amova.cc.result <- poppr.amova(agc, ~Pop/Subpop, clonecorrect = TRUE)
amova.cc.result
amova.cc.test <- randtest(amova.cc.result)
plot(amova.cc.test)
amova.cc.test
# Example with filtering
data(monpop)
splitStrata(monpop) <- ~Tree/Year/Symptom
poppr.amova(monpop, ~Symptom/Year) # gets a warning of zero distances
poppr.amova(monpop, ~Symptom/Year, filter = TRUE, threshold = 0.1) # no warning
Run the code above in your browser using DataLab