View source: R/application_visualization.R
diagrammer_format_signaling_graph | R Documentation |
diagrammer_format_signaling_graph
Prepare extracted ligand-target signaling network for visualization with DiagrammeR.
diagrammer_format_signaling_graph(signaling_graph_list, ligands_all,targets_all, sig_color = "steelblue", gr_color = "orange")
signaling_graph_list |
A list of two elements: sig: a data frame/ tibble containg weighted ligand-receptor and signaling interactions (from, to, weight); and gr: a data frame/tibble containng weighted gene regulatory interactions (from, to, weight) |
ligands_all |
A character vector of one or more ligands of interest |
targets_all |
A character vector of one or more target genes of interest |
sig_color |
The color for ligand-signaling edges and the ligand node. Default: steelblue. |
gr_color |
The color for the gene regulatory edges and the target node. Default: orange. |
A DiagrammeR Graph object ready for visualization via DiagrammeR::render_graph.
## Not run:
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
ligands = list("TNF","BMP2",c("IL4","IL13"))
ligand_tf_matrix = construct_ligand_tf_matrix(weighted_networks, ligands, ltf_cutoff = 0.99, algorithm = "PPR", damping_factor = 0.5,ligands_as_cols = TRUE)
all_ligands = c("BMP2")
all_targets = c("HEY1")
top_n_regulators = 2
ligand_target_signaling_list = get_ligand_signaling_path(ligand_tf_matrix,all_ligands,all_targets,top_n_regulators,weighted_networks)
graph = diagrammer_format_signaling_graph(ligand_target_signaling_list, all_ligands,all_targets)
# DiagrammeR::render_graph(graph, layout = "tree")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.