Learn R Programming

molnet (version 0.1.0)

generate_combined_graphs: Combines individual layers to a single graph

Description

Individual graphs created by generate_individual_graphs are combined to a single graph per group according to `inter_layer_connections`. Returns a list of combined graphs along with their annotations.

Usage

generate_combined_graphs(
  graphs,
  annotations,
  inter_layer_connections,
  settings
)

Arguments

graphs

A named list (elements `group1` and `group2`). Each element contains a list of iGraph objects (output of generate_individual_graphs).

annotations

A named list (elements `group1` and `group2`). Each element contains a list of data frames mapping each node IDs to identifiers (output of generate_individual_graphs).

inter_layer_connections

Named list with specified inter-layer connections. Names are layer names and elements are connections (make_connection).

settings

A named list containing pipeline settings

Value

A named list (elements `graphs` and `annotations` and sub-elements `$group1` and `$group2`). Contains the igraph objects of the combined network and their annotations for both groups.

Examples

Run this code
# NOT RUN {
data(individual_graphs_example)
individual_graphs <- individual_graphs_example
inter_layer_connections <- list(molnet::make_connection(from="mrna",
to="protein", connect_on="gene_name", weight=1))
settings <- molnet::molnet_settings() # defaults
combined_graphs <- molnet::generate_combined_graphs(individual_graphs$graphs,
                                                    individual_graphs$annotations,
                                                    inter_layer_connections,
                                                    settings)

# }

Run the code above in your browser using DataLab