Learn R Programming

poppr (version 1.1.5)

aboot: Calculate a dendrogram with bootstrap support using any distance applicable to genind or genclone objects.

Description

Calculate a dendrogram with bootstrap support using any distance applicable to genind or genclone objects.

Usage

aboot(x, tree = "upgma", distance = "nei.dist", sample = 100,
  cutoff = 0, showtree = TRUE, missing = "mean", mcutoff = 0,
  quiet = FALSE, ...)

Arguments

x
a genind, genclone, or matrix object.
tree
one of "upgma" (Default) or "nj" defining the type of dendrogram to be produced, UPGMA or Neighbor-Joining.
distance
a character or function defining the distance to be applied to x. Defaults to nei.dist.
sample
An integer representing the number of bootstrap replicates Default is 100.
cutoff
An integer from 0 to 100 setting the cutoff value to return the bootstrap values on the nodes. Default is 0.
showtree
If TRUE (Default), a dendrogram will be plotted. If FALSE, nothing will be plotted.
missing
any method to be used by missingno: "mean" (default), "zero", "loci", "genotype", or "ignore".
mcutoff
a value between 0 (default) and 1 defining the percentage of tolerable missing data if the missing parameter is set to "loci" or "genotype". This should only be set if the distance metric can handle missing data.
quiet
if FALSE (default), a progress bar will be printed to screen.
...
any parameters to be passed off to the distance method.

Value

  • an object of class phylo.

Details

This function utilizes an internal class called bootgen that allows bootstrapping of objects that inherit the genind class. This is necessary due to the fact that columns in the genind matrix are defined as alleles and are thus interrelated. This function will specifically bootstrap loci so that results are biologically relevant. With this function, the user can also define a custom distance to be performed on the genind or genclone object.

See Also

nei.dist edwards.dist rogers.dist reynolds.dist provesti.dist diss.dist bruvo.boot boot.phylo dist.genpop dist

Examples

Run this code
data(nancycats)
nan9 <- popsub(nancycats, 9)

set.seed(9999)
# Generate a tree using nei's distance
neinan <- aboot(nan9, dist = nei.dist)

set.seed(9999)
# Generate a tree using custom distance
bindist <- function(x) dist(x$tab, method = "binary")
binnan <- aboot(nan9, dist = bindist)

# AFLP data
data(Aeut)

# Nei's distance
anei <- aboot(Aeut, dist = nei.dist, sample = 1000, cutoff = 50)

# Rogers' distance
arog <- aboot(Aeut, dist = rogers.dist, sample = 1000, cutoff = 50)

# This can also be run on genpop objects
Aeut.gc <- as.genclone(Aeut, hierarchy=other(Aeut)$population_hierarchy[-1])
setpop(Aeut.gc) <- ~Pop/Subpop
Aeut.pop <- genind2genpop(Aeut.gc)
set.seed(5000)
aboot(Aeut.pop) # compare to Grunwald et al. 2006

Run the code above in your browser using DataLab