Skip to content
Permalink
e72e1d0347
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
40 lines (38 sloc) 1.85 KB
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/edgefinder.R
\name{graphComponents}
\alias{graphComponents}
\title{Find clusters, and return node characteristics.}
\usage{
graphComponents(A, minCtr = 5, type = 1)
}
\arguments{
\item{A}{An adjacency Matrix(0/1).}
\item{minCtr}{The minimum centrality value to be considered for a cluster center (default=5).}
\item{type}{Determines how the centrality measure is computed.}
}
\value{
A data frame with the following columns
\itemize{
\item{labels} {Node label (e.g. gene names).}
\item{degree} {Node degree.}
\item{cc} {Node clustering coefficient.}
\item{ctr} {Node centrality measure: (type\*CC+1)\*deg, or CC\*deg if type is negative.}
\item{clustNo} {Cluster number.}
\item {iscenter} {1 for the node was chosen as the cluster's center, 0 otherwise.}
\item {intEdges} {Number of edges from the node to nodes in the same cluster.}
\item {extEdges} {Number of edges from the node to nodes NOT in the same cluster.}
\item {distCenter} {Standardized Manhattan distance to the central node.}
}
}
\description{
Take an adjacency Matrix as input and find clusters. For each node, find the degree and clustering coefficient (CC). Then, calculate a centrality measure (type\*CC+1)\*deg. For type=0, it's just the degree. Note that setting type=1 we assign a higher value to nodes that not only have many neighbors, but the neighbors are highly interconnected. For example, suppose we have two components with k nodes, one has a star shape, and the other is a complete graph. With type=0 both graphs will get the same value, but with type=1 the complete graph will be picked by the algorithm first. Setting type to a negative value gives CC\*deg as the centrality measure.
}
\examples{
\donttest{
data(SIM)
Sres <- edgefinder(SIM, ttl = "hub network")
SimComp <- graphComponents(Sres$AdjMat)
head(SimComp)
}
}