Agglomerates the existing distance measurements to hierarchical trees.

agglomerateHierarchicalCluster(
  object,
  variable_set,
  phase = NULL,
  method_dist = NULL,
  method_aggl = NULL,
  force = FALSE,
  verbose = NULL
)

Arguments

object

A valid cypro object.

variable_set

Character value. Denotes the variable set of interest. Use getVariableSetNames() to obtain all names of currently stored variable sets in your object.

phase

Character or numeric. If character, the ordinal value referring to the phase of interest (e.g. 'first', 'second' etc.). referring to the phase of interest or 'all'. If numeric, the number referring to the phase.

If set to NULL takes the phase denoted as default with adjustDefault().

Ignored if the experiment design contains only one phase.

method_dist

Character vector (or value see details for more.) Denotes the distance method(s) of interest (e.g. 'euclidean' or 'manhattan').

Use validDistanceMethods() to obtain all valid input options.

method_aggl

Character vector (or value see details for more.) Denotes the agglomeration method(s) of interest according to which the existing distance matrices are agglomerated to hierarchical trees.

Use validAgglomerationMethods() to obtain all valid input options.

force

Logical value. Needs to be set to TRUE if you want to overwrite an already existing set up or already existing results.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

An updated version of the input cypro-object.

Details

agglomerateHierarchicalCluster() is the third step in the convenient hierarchical clustering pipeline of celltracer. It uses the distance matrices calculated with computeDistanceMatrices() and denoted in the argument method_dist and agglomerates them to hierarchical trees according to all methods denoted in argument method_aggl (input for the latter is given to argument method of function stats::hclust()). Both method_*-arguments therefore take a vector of character strings as input.

Use plotDendrogram() to visualize the agglomeration results of the distance/agglomeration combinations of interest and addHierarchicalCluster - the fourth and final step - to make the clustering results available for all other plotting functions and the across-argument.