plot_custom_branch: plot.custom.branch

View source: R/custom_branch.R

plot_custom_branchR Documentation

plot.custom.branch

Description

Auxiliar function to visualize candidate edges for PUT binding with custom_branch

Usage

plot_custom_branch(
  tree,
  edges,
  PUT = NULL,
  candidate.col = "#bf2828",
  forbidden.col = "#3d3d3d",
  candidate.lwd = 2,
  forbidden.lwd = 1,
  ...
)

Arguments

tree

backbone tree of class phylo.

edges

matrix with five columns (character vectors). Each row defines a set of consecutive edges between two nodes, and multiple rows can be used for the same PUT. Column 1 includes the PUTs. Columns 2 and 3 include a pair of species whose MRCA defines the older node, whereas the MRCA of the species in columns 4 and 5 defines the younger node. Using the same species in columns 4 and 5 will define a terminal node as the younger node. If columns 2-3 are filled with a species and columns 4-5 are filled with another species, then all edges below the MRCA of the two species will be set as candidates. If the four columns are filled with the same species, the PUT will be bound as sister to this species.

PUT

If the edges data frame includes binding information for multiple PUTs, specifies the PUT whose candidate edges are to be depicted.

candidate.col

Color for candidate edges (default is "red").

forbidden.col

Color for non-candidate edges (default is "black").

candidate.lwd

Line width for candidate edges (default is 2).

forbidden.lwd

ine width for non-candidate edges (default is 1).

...

further arguments to be passed to plot.phylo.

Examples


cats.edges <- data.frame(
 "PUT"= "Felis_catus",
 "parent1"= "Felis_silvestris",
 "parent2"= "Felis_silvestris",
 "child1"= "Felis_silvestris",
 "child2"= "Felis_silvestris")

#Depict candidate edges on the phylogeny
plot_custom_branch(tree=cats, edges=cats.edges)


iramosgutierrez/randtip documentation built on March 19, 2024, 6:35 p.m.