Skip to contents

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 [deefault 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.

Author

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

Examples

 # \donttest{
# SNP data
  gl.tree.nj(testset.gl,type='fan')
#> Starting gl.tree.nj 
#>   Processing genlight object with SNP data
#>   Converting to a matrix of frequencies, locus by populations
#>   Computing Euclidean distances
#> 

#> Completed: gl.tree.nj 
#> 
#> 
#> Phylogenetic tree with 30 tips and 28 internal nodes.
#> 
#> Tip labels:
#>   EmmacBrisWive, EmmacBurdMist, EmmacBurnBara, EmmacClarJack, EmmacClarYate, EmmacCoopAvin, ...
#> 
#> Unrooted; includes branch lengths.
# Tag P/A data
  gl.tree.nj(testset.gs,type='fan')
#> Starting gl.tree.nj 
#>   Processing genlight object with Presence/Absence (SilicoDArT) data
#>   Converting to a matrix of frequencies, locus by populations
#>   Computing Euclidean distances
#> 

#> Completed: gl.tree.nj 
#> 
#> 
#> Phylogenetic tree with 29 tips and 27 internal nodes.
#> 
#> Tip labels:
#>   EmmacBrisWive, EmmacBurdMist, EmmacBurnBara, EmmacClarJack, EmmacClarYate, EmmacCoopAvin, ...
#> 
#> Unrooted; includes branch lengths.
  # }
  res <- gl.tree.nj(platypus.gl)
#> Starting gl.tree.nj 
#>   Processing genlight object with SNP data
#>   Warning: data include loci that are scored NA across all individuals.
#>   Consider filtering using gl <- gl.filter.allna(gl)
#>   Converting to a matrix of frequencies, locus by populations
#>   Computing Euclidean distances
#> 

#> Completed: gl.tree.nj 
#>