Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

DrDimont (version 0.1.4)

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
)

Value

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

Arguments

graphs

[list] A named list (elements `groupA` and `groupB`). Each element contains a list of iGraph objects (`graphs` from output of generate_individual_graphs).

annotations

[list] A named list (elements `groupA`, `groupB` and `both`). Each element contains a list of data frames mapping each node IDs to identifiers. `both` contains unique identifiers across the whole data. (`annotations` from output of generate_individual_graphs)

inter_layer_connections

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

settings

[list] A named list containing pipeline settings. The settings list has to be initialized by drdimont_settings. Items in the named list can be adjusted as desired.

Examples

Run this code
# \dontshow{
WGCNA::disableWGCNAThreads()
# }

data(individual_graphs_example)
data(metabolite_protein_interactions)

example_inter_layer_connections = list(make_connection(from='mrna', to='protein',
                                           connect_on='gene_name', weight=1),
                                       make_connection(from='protein', to='phosphosite',
                                           connect_on='gene_name', weight=1),
                                       make_connection(from='protein', to='metabolite',
                                           connect_on=metabolite_protein_interactions,
                                           weight='combined_score'))

example_settings <- drdimont_settings()

example_combined_graphs <- generate_combined_graphs(
                               graphs=individual_graphs_example$graphs,
                               annotations=individual_graphs_example$annotations,
                               inter_layer_connections=example_inter_layer_connections,
                               settings=example_settings)

Run the code above in your browser using DataLab