View source: R/application_visualization.R
make_heatmap_ggplot | R Documentation |
make_heatmap_ggplot
Make a ggplot heatmap object from an input matrix containing continuous values. Two-color scale from white to color of choice.
make_heatmap_ggplot(matrix, y_name, x_name, y_axis = TRUE,x_axis = TRUE, x_axis_position = "top", legend_position = "top", color = "blue", legend_title = "score",...)
matrix |
Matrix with continuous values to plot in heatmap |
y_name |
Title of the y-axis |
x_name |
Title of the x-axis |
y_axis |
Should y-axis label names and titles be displayed? TRUE or FALSE. Default: TRUE. |
x_axis |
Should x-axis label names and titles be displayed? TRUE or FALSE. Default: TRUE. |
x_axis_position |
X-axis position: "top" or "bottomm"; only relevant if x_axis == TRUE. Default:"top". |
legend_position |
Legend position: "top", "bottom", "left", "right" or "none". Default: "top". |
color |
Color for highest continuous value in heatmap. Color gradient will go from "whitesmoke" to this color. Default: "blue". |
legend_title |
Title of the legend. |
... |
Optional arguments passed to element_text(); used to set font type and size of axis labels and titles. |
A ggplot object displaying a heatmap
## Not run:
library(dplyr)
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
ligands = list("TNF","BMP2",c("IL4","IL13"))
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands, ltf_cutoff = 0.99, algorithm = "PPR", damping_factor = 0.5,ligands_as_cols = TRUE)
p = make_heatmap_ggplot(ligand_target_matrix[1:50,] %>% t(), y_name = "ligand", x_name = "target")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.