plot_tree: Plot a tree

Description Usage Arguments Details See Also

Description

Plots a lineage or division tree.

Usage

1
2
3
4
5
6
plot_tree(tree, treeT = c("LT", "DT"), attrC = "", unitC = "",
  NC = NULL, attrS = "", cellsC = "", colorCol = FALSE, Ncols,
  showLabels = FALSE, sizeLabel = 0.1, circular = TRUE,
  showLegends = TRUE, sizeL = 1, sizeV = 0.5, sizeE = 0.1,
  save = FALSE, savePars = list(w = 6000, h = 6000, res = 600, path =
  getwd(), name = "my_tree"))

Arguments

tree

The connected lineage or division tree, an object of class "igraph".

treeT

A character string naming the type of tree:

  • "LT" if tree is a lineage tree

  • "DT" if tree is a division tree

attrC

The name of the attribute in the tree by which the cells will be colored, a character string. It can be any numeric or boolean attribute, as returned from get_attr_names. Coloring is applied to all non-root cells, as returned from get_cells, except for cells with NA value in this attribute which are colored gray. Any existing imaginary root cells are always colored white. When the default value "" (the empty character) is used, nodes' color is the default.

unitC

The unit of attrC, a character string. It should be in the format "<string>,<number>", where ",<number>" represents the power and is optional (e.g. "m" for meters and "cm,3" for cubic centimeters). The default value is the empty character "", which implies that attrC is in arbitrary units. This argument is ignored in case attrC = "".

NC

Number of colonies in the movie (if attrC = "colony") or number of generations in the movie (if attrC = "generation"), a non-zero positive integer value. This argument is ignored in case attrC != "colony" and attrC != "generation".

attrS

The name of the attribute in the tree by which the cells will be shaped, a character string. It can be any boolean attribute, as returned from get_attr_names. Cells are represented by dots or squares if their value in this attribute is TRUE or FALSE, respectively. When the default value "" (the empty character) is used, nodes' shape is the default.

cellsC

The labels of the cells in the tree which will be colored red, a vector of character strings. They can be any cells, as returned from get_cells. The default value is the empty character "", which stands for no cell.

colorCol

A logical value (TRUE or FALSE) indicating whether the edges of the tree will be colored based on the colony or not, respectively. The value TRUE can be used only if tree contains the imaginary main root cell. When the default value FALSE is used, edges' color is the default.

Ncols

Number of colonies in the movie, a non-zero positive integer value. This argument is ignored in case colorCol = FALSE.

showLabels

A logical value (TRUE or FALSE) indicating whether the labels of the cells will be shown on the plot or not, respectively. The default value is FALSE.

sizeLabel

Size of cell labels, a non-zero positive numeric value. The default value is 0.1. This argument is ignored in case showLabels = FALSE.

circular

A logical value (TRUE or FALSE) indicating whether the tree will be plotted in circular or classical tree layout, respectively. The default value is FALSE.

showLegends

A logical value (TRUE or FALSE) indicating whether the explanatory legends and title will be shown on the plot or not, respectively. The default value is FALSE.

sizeL

Size of explanatory legends and title, a non-zero positive numeric value. The default value is 1. This argument is ignored in case showLegends = FALSE.

sizeV

Size of vertices, a non-zero positive numeric value. The default value is 0.5.

sizeE

Width of edges, a non-zero positive numeric value. The default value is 0.1.

save

A logical value (TRUE or FALSE) indicating whether the generated plot will be saved in a .png file or displayed in the Plots Pane of RStudio, respectively. The default value is FALSE.

savePars

A named list specifying the parameters of the generated image file. This argument is ignored in case save = FALSE. Elements of the list are the following:

w

The width of the image file in pixels, a non-zero positive integer value. The default value is 6000.

h

The height of the image file in pixels, a non-zero positive integer value. The default value is 6000.

res

The resolution of the image file in pixels per inch (ppi), a non-zero positive integer value. The smaller this value, the larger the plot area in inches, and the smaller the text relative to the graph itself. The default value is 600.

path

A character string naming the directory where the image file will be saved (excluding the last "/"). If it does not contain an absolute path, the image file will be saved relative to the current working directory getwd(). The default value is the current working directory getwd().

NOTE: The components should be separated by "/" on Windows.

name

The image file name, a character string. The suffix ".png" is added automatically. The default value is "my_tree".

Details

Nodes represent all cells, as returned from get_cells. By default, all nodes are white dot points and edges are colored darkgray.

See Also

isConnected for checking if a tree is connected.


vicstefanou/ViSCA documentation built on May 31, 2019, 10:50 p.m.