\HeaderA{graphTheory}{Graph theory to test associations between two or more relationships}{graphTheory}
\keyword{data}{graphTheory}
\keyword{manip}{graphTheory}
\begin{Description}\relax
Graph theory approach associated with a permutation test to evaluate
whether the number of associations is unexpectedly large.
\end{Description}
\begin{Usage}
\begin{verbatim}
graphTheory(genename, interactome, perm)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{genename}] A vector a gene names that are associated with a
particular phenotype
\item[\code{interactome}] A binary matrix composed of genes (rows) and biological
complexes (columns) (see package \emph{ScISI})
\item[\code{perm}] Numeric, number of permutation run
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
We form two distinct graphs where the set of nodes are the proteins
(genes) in the organism. In one graph we create edges between genes if the two genes are
members of one, or more, protein complexes. In the second graph we
create an edge between all genes that are associated to a particular phenotype.
We then construct a third graph on the same node set, but
where there is an edge in this graph only if there is an edge in both
of the first to graphs. We count the number of edges
in the third and test by permutation whether the number of edges is unexpectedly large.
\end{Details}
\begin{Value}
The returned value is a list with components:
\begin{ldescription}
\item[\code{edgeCount}] Number of associations observed between the genes
that are linked to a particular phenotype and the given interactome.
\item[\code{edgeSimul}] Number of associations if the genes
that are linked to a particular phenotype are randomly distributed
across the given interactome
\item[\code{p.value}] Returned p.value
\end{ldescription}
\end{Value}
\begin{Author}\relax
R. Gentleman and N. LeMeur
\end{Author}
\begin{References}\relax
Balasubramanian, R., LaFramboise, T., Scholtens, D.,
Gentleman, R. (2004) A graph-theoretic approach to testing
associations between disparate sources of functional genomics data.Bioinformatics,20(18),3353-3362.
\end{References}
\begin{Examples}
\begin{ExampleCode}
data(ScISI)
data(essglist)
ans <- graphTheory(names(essglist), ScISI, perm=3)
\end{ExampleCode}
\end{Examples}

