Description Usage Arguments Value Examples
View source: R/proteome_wide_diagnostics.R
Plot the heatmap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | plot_heatmap_generic(
data_matrix,
column_annotation_df = NULL,
row_annotation_df = NULL,
col_ann_id_col = "FullRunName",
row_ann_id_col = "peptide_group_label",
columns_for_cols = c("MS_batch", "Diet", "DateTime", "order"),
columns_for_rows = c("KEGG_pathway", "WGCNA_module", "evolutionary_distance"),
cluster_rows = FALSE,
cluster_cols = TRUE,
annotation_color_cols = NULL,
annotation_color_rows = NULL,
fill_the_missing = -1,
color_for_missing = "black",
heatmap_color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
filename = NULL,
width = 7,
height = 7,
units = c("cm", "in", "mm"),
plot_title = NULL,
...
)
|
data_matrix |
the matrix of data to be plotted |
column_annotation_df |
data frame annotating columns of
|
row_annotation_df |
data frame annotating rows of |
col_ann_id_col |
column of |
row_ann_id_col |
column of |
columns_for_cols |
vector of factors (columns) of
|
columns_for_rows |
vector of factors (columns) of
|
cluster_rows |
boolean: whether the rows should be clustered |
cluster_cols |
boolean: whether the rows should be clustered |
annotation_color_cols |
list of color vectors for column annotation,
for each factor to be plotted; for factor-like variables a named vector
(names should correspond to the levels of factors). Advisable to supply here
color list returned by |
annotation_color_rows |
list of color vectors for row annotation,
for each factor to be plotted; for factor-like variables a named vector
(names should correspond to the levels of factors). Advisable to supply here
color list returned by |
fill_the_missing |
numeric value that the missing values are
substituted with, or |
color_for_missing |
special color to make missing values.
Usually black or white, depending on |
heatmap_color |
vector of colors used in heatmap (typicall a gradient) |
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 |
pheatmap-type object
1 2 3 4 5 | p <- plot_heatmap_generic(log_transform_dm(example_proteome_matrix),
column_annotation_df = example_sample_annotation,
columns_for_cols = c("MS_batch", "digestion_batch", "Diet", 'DateTime'),
plot_title = 'test_heatmap',
show_rownames = FALSE, show_colnames = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.