Skip to contents

Display the intersection network from 2 or more datasets

Usage

intersections_network(
  res_list,
  threshold,
  annotation_table,
  col_module_id,
  annotation_level,
  object_of_interest,
  annotation_option = FALSE,
  node_size = 12,
  label_size = 4,
  edge_label_size = 2,
  object_color = "cadetblue2",
  seed = NULL
)

Arguments

res_list

List of dataframes. The results from apply_NeighborFinder() on several datasets

threshold

Numeric. Integer corresponding to the minimum number of datasets in which you want neighbors to have been found

annotation_table

Dataframe. The dataframe gathering the taxonomic or functional module correspondence information

col_module_id

String. The name of the column with the module names in annotation_table

annotation_level

String. The name of the column with the level to be studied. Examples: species, genus, level_1

object_of_interest

String. The name of the bacteria or species of interest or a key word in the functional module definition

annotation_option

Boolean. Default value is False. If True: labels on nodes become module names instead of module IDs

node_size

Numeric. The parameter to adjust size of nodes

label_size

Numeric. The parameter to adjust size of labels

edge_label_size

Numeric. The parameter to adjust the size of edge labels

object_color

String. The name of the color to differentiate the nodes corresponding to 'object_of_interest' from the other module IDs

seed

Numeric. The seed number, ensuring reproducibility

Value

Network. Visualization of NeighborFinder results from several datasets. Edge color encodes the mean coefficient sign: green if positive, red if negative.

Examples

data(taxo)
data(result_example)
intersections_network(
  res_list = list(
    result_example$res_CRC_JPN,
    result_example$res_CRC_CHN,
    result_example$res_CRC_EUR
  ),
  taxo,
  threshold = 2,
  "Escherichia coli",
  col_module_id = "msp_id",
  annotation_level = "species",
  label_size = 7,
  edge_label_size = 4,
  node_size = 15,
  annotation_option = TRUE,
  seed = 3
)