tree_workflow: Make phylogenetic trees colored according to strata

View source: R/wrap_popgen_tools.R

tree_workflowR Documentation

Make phylogenetic trees colored according to strata

Description

Make phylogenetic trees colored according to strata

Usage

tree_workflow(
  x,
  formula = NULL,
  name,
  scale_quality = "population",
  vcf = NULL,
  geo_tree = NULL,
  treeType = "upgma",
  dist = "provesti.dist",
  input_type = "genclone"
)

Arguments

x

Preferably a genclone object, genlights sometimes break it. Must have strata

formula

Hierarchical formula to group the populations by in plots. Do not wrap in quotes... I think.

name

Used to label plot axes and titles.

scale_quality

What to color the tree tips by. Use 'population' to color by any "formula" you set. Other options are: 'missing', 'median_depth', 'mean_depth', 'heterozygosity', and 'allele_depth'

vcf

Original vcfR object, used to calculate statistics on. Be sure it's the same exact individuals and variants as the data in 'x'.

geo_tree

Optionally supply your own tree instead of running poppr::aboot

treeType

Algorithm to make tree by. Make sure the package to use is loaded.

dist

Algorithm to calculate distance. Make sure the package to use is loaded.

input_type

Specify if a genclone or genlight is inputted

Value

Phylogenetic tree plot

Examples

tree_workflow(ultra_filtered_genlight, ~Nursery, "Nursery of origin", "population", ultra_filtered_vcf)

Neato-Nick/mllR documentation built on Aug. 30, 2024, 7:22 a.m.