Learn R Programming

dartR (version 1.9.9.1)

gl.tree.nj: Output an nj tree to summarize genetic similarity among populations

Description

This function is a wrapper for the nj{ape} function applied to Euclidian distances calculated from the genlight object.

Usage

gl.tree.nj(
  x,
  type = "phylogram",
  outgroup = NULL,
  labelsize = 0.7,
  treefile = NULL,
  verbose = NULL
)

Arguments

x

-- name of the genlight object containing the SNP data [required]

type

-- Type of dendrogram phylogram|cladogram|fan|unrooted [Default Phylogram]

outgroup

-- Vector containing the population names that are the outgroups [Default NULL]

labelsize

-- Size of the labels as a proportion of the graphics default [Default 0.7]

treefile

-- Name of the file for the tree topology using Newick format [Default NULL].

verbose

-- specify the level of verbosity: 0, silent, fatal errors only; 1, flag function begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Value

A tree file of class phylo

Examples

Run this code
# NOT RUN {
# SNP data
  gl.tree.nj(testset.gl,type="fan")
# Tag P/A data
  gl.tree.nj(testset.gs,type="fan")
# }

Run the code above in your browser using DataLab