Learn R Programming

DrDimont (version 0.1.4)

create_unique_layer_node_ids: [INTERNAL] Assign node IDs to the biological identifiers across a graph layer

Description

[INTERNAL] This function takes two data frames of (biological) identifiers of nodes. Each data frame corresponds to the identifiers of the components contained in the single-layer network of a sample group. This function outputs the same data frames, with an added column (`node_id`) that contains node IDs which can later be used as `name` parameter for an iGraph graph. Node IDs begin with the defined `prefix` and an underscore. If a molecule is present in both groups, the node ID will be the same across the whole layer, allowing to easily combine the graphs of both groups in generate_differential_score_graph to calculate differential scores of identical nodes in both sample groups. The function is used by the high-level wrapper generate_individual_graphs to create annotations, which uniquely define nodes across the network layer.

Usage

create_unique_layer_node_ids(identifiersA, identifiersB, layer_name)

Value

Returns an named list. Elements `groupA` and `groupB` contain the input data frames with an additional column `node_id`. `both` contains all unique node IDs assigned across the network layer.

Arguments

identifiersA, identifiersB

[data.frame] Containing the biological identifiers of each group of the same network layer.

layer_name

[string] Name of layer that the node ids are created for