catGenes::plotPhylo()plotPhylo
Plot ggtree-based phylogenetic tree
Description
Function to plot a ggtree-based phylogenetic tree using with the the addition of node supports from different phylogenetic estimation methods.
Arguments
| Argument | Description |
|---|---|
| tree | A phylo object. |
| layout | One of ‘rectangular’, ‘dendrogram’, ‘slanted’, ‘ellipse’, ‘roundrect’, ‘fan’, ‘circular’, ‘inward_circular’, ‘radial’, ‘equal_angle’, ‘daylight’ or ‘ape’ |
| branch.width | A numeric vector giving the width of the branches of the plotted phylogeny. These are taken to be in the same order than the component edge of phylo. If fewer widths are given than the length of edge, then these are recycled. Defaults to 0.5. |
| branch.supports | A logical indicating whether to show the node supports below the branches of the phylogeny. Defaults to TRUE, i.e. the statistical supports are shown. |
| add.raxml.tree | A RaxML-based phylo object. |
| add.parsi.tree | A parsimony-based phylo object. |
| highlight.clade | A vector of two tip labels to highlight their clade or a list of multiple vectors with two tip labels each to highlight their clades. |
| fill.gradient | One or more colors to highlight specific clades in the tree. |
| show.tip.label | A logical indicating whether to show the tip labels on the phylogeny. Defaults to TRUE, i.e. the labels are shown. |
| size.tip.label | The size of tip labels; defaults to 2. |
| fontface.tip.label | The font face of text, defaults to 3 (italic), others are 1 (plain), 2 (bold), 4 (bold.italic). |
| fancy.tip.label | A logical indicating whether to display tip labels with distinct formatting for the taxon name and associated voucher or GenBank accession number. Defaults to FALSE, maintaining the labels in the default format specified by fontface.tip.label. |
| abbrev.tip.label | A logical indicating whether to show the tip labels on the phylogeny. Defaults to FALSE, i.e. the labels are not abbreviated. |
| highlight.taxa | Define a vector with specific tip labels or the name of any taxa (species or genus name) present in the tree to highlight them with specific colors; defaults to “black”. |
| highlight.color | Color vector to highlight specific tip labels in the tree. |
| understate.taxa | Define a vector with specific tip labels or the name of any taxa (species or genus name) present in the tree to understate them with a gray color. All other tips will be in black, unless you have set the the arguments highlight.taxa highlight.color that define taxa to be highlight with an specific color. |
| replace.taxa | A vector of tip labels to be substituted with specific alternative names. This is provided in the form of, for instance, c(“Harpalyce_formosa” = “Harpalyce_riparia”, “Harpalyce_cf_brasiliana” = “Harpalyce_magnibracteata”), where the initial name represents the current tip label to be exchanged with the corresponding alternative name. |
| prune.taxa | A vector with specific tip labels to be dropped from the tree. |
| xlim.tree | Set x axis limits specially for tree panel. |
| hexpand | Expand x axis limits by ratio of x axis range. |
| gene.label | A title for the tree; usually a name of an specific gene (or set of genes) from which the tree was reconstructed. |
| size.gene.label | The size of gene text labels; defaults to 12. |
| ylim.gene.label | Set y axis limits for gene labels. |
| phylogram.side | If TRUE, a small phylogram with branch lengths will be plotted on the upper left. |
| phylogram.supports | If TRUE, the side phylogram will include the same symbols of node support as those plotted in the main edited tree. |
| phylogram.height | A number to adjust the size of the side phylogram. |
| save | Logical, if TRUE, the edited tree will be saved on disk. |
| dpi | One number in the range of 72-4000 referring to the image resolution in the format of dots per inch in the output file. Default is to create an output with 600 dpi. |
| dir | The path to the directory where the edited tree file will be saved provided that the argument save is set up in TRUE. The default is to create a directory named RESULTS_edited_tree and the tree will be saved within a subfolder named after the current date. |
| filename | Name of the output file to be saved. The default is to create a file entitled edited_tree and the specified layout. In the case of using the default layout, the saved file will be named edited_tree_rectangular |
| format | A character vector related to the file format of the global map to be saved. The default is ‘jpg’ to save the output in Joint Photographic Experts Group (.jpg), but you can also choose ‘pdf’ to save in Portable Document Format (.pdf), ‘tiff’ to save in Tag Image File Format (.tiff) or “png” to save in Portable Network Graphics (.png). |
| … | Further arguments to be passed to ggtree. |
Value
One or a list of objects of class “ggtree” “gg” “ggplot”.
Examples
library(catGenes)
data(Harpalyce_bayes_tree)
data(Harpalyce_parsimony_tree)
data(Harpalyce_raxml_tree)
Harpalyce_clade <- c("Harpalyce_brasiliana_Cardoso2510",
"Harpalyce_formosa_Hughes2109")
outgroup_taxa <- c("Staminodianthus_duckei",
"Guianodendron_praeclarum",
"Diplotropis_martiusii",
"Leptolobium_dasycarpum",
"Leptolobium_panamense",
"Bowdichia_virgilioides",
"Clathrotropis_nitida",
"Dermatophyllum_secundiflorum")
plotPhylo(tree = Harpalyce_bayes_tree,
layout = "rectangular",
branch.width = 0.5,
branch.supports = TRUE,
add.raxml.tree = Harpalyce_raxml_tree,
add.parsi.tree = Harpalyce_parsimony_tree,
highlight.clade = Harpalyce_clade,
fill.gradient = "#D53E4F",
show.tip.label = TRUE,
size.tip.label = 4,
fontface.tip.label = "italic",
understate.taxa = outgroup_taxa,
gene.label = c("ITS/5.8S", "ETS", "matK", "trnL intron"),
size.gene.label = 12,
ylim.gene.label = NULL,
phylogram.side = TRUE,
phylogram.supports = TRUE,
phylogram.height = 25,
save = TRUE,
dir = "results_edited_phylogeny",
filename = "Harpalyce_edited_tree",
format = "pdf")