plot_grn {BioNERO} | R Documentation |
Plot gene regulatory network from edge list
plot_grn( edgelist_grn, show_labels = "tophubs", top_n_hubs = 5, interactive = FALSE, layout = igraph::with_kk, arrow.gap = 0.01, ranked = TRUE, dim_interactive = c(600, 600) )
edgelist_grn |
Data frame containing the edge list for the GRN network. First column is the TF and second column is the target gene. All other columns are interpreted as edge attributes. |
show_labels |
Character indicating which nodes will be labeled. One of "all", "allhubs", "tophubs", or "none". |
top_n_hubs |
Number of top hubs to be labeled. It is only valid
if |
interactive |
Logical indicating whether the network should be interactive or not. Default is FALSE. |
layout |
igraph function for the network layout. One of with_dh, with_drl, with_gem, with_lgl, with_fr, with_graphopt, with_kk and with_mds. Default is with_kk. |
arrow.gap |
Numeric indicating the distance between nodes and arrows. Default is 0.2. |
ranked |
Logical indicating whether to treat third column of the edge list (edge weights) as ranked values. Default: TRUE. |
dim_interactive |
Numeric vector with width and height of window for interactive plotting. Default: c(600,600). |
A ggplot object containing the network.
Fabricio Almeida-Silva
igraph_to_networkD3
,
forceNetwork
geom_edges
, geom_nodes
,
geom_nodetext
,theme_blank
,
geom_nodetext_repel
new_scale
data(filt.se) tfs <- sample(rownames(filt.se), size=50, replace=FALSE) grn_edges <- grn_infer(filt.se, method ="clr", regulators = tfs) p <- plot_grn(grn_edges, ranked=FALSE)