Description Usage Arguments Value See Also Examples
View source: R/proteome_wide_diagnostics.R
cluster the data matrix to visually inspect which confounder dominates
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | plot_hierarchical_clustering(
data_matrix,
sample_annotation,
sample_id_col = "FullRunName",
color_list = NULL,
factors_to_plot = NULL,
fill_the_missing = 0,
distance = "euclidean",
agglomeration = "complete",
label_samples = TRUE,
label_font = 0.2,
filename = NULL,
width = 38,
height = 25,
units = c("cm", "in", "mm"),
plot_title = NULL,
...
)
|
data_matrix |
features (in rows) vs samples (in columns) matrix, with
feature IDs in rownames and file/sample names as colnames.
See "example_proteome_matrix" for more details (to call the description,
use |
sample_annotation |
data frame with:
.
See |
sample_id_col |
name of the column in |
color_list |
list, as returned by |
factors_to_plot |
vector of technical and biological covariates to be
plotted in this diagnostic plot (assumed to be present in
|
fill_the_missing |
numeric value determining how missing values
should be substituted. If |
distance |
distance metric used for clustering |
agglomeration |
agglomeration methods as used by |
label_samples |
if |
label_font |
size of the font. Is active if |
filename |
path where the results are saved. If null the object is returned to the active window; otherwise, the object is save into the file. Currently only pdf and png format is supported |
width |
option determining the output image width |
height |
option determining the output image width |
units |
units: 'cm', 'in' or 'mm' |
plot_title |
title of the plot (e.g., processing step + representation level (fragments, transitions, proteins) + purpose (meanplot/corrplot etc)) |
... |
other parameters of |
No return
hclust
,
sample_annotation_to_colors
,
plotDendroAndColors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | selected_batches = example_sample_annotation$MS_batch %in%
c('Batch_1', 'Batch_2')
selected_samples = example_sample_annotation$FullRunName[selected_batches]
test_matrix = example_proteome_matrix[,selected_samples]
hierarchical_clustering_plot <- plot_hierarchical_clustering(
example_proteome_matrix, example_sample_annotation,
factors_to_plot = c('MS_batch', 'Diet', 'DateTime'),
color_list = NULL,
distance = "euclidean", agglomeration = 'complete',
label_samples = FALSE)
#with defined color scheme:
color_list <- sample_annotation_to_colors (example_sample_annotation,
factor_columns = c('MS_batch', "Strain", "Diet", "digestion_batch"),
numeric_columns = c('DateTime', 'order'))
hierarchical_clustering_plot <- plot_hierarchical_clustering(
example_proteome_matrix, example_sample_annotation,
factors_to_plot = c('MS_batch', "Strain", 'DateTime', "digestion_batch"),
color_list = color_list,
distance = "euclidean", agglomeration = 'complete',
label_samples = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.