sp_tree_plot: Generate tree file

Description Usage Arguments Value Examples

View source: R/sp_tree.R

Description

Generate tree file

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
sp_tree_plot(
  treefile,
  tree_type = "iqtree",
  tree_attrib = NULL,
  tree_msa = NULL,
  color_branches = NULL,
  layout = "fan",
  ladderize = F,
  branch.length = "none",
  tip_text = "label",
  tip_text_size = 3,
  bootstrap = TRUE,
  bootstrap_variable = NULL,
  legend.position = "bottom",
  bootstrap_size = 3,
  bootstrap_color = "red",
  debug = FALSE,
  ...
)

Arguments

treefile

Aphylogenetic tree file (Only tested for tree generated by iqtree)

tree_type

Currently 4 types of tree supported, normal, newick, raxml, iqtree (default).

tree_attrib

A data frame with first columns match node names of tree file.

tree_msa

A multiple-aligned fasta file used to generate the tree file. A tree with Multiple-Sequence-Alignment plot would be generated when given.

color_branches

Name of columns in tree_attrib used for color branches.

layout

one of 'rectangular', 'slanted', 'fan', 'circular', 'radial', 'equal_angle' or 'daylight'

ladderize

logical (default TRUE). Should the tree be re-organized to have a 'ladder' aspect?

branch.length

variable for scaling branch, if 'none' draw cladogram

tip_text

Show branch labels or supply a name of columns in tree_attrib to be shown as branch labels, Or label to show default labels, or NULL to not show branch labels.

tip_text_size

Text size of branch labels.

bootstrap

Show bootstrap value or not.

bootstrap_variable

node to label ids for each node, or other variables in tree object. Default UFboot would be used for tree_type=iqtree.

legend.position

Position of legend, accept top, bottom, left, right, none or c(0.8,0.8).

bootstrap_size

Text size of bootstrap labels.

bootstrap_color

Text color of bootstrap labels.

...

additional parameter

Value

A ggplot2 object

Examples

1
2
3
4
5
library(ggtree)
library("ggplot2")
library(YSX)
treefile <- "iqtree.treefile"
sp_tree_plot(treefile)

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.