Plot network heatmap
plot_network_heatmap(
network_table,
regulators = NULL,
targets = NULL,
switch_matrix = TRUE,
show_names = FALSE,
heatmap_size_lock = TRUE,
heatmap_size = 5,
heatmap_height = NULL,
heatmap_width = NULL,
heatmap_title = NULL,
heatmap_color = c("#1966ad", "white", "#bb141a"),
border_color = "gray",
rect_color = NA,
anno_width = 1,
anno_height = 1,
row_anno_type = NULL,
column_anno_type = NULL,
legend_name = "Weight",
row_title = "Regulators"
)
The weight data table of network.
Regulators list.
Targets list.
Logical value, default is TRUE
, whether to weight data table to matrix.
Logical value, default is FALSE
, whether to show names of row and column.
Lock the size of heatmap.
Default is 5
. The size of heatmap.
The height of heatmap.
The width of heatmap.
The title of heatmap.
Colors of heatmap.
Default is gray
. Color of heatmap border.
Default is NA
. Color of heatmap rect.
Width of annotation.
Height of annotation.
Default is NULL
,
could add a annotation plot to row,
choose one of boxplot
, barplot
, histogram
, density
, lines
, points
, and horizon
.
Default is NULL
,
could add a annotation plot to column,
choose one of boxplot
, barplot
, histogram
, density
, lines
, and points
.
The name of legend.
The title of row.
A heatmap
data("example_matrix")
data("example_ground_truth")
network_table <- inferCSN(example_matrix)
#> ✔ Running for <dense matrix>.
#> ✔ Checking input parameters.
#> ✔ Using L0 sparse regression model.
#> ✔ Using 1 core.
#> ✔ Run done.
p1 <- plot_network_heatmap(
example_ground_truth[, 1:3],
heatmap_title = "Ground truth",
legend_name = "Ground truth"
)
p2 <- plot_network_heatmap(
network_table,
heatmap_title = "inferCSN",
legend_name = "inferCSN"
)
ComplexHeatmap::draw(p1 + p2)
p3 <- plot_network_heatmap(
network_table,
heatmap_title = "inferCSN",
legend_name = "Weight1",
heatmap_color = c("#20a485", "#410054", "#fee81f")
)
p4 <- plot_network_heatmap(
network_table,
heatmap_title = "inferCSN",
legend_name = "Weight2",
heatmap_color = c("#20a485", "white", "#fee81f")
)
ComplexHeatmap::draw(p3 + p4)
plot_network_heatmap(
network_table,
show_names = TRUE,
rect_color = "gray90",
row_anno_type = "density",
column_anno_type = "barplot"
)
plot_network_heatmap(
network_table,
regulators = c("g1", "g2"),
show_names = TRUE
)
plot_network_heatmap(
network_table,
targets = c("g1", "g2"),
row_anno_type = "boxplot",
column_anno_type = "histogram",
show_names = TRUE
)
plot_network_heatmap(
network_table,
regulators = c("g1", "g3", "g5"),
targets = c("g3", "g6", "g9"),
show_names = TRUE
)