astralProjection: AstralProjection

View source: R/astralProjection.R

astralProjectionR Documentation

AstralProjection

Description

Function for plotting data from the astralPlane format

Usage

astralProjection(
  astral.plane = NULL,
  local.posterior = TRUE,
  pie.plot = TRUE,
  pie.data = c("qscore", "genetree"),
  save.file = NULL,
  pie.colors = c("black", "grey", "white"),
  node.color.text = c("white"),
  node.color.bg = c("black"),
  node.label.size = 0.5,
  tip.label.size = 1,
  pie.chart.size = 1
)

Arguments

astral.plane

AstralPlane S4 object of data generated from AstralPlane function

local.posterior

plot the local posterior support?

pie.plot

select one to plot: 'qscore' the quartet support or 'genetree' proportion of gene trees that support a branch

save.file

if you wish to save to file, put file name. Saves as PDF

pie.colors

select three colors to plot your pie.plot

node.color.text

if local.posterior = TRUE, select the color of posterior support text

node.color.bg

if local.posterior = TRUE, select the color of posterior support background

tip.label.size

size of the tip labels, passed to cex in plotting function

pie.chart.size

size of pie chart, passed to edgelabel plotting function

Value

plots the phylogenetic tree and selected data associated with an AstralPlane object. Can optionally be saved to file as a PDF by giving save.file a file name.

Examples


your.tree = ape::read.tree(file = "file-path-to-tree.tre")
astral.data = astralPlane(astral.tree = your.tree,
                          outgroups = c("species_one", "species_two"),
                          tip.length = 1)

astralProjection(astral.plane = astral.data,
                 local.posterior = TRUE,
                 pie.plot = "qscore",
                 save.file = "test-dataset.pdf",
                 pie.colors = c("purple", "blue", "green"),
                 node.color.text = c("white"),
                 node.color.bg = c("black"),
                 tip.label.size = 0.75,
                 pie.chart.size = 1)


chutter/AstralPlane documentation built on Aug. 29, 2024, 5:21 p.m.