Creates and packs multiple legends (feature types, class labels, membership proportions, raw values, and proximity metrics) into a single legend bundle for ComplexHeatmap.
generate_legend_bundle(
sorted_dat,
task = c("classification", "regression"),
show = c("all", "train", "test"),
type_cols = NULL,
label_cols,
prop_cols = NULL,
col_mat,
col_Col_Proximity = NULL,
col_Row_Proximity = NULL,
direction = c("vertical", "horizontal")
)A ComplexHeatmap packed Legend object containing all specified legends.
List. Output of sorted_mat(), containing sorted_test_matrix and
row_pro_mat_sorted.
Character. Type of task: "classification" or "regression".
Character. Which subset: "all", "train" or "test".
Named vector of colors for feature type categories.
Named vector or function of colors for class label categories.
Function. Color mapping function for membership proportion.
Function. Color mapping function for raw data values.
Function. Color mapping function for column proximity.
Function. Color mapping function for row proximity.
Character. Layout direction of packed legends, either "vertical" or "horizontal".