sp_tree_plot | R Documentation |
Generate tree file
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,
manual_color_vector = "Set3",
...
)
treefile |
Aphylogenetic tree file (Only tested for tree generated by iqtree) |
tree_type |
Currently 4 types of tree supported, |
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 |
layout |
one of 'rectangular', 'dendrogram', 'slanted', 'ellipse', 'roundrect', 'fan', 'circular', 'inward_circular', 'radial', 'equal_angle', 'daylight' or 'ape' |
ladderize |
logical (default |
branch.length |
variable for scaling branch, if 'none' draw cladogram |
tip_text |
Show branch labels or supply a name of columns in |
tip_text_size |
Text size of branch labels. |
bootstrap |
Show bootstrap value or not. |
bootstrap_variable |
|
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. |
manual_color_vector |
Manually set colors for each geom. Default NULL, meaning using ggplot2 default. Colors like c('red', 'blue', '#6181BD') (number of colors not matter) or a RColorBrewer color set like "BrBG" "PiYG" "PRGn" "PuOr" "RdBu" "RdGy" "RdYlBu" "RdYlGn" "Spectral" "Accent" "Dark2" "Paired" "Pastel1" "Pastel2" "Set1" "Set2" "Set3" "Blues" "BuGn" "BuPu" "GnBu" "Greens" "Greys" "Oranges" "OrRd" "PuBu" "PuBuGn" "PuRd" "Purples" "RdPu" "Reds" "YlGn" "YlGnBu" "YlOrBr" "YlOrRd" (check http://www.sthda.com/english/wiki/colors-in-r for more). |
... |
additional parameter some dot arguments:
|
A ggplot2 object
library(ggtree)
library("ggplot2")
library(ImageGP)
treefile <- "iqtree.treefile"
sp_tree_plot(treefile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.