read.OCG.Rd
This function reads in an OCG partition file and converts it into an OCG object for use in R.
read.OCG(file, elfile = NULL, verbose = FALSE, keep.out = FALSE)
file | A character string naming the OCG partition file. |
---|---|
elfile | A character string naming the file containing the network that the OCG partition is based upon. |
verbose | Logical, whether to print progress to the screen. Defaults to FALSE. |
keep.out | Logical, whether to keep the intermediate files written when reading in the OCG partition. Defaults to FALSE. |
An object of class OCG
, which is a list containing the following elements:
An integer vector with the number of edges, nodes, and communities.
An integer number specifying the modularity of the network.
A real number specifying the value of Q generated by the OCG algorithm.
A data frame consisting of 2 columns; the first contains node names, and the second contains single community IDs for each node. All communities and their nodes are represented, but not necessarily all nodes.
A named integer vector. Names are node names and integer values are the number of communities to which each node belongs.
An object of class igraph
. The network is represented here as an igraph
object.
A character matrix with 2 columns containing the nodes that interact with each other.
A named integer vector. Names are community IDs and integer values indicate the number of nodes that belong in each community.
Kalinka, A.T. and Tomancak, P. (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27, 2011-2012.
Alex T. Kalinka alex.t.kalinka@gmail.com
## Read an OCG partition file into R. if (FALSE) oc <- read.OCG(file = "OCG_partition.txt", elfile = "network.txt")