Title: | Computation of Graphlet Orbit Counts in Sparse Graphs |
---|---|
Description: | Implements orbit counting using a fast combinatorial approach. Counts orbits of nodes and edges from edge matrix or data frame, or a graph object from the graph package. |
Authors: | Tomaz Hocevar [aut, cre], Janez Demsar [aut] |
Maintainer: | Tomaz Hocevar <[email protected]> |
License: | LGPL-3 |
Version: | 1.1-3 |
Built: | 2024-11-20 06:56:20 UTC |
Source: | CRAN |
The network representing the friendships between members of a university-based karate club, which was originally used to model the fission process with a mathematical model. The network consists of 34 nodes (club members) and 77 edges (friendships).
karate
karate
A data frame with 77 observations and 2 columns.
https://networkdata.ics.uci.edu/data.php?id=105
W. W. Zachary (1977) An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33(4), 452-473.
Count the node or edge orbits in 4- or 5- node graphlets for all nodes (edges) in the given graph.
count4(graph) count5(graph) ecount4(graph) ecount5(graph)
count4(graph) count5(graph) ecount4(graph) ecount5(graph)
graph |
A graph given as a nx2 edge matrix, a data frame with edges or a graph object from the package 'graph'. The nodes in the matrix or data frame are given by integer indices that start with 1. |
A numeric matrix or orbit counts. Rows correspond to graph nodes or edges in the same order as on the input, and the columns corresponding to orbits.
Tomaz Hocevar and Janez Demsar
Tomaz Hocevar, Janez Demsar (2016): Computation of Graphlet Orbits for Nodes and Edges in Sparse Graphs. Journal of Statistical Software, 71(10), pp. 1-24.
library(orca) # Load and show the orbit counts for the Karate graph data("karate") count4(karate) ## Not run: # Simple analysis of School Wikipedia network: find the most similar # nodes with respect to the local network topology # Requires data from http://www.biolab.si/supp/Rorca/_downloads/schools-wiki.zip library("FNN") nodes <- scan("schools-wiki-nodes.txt", what="", sep="\n") edges <- read.table("schools-wiki-edges.txt") orbits <- count4(edges) nn <- get.knn(orbits, k=10) neighbours <- nn$nn.index distances <- nn$nn.dist check <- c("Canada", "Germany", "Isaac Newton", "Albert Einstein", "Mahatma Gandhi", "Mahabharata") node_indices <- match(check, nodes) for (i in 1:length(check)) { cat("\n\n", check[i], ": ", sep="") cat(nodes[neighbours[node_indices[i], ]], sep=", ") cat("\n") cat(round(distances[node_indices[i], ]), sep=", ") } ## End(Not run)
library(orca) # Load and show the orbit counts for the Karate graph data("karate") count4(karate) ## Not run: # Simple analysis of School Wikipedia network: find the most similar # nodes with respect to the local network topology # Requires data from http://www.biolab.si/supp/Rorca/_downloads/schools-wiki.zip library("FNN") nodes <- scan("schools-wiki-nodes.txt", what="", sep="\n") edges <- read.table("schools-wiki-edges.txt") orbits <- count4(edges) nn <- get.knn(orbits, k=10) neighbours <- nn$nn.index distances <- nn$nn.dist check <- c("Canada", "Germany", "Isaac Newton", "Albert Einstein", "Mahatma Gandhi", "Mahabharata") node_indices <- match(check, nodes) for (i in 1:length(check)) { cat("\n\n", check[i], ": ", sep="") cat(nodes[neighbours[node_indices[i], ]], sep=", ") cat("\n") cat(round(distances[node_indices[i], ]), sep=", ") } ## End(Not run)
The Petersen graph is a graph with 10 vertices and 15 edges, usually drawn as a pentagram within a pentagon.
petersen
petersen
A data frame with 15 observations and 2 columns.
J. Petersen Sur la théorème de Tait. L'Intermédiare des Math. 5, 225-227.
The nodes of Contiguous USA Graph represent the 49 contiguous states of the USA. Two nodes are connected if there exists at least one driveable road between the corresponding states.
usastates
usastates
A data frame with 107 observations and 2 columns.
http://www-cs-staff.stanford.edu/~uno/contiguous-usa.dat
D. E. Knuth (2008) The Art of Computer Programming, Volume 4, Fascicle 0: Introduction to Combinatorial Functions and Boolean Functions, p. 15. Upper Saddle River, NJ: Addison-Wesley.
The network representing interactions between 2361 proteins.
yeast
yeast
A data frame with 6646 observations and 2 columns.
http://vlado.fmf.uni-lj.si/pub/networks/data/bio/Yeast/Yeast.htm
S. Sun, L. Ling, N. Zhang, G. Li and R. Chen (2003) Topological structure analysis of the protein-protein interaction network in budding yeast, Nucleic Acids Research, 31(9), 2443-2450.