Move coordinates of dendrogram by calculating distance it has to move to end up at the desired edges of the heatmap
move_dendrogram(
dend_seg,
x_long,
context = c("rows", "cols"),
dend_side,
dend_dist,
annot_df,
annot_side,
annot_pos,
annot_size
)
Data frame with updated dendrogram coordinates
Data frame containing dendrogram segments, attained from dendextend::as.ggdend()
Long format data frame with the values
Character specifying whether the dendrogram is linked to rows or columns in the heatmap
Logical specifying dendrogram position. TRUE is left of the heatmap if row dendrogram, bottom of heatmap if column dendrogram
Distance from heatmap (or annotation) to dendrogram in cell size.
Data frame with annotations for checking that annotations exist as well as their size
Logical specifying annotation position, analogous to dend_side
Numeric vector of annotation coordinates (x coordinates for row annotations, y for column annotations)
Numeric of length 1, the specified size (width or height) of annotation cells