gl.tree.nj: Outputs an nj tree to summarize genetic similarity among...

View source: R/gl.tree.nj.r

gl.tree.njR Documentation

Outputs an nj tree to summarize genetic similarity among populations

Description

This function is a wrapper for the nj function or package ape applied to Euclidean distances calculated from the genlight object.

Usage

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

Arguments

x

Name of the genlight object containing the SNP data [required].

d_mat

Distance matrix [default NULL].

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].

Details

An euclidean distance matrix is calculated by default [d_mat = NULL]. Optionally the user can use as input for the tree any other distance matrix using this parameter, see for example the function gl.dist.pop.

Value

A tree file of class phylo.

Author(s)

Custodian: Arthur Georges (Post to https://groups.google.com/d/forum/dartr)

Examples

 
# SNP data
  gl.tree.nj(testset.gl,type='fan')
# Tag P/A data
  gl.tree.nj(testset.gs,type='fan')
  
  res <- gl.tree.nj(platypus.gl)

green-striped-gecko/dartR documentation built on Sept. 7, 2024, 4:15 a.m.