merge_cells: Merge two cells

Description Usage Arguments Details Value Prerequisites See Also

Description

Merges two cells from the same or different lineage trees.

Usage

1
2
merge_cells(LT1, LT2 = NULL, cell1, cell2, cell_list, col_list, Ncols, pixelR,
  matFolder, matFileName, exeFolder, mcrFolder, show = TRUE)

Arguments

LT1

The lineage tree where the cell specified in cell1 belongs, an object of class "igraph".

LT2

The lineage tree where the cell specified in cell12 belongs, an object of class "igraph". When the default value NULL is used, cell2 belongs to the LT.

cell1

The label of the first cell in the LT1 to be merged, a character string. It can be any non-root cell, as returned from get_cells.

cell2

The label of the second cell in the LT2 (or LT1 in case LT2 = NULL) to be merged, a character string. It can be any valid candidate merge cell, as returned from get_cand_merge_cells.

cell_list

A list containing all the cell instants of the movie.

col_list

A list containing all the colony instants of the movie.

Ncols

Number of colonies in the movie, a non-zero positive integer value.

pixelR

The pixel ratio in units of length, a non-zero positive numeric value.

matFolder

A character string naming the absolute path of the directory where the .mat file generated by BaSCA is saved (excluding the last "/"). The default value is the current working directory getwd().

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

matFileName

A character string naming the .mat file generated by BaSCA (including the suffix ".mat"). The filename is relative to the matFolder.

exeFolder

A character string naming the absolute path of the installation folder of the MATLAB executable (excluding the last "/").

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

mcrFolder

A character string naming the absolute path of the installation folder of the Matlab Compiler Runtime (MCR) (excluding the last "/").

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

show

A logical value (TRUE or FALSE) indicating whether view_cell will be called for cell1 and cell2 before the merge operation and the resulting cell after the merge operation. This capability is useful in order to see the result of the function. The default value is TRUE.

Details

After the merge operation, cell1 is replaced in both LT1 and cell_list by the resulting cell. Daughter branches of cell2 are extracted from LT2 (or LT1 in case LT2 = NULL), with successive calls of extract_branch. These motherless branches (lineage trees) are added as daughter branches to cell1, with successive calls of add_branch, until cell1 has two daughters. Finally, cell2 is deleted from LT2 (or LT1 in case LT2 = NULL) with extract_branch.

Value

A named list with the following components:

LT1

The updated LT1 with cell1 replaced and the possible daughter branches added/replaced, an object of class "igraph".

LT2

The updated LT2 with cell2 and its daughter branches deleted, an object of class "igraph". NULL is returned in case LT2 was anywise NULL or if it ended up with no cells.

cell_list

The updated cell_list with cell1 replaced.

branches

A list with the remaining motherless branches. Each branch (element of the list) is an object of class "igraph".

Prerequisites

This function can be used by BaSCA users only, importing the data with import_basca.

See Also

split_cell for the reverse.


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