Calculates distance matrices for every valid input value of argument method_dist
and stores
the results in the celltracer object. Requires that initiateHierarchicalClustering()
has been called.
computeDistanceMatrices(
object,
variable_set,
phase = NULL,
method_dist = NULL,
force = FALSE,
p = 2,
verbose = NULL
)
object | A valid cypro object. |
---|---|
variable_set | Character value. Denotes the variable set of interest. Use |
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 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 |
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.) |
An updated version of the input cypro
-object.
computeDistanceMatrices()
is the second step in the convenient hierarchical clustering
of celltracer. It calculates the distance matrices according to all methods you are interested in in a
loop. Argument method_dist
therefore either takes a value or a vector of valid character strings.
Each input value is given to argument method
of function stats::dist()
.
Based on the distance matrices computed and saved this way the function agglomerateHierarchicalCluster()
can be used as the third
step of the hierarchical clustering pipeline.