plot_Ncells: Plot cell counts

Description Usage Arguments Details Value

Description

Calculates and plots the number of cells (cell counts) in a lineage or division tree. Cell counts can be plotted for each colony, generation or frame.

Usage

1
2
3
plot_Ncells(tree, treeT = c("LT", "DT"), grouped = c("col", "gen", "frame"),
  groups = -1, Ngroups, save = FALSE, savePars = list(w = 4000, h = 2000,
  res = 250, path = getwd(), name = "my_Ncells"))

Arguments

tree

The 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

grouped

A character string naming the grouping method:

  • "col" for grouping by colony

  • "gen" for grouping by generation

  • "frame" for grouping by frame, which is acceptable in case treeT = "LT".

groups

The IDs of the groups for which to plot the cell counts, a vector of positive integer values. The default value -1 stands for all existing groups in the tree.

Ngroups

Number of colonies in the movie (if grouped = "col") or number of generations in the movie (if grouped = "gen") or number of frames in the movie (if grouped = "frame"), a non-zero positive integer value.

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 4000.

h

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

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 250.

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_Ncells".

Details

A common plot for all groups specified in groups is generated. Cell counts are calculated considering all cells that are included in the analysis, as returned from get_cells.

Color denotes the corresponding group.

Value

A dataframe with the following columns:

  1. group is the ID of the group, a positive integer value.

  2. Ncells is the number of cells, a positive integer value.

In case no cells exist, no plot is generated and NULL is returned.


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