This class represents the forest of the ancestors of the cells sampled during the computation. The leaves of this forest are the sampled cells.
Fields
get_coalescent_cellsRetrieve most recent common ancestors
Parameter:
cell_ids- The list of the identifiers of the cells whose most recent common ancestors are aimed (optional).Return: A data frame representing, for each of the identified cells, the identified (column "
cell_id"), whenever the node is not a root, the ancestor identifier (column "ancestor"), whenever the node was sampled, i.e., it is one of the forest leaves, the name of the sample containing the node, (column "sample"), the mutant (column "mutant"), the epistate (column "epistate"), and the birth time (column "birth_time").
get_nodesGet the forest nodes
Return: A data frame representing, for each node in the forest, the identified (column "
cell_id"), whenever the node is not a root, the ancestor identifier (column "ancestor"), whenever the node was sampled, i.e., it is one of the forest leaves, the name of the sample containing the node, (column "sample"), the mutant (column "mutant"), the epistate (column "epistate"), and the birth time (column "birth_time").
get_samples_infoRetrieve information about the samples
Returns: A data frame containing, for each sample collected during the simulation, the columns "
name", "time", "ymin", "xmin", "ymax", "xmax", "tumour_cells", and "tumour_cells_in_bbox". The columns "ymin", "xmin", "ymax", "xmax" report the boundaries of the sample bounding box, while "tumour_cells" and "tumour_cells_in_bbox" are the number of tumour cells in the sample and in the bounding box, respectively.
get_species_infoGets the species data
Returns: A data frame reporting "
mutant" and "epistate" for each registered species.
get_sticksCompute the forest sticks
Returns: The list of the forest sticks. Each stick is represented as the list of cell identifiers labelling the nodes in the stick from the higher to the deeper in the forest.
get_subforest_forBuild a sub-forest using as leaves some of the original samples
Parameter:
sample_names- The names of the samples whose cells will be used as leaves of the new forest.Returns: A sample forest built on the samples mentioned in
sample_names.
saveSave a sample forest in a file
Parameter:
filename- The path of the file in which the samples forest must be saved.
