plot_hierarchical_clustering {proBatch} | R Documentation |
cluster the data matrix to visually inspect which confounder dominates
plot_hierarchical_clustering(data_matrix, color_df, distance = "euclidean", agglomeration = "complete", label_samples = TRUE, label_font = 0.2, plot_title = NULL, ...)
data_matrix |
features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. in most function, it is assumed that this is the log transformed version of the original data |
color_df |
data frame of colors, as created by |
distance |
distance metric used for clustering |
agglomeration |
agglomeration methods as used by |
label_samples |
if |
label_font |
size of the font. Is active if |
plot_title |
Title of the plot (usually, processing step + representation level (fragments, transitions, proteins)) |
... |
other parameters of |
No return
hclust
, sample_annotation_to_colors
,
plotDendroAndColors
color_scheme <- sample_annotation_to_colors (example_sample_annotation, factor_columns = c('MS_batch','EarTag', "Strain", "Diet", "digestion_batch", "Sex"), not_factor_columns = 'DateTime', numeric_columns = c('order')) color_annotation <- color_scheme$color_df hiarchical_clustering_plot <- plot_hierarchical_clustering( example_proteome_matrix, color_annotation, distance = "euclidean", agglomeration = 'complete', label_samples = FALSE)