Description Usage Arguments Value See Also Examples
View source: R/proteome_wide_diagnostics.R
Plot the heatmap of samples (cols) vs features (rows)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | plot_heatmap_diagnostic(
data_matrix,
sample_annotation = NULL,
sample_id_col = "FullRunName",
factors_to_plot = NULL,
fill_the_missing = -1,
color_for_missing = "black",
heatmap_color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
cluster_rows = TRUE,
cluster_cols = FALSE,
color_list = NULL,
peptide_annotation = NULL,
feature_id_col = "peptide_group_label",
factors_of_feature_ann = c("KEGG_pathway", "evolutionary_distance"),
color_list_features = NULL,
filename = NULL,
width = 7,
height = 7,
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 |
factors_to_plot |
vector of technical and biological factors to be
plotted in this diagnostic plot (assumed to be present in
|
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) |
cluster_rows |
boolean value determining if rows should be clustered |
cluster_cols |
boolean value determining if columns should be clustered |
color_list |
list, as returned by |
peptide_annotation |
long format data frame with peptide ID and their
corresponding protein and/or gene annotations.
See |
feature_id_col |
name of the column with feature/gene/peptide/protein
ID used in the long format representation |
factors_of_feature_ann |
vector of factors that characterize features,
as listed in |
color_list_features |
list, as returned by
|
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 |
object returned by link[pheatmap]{pheatmap}
sample_annotation_to_colors
,
pheatmap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | log_transformed_matrix = log_transform_dm(example_proteome_matrix)
heatmap_plot <- plot_heatmap_diagnostic(log_transformed_matrix,
example_sample_annotation,
factors_to_plot = c("MS_batch", "digestion_batch", "Diet", 'DateTime'),
cluster_cols = TRUE, cluster_rows = FALSE,
show_rownames = FALSE, show_colnames = FALSE)
color_list <- sample_annotation_to_colors (example_sample_annotation,
factor_columns = c('MS_batch','EarTag', "Strain",
"Diet", "digestion_batch", "Sex"),
numeric_columns = c('DateTime', 'order'))
log_transformed_matrix = log_transform_dm(example_proteome_matrix)
heatmap_plot <- plot_heatmap_diagnostic(log_transformed_matrix,
example_sample_annotation,
factors_to_plot = c("MS_batch", "digestion_batch", "Diet", 'DateTime'),
cluster_cols = TRUE, cluster_rows = FALSE,
color_list = color_list,
show_rownames = FALSE, show_colnames = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.