\name{networkPlot}
\alias{networkPlot}
\title{
Plot the enriched subnetwork
}
\description{
This function takes in a subnetwork module resulted from the function
\code{\link[HTSanalyzeR:networkAnalysis]{networkAnalysis}}, a vector of labels for nodes in the module and a
phenotype vector (optional) to generate a figure. 
}
\usage{
networkPlot(nwAnalysisOutput, phenotypeVector=NULL)
}
\arguments{
  \item{nwAnalysisOutput}{
a list consisting of 'subnw' and 'labels', in which 'subnw' is the
subnetwork module generated by the function \code{\link[HTSanalyzeR:networkAnalysis]{networkAnalysis}}, while 'labels'
is a character vector specifying the labels for all nodes in the module.
 } 
  \item{phenotypeVector}{
a numeric or integer vector characterizing the phenotypes of nodes in
the subnetwork module. 
}
}
\details{
The 'phenotypeVector' argument is optional. The subnetwork figure will
be more readable if it is provided. See the function \code{plotModule} function in the
'BioNet' package for more details.
}
\value{
a subnetwork module of class \code{graphNEL}
}
\references{
Beisser D, Klau GW, Dandekar T, Muller T, Dittrich MT. BioNet: an R-Package
for the functional analysis of biological networks. Bioinformatics. 2010
Apr 15;26(8):1129-30.

Dittrich MT, Klau GW, Rosenwald A., Dandekar T and Muller T. \emph{Identifying
functional modules in protein-protein interaction networks: an integrated
exact approach.} Bioinformatics 2008 24(13):i223-i231.
}
\author{
Xin Wang, Camille Terfve
}
\seealso{
\code{\link[HTSanalyzeR:networkAnalysis]{networkAnalysis}}, \code{\link[HTSanalyzeR:viewSubNet]{viewSubNet}}, \code{\link[HTSanalyzeR:plotSubNet]{plotSubNet}}
}
\examples{
\dontrun{
library(BioNet)
library(org.Dm.eg.db)
##load pvalues, interactome, and phenotype vector (see the vignette for
##preprocessing details about this dataset)
data("KcViab_PVals", "Biogrid_DM_Interactome", "KcViab_Data4Enrich")
##Identify subnetworks
enrichedSubNet <- networkAnalysis(pvalues=KcViab_PVals,
graph=Biogrid_DM_Interactome, fdr=0.001, verbose=TRUE)
dev.off()
map <- as.list(get("org.Dm.egSYMBOL"))
labels <- map[nodes(enrichedSubNet)]
nwAnalysisResult <- list(subnw=enrichedSubNet, labels=labels)
networkPlot(nwAnalysisOutput=nwAnalysisResult, phenotypeVector= 
KcViab_Data4Enrich) 
}
}
