generate_tree_vis: Combine trees and phylogenetic matrix data as a ggplot object

Description Usage Arguments Value Examples

View source: R/generate_tree_vis.R

Description

This function calls generate_tree_vec() to generate a vector of phylogenetic trees under parsimony. It then plots them alongside the phylogenetic matrix that was used to estimate the tree. Optional decorations can be added displaying parsimony and likelihood scores.

Usage

1
2
generate_tree_vis(sample_df, alignment, tree, phy_mat, pscore = FALSE,
  lscore = FALSE, random_tree = FALSE)

Arguments

sample_df

Dataframe specifying how to subsample phylogenetic matrix

alignment

String specifying path to alignment

tree

Starting tree for parsimony analysis. Phylo object.

phy_mat

Phylogenetic matrix to be subsampled

pscore

Optional boolean specifying if you would like figures annotated with parsimony score of tree given data. Default FALSE.

lscore

Optional boolean specifying if you would like figures annotated with likelihood score of tree given data under the Mk model. Default FALSE.

random_tree

Optional boolean specifying if you would like to view a vector of random trees

Value

vector Vector of ggplot2 objects

Examples

1
2
3
4
5
6
7
## Not run: 
output_vector <- generate_tree_vis(sample_df = sample_df,
                                   alignment = aln_path, tree = tree,
                                   phy_mat = bears, pscore = TRUE,
                                   lscore = TRUE)

## End(Not run)

wrightaprilm/treesiftr documentation built on July 15, 2019, 11:19 a.m.