count_graphlets_ego: Ego-network graphlet counts

View source: R/orca_interface.R

count_graphlets_egoR Documentation

Ego-network graphlet counts

Description

Calculates graphlet counts for the n-step ego-network of each node in a graph

Usage

count_graphlets_ego(
  graph,
  max_graphlet_size = 4,
  neighbourhood_size = 2,
  min_ego_nodes = 3,
  min_ego_edges = 1,
  return_ego_networks = FALSE
)

Arguments

graph

An undirected, simple graph as an igraph object.

max_graphlet_size

Determines the maximum size of graphlets to count. Only graphlets containing up to max_graphlet_size nodes will be counted. Currently only size 4 (default) and 5 are supported.

neighbourhood_size

The number of steps from the source node used to select the neighboring nodes to be included in the source node ego-network. (Default 2).

min_ego_nodes

Only ego networks with at least min_ego_nodes nodes are returned. (Default 3).

min_ego_edges

Only ego networks with at least min_ego_edges edges are returned. (Default 1).

return_ego_networks

If TRUE, return ego-networks alongside graphlet counts to enable further processing.

Value

If return_ego_networks = FALSE, returns an RxC matrix containing counts of each graphlet (columns, C) for each ego-network in the input graph (rows, R). Columns are labelled with graphlet IDs and rows are labelled with the ID of the central node in each ego-network (if nodes in the input graph are labelled). If return_ego_networks = TRUE, returns a list with the following elements:

  • graphlet_counts: A matrix containing graphlet counts for each ego-network in the input graph as described above.

  • ego_networks: The ego-networks of the query graph.


alan-turing-institute/network-comparison documentation built on June 7, 2022, 10:41 p.m.